php paypal express checkout problem

前端 未结 1 1872
长情又很酷
长情又很酷 2021-01-05 08:43

I\'m trying to integrate paypal express checkout on my website. I was trying to check using sandbox. When I submit data from my site token is generated with no error but whe

1条回答
  •  时光说笑
    2021-01-05 09:23

    As you're not passing so called 'line item details' (product data), PayPal doesn't display the total amount.

    If you only want to show the amount for the current purchase, redirect buyers to https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-xxxxxx&useraction=commit (instead of https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-xxxxx)

    If you want to start sending line-item details to PayPal, include the following in your SetExpressCheckout API request:

    // Total amount of the purchase, incl shipping, tax, etc  
    PAYMENTREQUEST_0_AMT=300.0  
    // Total amount of items purchased, excl shipping, tax, etc     
    PAYMENTREQUEST_0_ITEMAMT=300.0  
    // Authorize the funds first (Authorization), or capture immediately (Sale)?    
    PAYMENTREQUEST_0_PAYMENTACTION=Sale  
    // First item  
    L_PAYMENTREQUEST_0_NAME0=Item1  
    L_PAYMENTREQUEST_0_QTY0=1  
    L_PAYMENTREQUEST_0_AMT0=100.00  
    // Second item  
    L_PAYMENTREQUEST_0_NAME1=Item2  
    L_PAYMENTREQUEST_0_QTY1=1  
    L_PAYMENTREQUEST_0_AMT1=200.00 
    

    If you want to see this in your own history as well, you'll also need to include this in DoExpressCheckoutPayment.

    0 讨论(0)
提交回复
热议问题