我需要向PayPal发送自定义参数,然后使用IPNPaypal接收。
我添加了输入
<input type="hidden" name="custom" id="custom" value="MyData">
<div id="paypal-button">
<input type="hidden" name="custom" id="custom" value="MyData">
</div>
或者我需要在paypal.Button.render中添加此参数?
paypal.Button.render({
env: 'sandbox', // or 'production'
commit: true, // This will add the transaction amount to the PayPal button
payment: function () {
return paypalCheckoutInstance.createPayment({
flow: 'checkout', // Required
amount: newPrice, // Required
currency: currency, // Required
// custom: 'Thisfromrender', not working as well
locale: 'en_US', // PayPal popup language
landingPageType: 'billing', //billing is for guest, login is for PayPal
enableShippingAddress: true,
shippingAddressEditable: false
});
},
onAuthorize: function (data, actions) {....
我缺少什么?