我正在尝试在Paypal交易显示页面中显示收货地址 但它不起作用。它仅显示付款金额和货款,但不显示发货地址。
以前它可以正常工作,但是在更改凭据后它不起作用。
Node JS:
let PayPal = require('../../node_modules/paypal-express-checkout-simple/index');
.
.
paypal.setExpressCheckoutPayment(
configSite.paypalMerchantAccount,
invoice,
total,
total_ship_cost,
'',
'USD',
returnUrl,
cancelUrl,
false,
JSON.parse(req.body.shippingAddress), //passing Shipping address
(err, data) => {
if (err) {
console.log(' Pay Error 1 - ' + err);
res.status(500).send(err);
return;
} else {
//Some code
}
}
);
.
.
定制的Paypal库:
Paypal.prototype.setExpressCheckoutPayment = function(email, invoiceNumber, amount, totalShipCost, description, currency, returnUrl, cancelUrl, onlyPayPalUsers, shipAddress , callback) {
.
.
.
params.NOSHIPPING = 1;
params.ALLOWNOTE = 1;
params.REQCONFIRMSHIPPING = 1;
params.METHOD = 'SetExpressCheckout';
params.PAYMENTREQUEST_0_SHIPTONAME= shipAddress.name ;
params.PAYMENTREQUEST_0_SHIPTOSTREET= shipAddress.address_line1;
params.PAYMENTREQUEST_0_SHIPTOSTREET2 = shipAddress.address_line2;
params.PAYMENTREQUEST_0_SHIPTOCITY=shipAddress.city;
params.PAYMENTREQUEST_0_SHIPTOSTATE=shipAddress.state;
params.PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE='US';
params.PAYMENTREQUEST_0_SHIPTOZIP=shipAddress.pincode;
.
.
.
}
任何人都可以帮忙吗?预先感谢。