我正在使用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