簡體   English   中英

貝寶自適應支付-產品名稱

[英]PayPal Adaptive Payments - Product Name

我正在為我的網站使用貝寶自適應支付。 我有很多賣家和不同的產品。 當我作為用戶嘗試從我的網站上購買任何產品時,我在Paypal表單摘要中看不到產品名稱,而是有賣方的名稱和姓氏。

請讓我知道用於傳遞產品名稱的參數。

這是屏幕截圖

在此處輸入圖片說明

使用自適應付款,您無法在“付款”請求本身中發送逐項明細。 取而代之的是,您必須像往常一樣調用Pay,然后再調用SetPaymentOptions 這樣,您將傳遞PayKey,從Pay請求中取回,然后可以設置所有其他詳細信息,例如SetPaymentsOptions提供的逐項信息。

然后,您將在此之后重定向到PayPal,它應顯示您要處理的內容。

使用自適應付款時,您通過SetPaymentOptions設置的商品詳細信息僅通過嵌入式流程顯示給客戶。 嵌入式流程對結帳頁面使用燈箱或微型瀏覽器。

這是有關如何在前端頁面中實現嵌入式流程的技術說明, 網址為https://developer.paypal.com/docs/classic/adaptive-payments/ht_ap-embeddedPayment-curl-etc/

我有同樣的問題。 看起來它僅在嵌入式付款流程中有效

使用自適應支付的嵌入式支付流程

    $receiverOptions = new PayPal\Types\AP\ReceiverOptions();
    $setPaymentOptionsRequest->receiverOptions[] = $receiverOptions;

    $receiverOptions->description = 'Description';

    $invoiceItems = array();
    $item = new PayPal\Types\AP\InvoiceItem();

    $item->name = 'Item Name'; 
    $item->price = 10;
    $item->itemPrice = 10;
    $item->itemCount = 1;

    $invoiceItems[] = $item;

    $receiverOptions->invoiceData = new PayPal\Types\AP\InvoiceData();
    $receiverOptions->invoiceData->item = $invoiceItems;

    $receiverId = new PayPal\Types\AP\ReceiverIdentifier(); 
    $receiverId->email = 'email@domain.com';//Change it
    $receiverOptions->receiver = $receiverId;


    $setPaymentOptionsRequest->payKey = $_POST['payKey'];

        $servicePaymentOptions = new PayPal\Service\AdaptivePaymentsService($config);
        try {
            /* wrap API method calls on the service object with a try catch */
            $responsePaymentOptions = $servicePaymentOptions->SetPaymentOptions($setPaymentOptionsRequest);

            print_r($responsePaymentOptions); die;
        } catch(Exception $ex) {
            //error
        }

        if (isset($responsePaymentOptions) && $responsePaymentOptions->responseEnvelope->ack == "Success")
        {
            //Success
        }

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM