繁体   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