我正在为我的网站使用paypal自适应支付。我有很多卖家和不同的产品。当我作为用户尝试从我的网站购买任何产品时,我无法在Paypal表格摘要中看到产品名称,而是卖家的姓名和姓氏。
请告诉我哪个参数用于传递产品名称..
这是截图
答案 0 :(得分:1)
使用自适应付款,您无法在付款请求本身中发送逐项详细信息。相反,你必须像往常一样打电话给Pay,但随后拨打SetPaymentOptions来跟进。通过PayKey,您可以从PayK请求中返回,然后您可以设置所有其他详细信息,例如SetPaymentsOptions提供的逐项信息。
然后你会在之后重定向到PayPal,并且它应该显示你之后的内容。
答案 1 :(得分:1)
使用自适应付款,您使用SetPaymentOptions设置的商品详细信息仅通过嵌入式流程显示给客户。 嵌入式流程使用灯箱或小型浏览器作为结帐页面。
以下是有关如何在前端页面中实施嵌入式流程的技术说明,like this
答案 2 :(得分:0)
我遇到了同样的问题。它看起来只适用于嵌入式付款流程。
Embedded Payment Flow Using Adaptive Payments
$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
}