duankun9280 2013-08-07 17:36
浏览 64
已采纳

在Paypal上有项目描述和税收

I am currently working on a online store and I wanted to add Paypal as a checkout method. I started by using Express Checkout which worked fine until I tried to add taxes. The problem with Express Checkout is that I would need to calculate the taxes amount and send it with the rest on the information. My problem is that I need to know where the customer is from so I can adjust the tax amount. I tried to use Adaptive Payments but when it comes to the description of the order it only show the receivers (Ex: OnlineShop@something.ye) so I can not add the multiple items like I do with Express Checkout since this didn't worked out I did not try to see if the tax was working with this method.

So what I would like to know is...

  1. How can I get the address of the customer so I can show him the taxes in the order details with Express Checkout ?

  2. If this is not possible, is there a way I can change the order details of an Adaptive Payment ?

There is suppose to be a way to get the address before doing the DoExpressCheckout and change the tax amount there by using MAXAMT in SetExpressCheckout but the customer would only see the tax amount on my website and not in the Paypal page which I think is kind of odd.

Edit 1

Now that I've added a callback it's asking me for shipping flat rate.

Here is my request string...

'&METHOD=SetExpressCheckout'.
'&AMT='.$subTotal.
'&MAXAMT='.round($subTotal*1.13, 2,PHP_ROUND_HALF_EVEN).
'&RETURNURL='.$returnUrl.
'&CANCELURL='.$cancelUrl.
'&CALLBACK='.$callbackUrl.
'&CALLBACKTIMEOUT=10'.
'&L_SHIPPINGOPTIONISDEFAULT0=true'.
'&L_SHIPPINGOPTIONNAME0=FreeShipping'.
'&l_shippingOptionLabel0=FreeShipping'.
'&L_SHIPPINGOPTIONAMOUNT0=0.00'.
'&SHIPPINGAMT=0.00'.
'&CURRENCYCODE='.$currencyCode.
 $desc. //Contains every item description
'&TAXAMT=0.00'.
'&ITEMAMT='.$subTotal.
'&LOCALECODE=EN';

Edit 2

So now the SetExpressCheckout is working, but my callback request is not...

'&METHOD=Callback'.
'&L_AMT0='.
'&PAYMENT_0_REQUESTAMT='.round($subTotal*1.13, 2,PHP_ROUND_HALF_EVEN).
'&CURRENCYCODE='.$_SESSION['Currency'].
'&L_TAXAMT0='.round($subTotal*0.13, 2,PHP_ROUND_HALF_EVEN).
'&ITEMAMT='.round($subTotal*1.13, 2,PHP_ROUND_HALF_EVEN).
'&LOCALECODE=EN';

I tried Callback and CallbackRequest for the method and when I go on the page itself I always get "Method Specified is not Supported".

I don't really know what to try at this point.

  • 写回答

1条回答 默认 最新

  • duan19780629 2013-08-07 20:44
    关注

    You could use the CallBack API to update this correctly on the PayPal payment page. You would pass over an initial amount for the taxes/shipping. Then once the buyer enters in their address or signs into their account, the CallBack API would send the information to calculate the charges and display those to the buyer. You can find more on this in the developers guide starting on page 59.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突