PayPal GURUS, i need a help, how to insert discount, i use REST API, may be some one, can show sample of code?Is there any way to send discount amount using PHP REST API?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
At this moment, discounts are not supported in the REST payments API. Your best bet would be to compute the discounted amount on your end and use that as the subtotal as transactions.amount.details.subtotal (https://developer.paypal.com/webapps/developer/docs/api/#create-a-payment).
It is a planned future enhancement, and the invoicing apis do support discounts. (https://developer.paypal.com/webapps/developer/docs/api/#create-an-invoice)