我正在使用PayPal RESTful API。 https://developer.paypal.com/webapps/developer/docs/api/使用REST API的PayPal订单汇总 - - cURL或PHP
我怎样才能把我的消费者订购商品和购买的描述到PayPal,所以当我的用户会被重定向到PayPal通过登录批准订单,其订单汇总会显示在左侧。 。
。
ORDER发明内容在左侧
我试图通过在transactions.item_list.items但该信息没有显示在订单汇总仍然。
任何帮助如何让订单汇总使用PayPal RESTful API出现在PayPal审批页上?
我还没有对他们的文档感到满意,因为它缺少一些信息,也有一些错误浪费了我的时间来调试。
//
// prepare paypal data
$payment = array(
'intent' => 'sale',
'redirect_urls' => array(
'return_url' => $url_success,
'cancel_url' => $url_cancel,
),
'payer' => array(
'payment_method' => 'paypal'
)
);
//
// prepare basic payment details
$payment['transactions'][0] = array(
'amount' => array(
'total' => '0.03',
'currency' => 'USD',
'details' => array(
'subtotal' => '0.02',
'tax' => '0.00',
'shipping' => '0.01'
)
),
'description' => 'This is the payment transaction description 1.'
);
//
// prepare individual items
$payment['transactions'][0]['item_list']['items'][] = array(
'quantity' => '1',
'name' => 'Womens Large',
'price' => '0.01',
'currency' => 'USD',
'sku' => '31Wf'
);
$payment['transactions'][0]['item_list']['items'][] = array(
'quantity' => '1',
'name' => 'Womens Medium',
'price' => '0.01',
'currency' => 'USD',
'sku' => '31WfW'
);
//
//format payment array to pass to cURL
$CURL_POST = json_encode($payment);
你可以发布一个代码示例,我们可以看到你是如何构建的API调用? – 2013-03-16 13:56:13
有一个简单的例子,我使用cURL来处理PayPal付款。其他一切正常,访问令牌,创建/执行付款......我无法让我的购物车在订单汇总部分使用RESTful API显示 – bbullis 2013-03-16 14:06:06