我已经下载了 paypal mpl 并使用 phonegap 默认示例来测试沙箱。
我只是从示例中更改这些行
obj.paymentAmount = document.getElementById('pmt_subtotal').value;
obj.paymentCurrency = document.getElementById('pmt_currency').value;
obj.recipient = document.getElementById('pmt_recipient').value;
obj.merchantName = document.getElementById('pmt_merchant').value;
obj.itemDesc = document.getElementById('pmt_description').value;
obj.memo = document.getElementById('pmt_memo').value;
obj.tax = document.getElementById('pmt_tax').value;
obj.shipping = document.getElementById('pmt_shipping').value;
用这个静态值
var obj = {
server : 'ENV_SANDBOX',
appId : 'APP-80W284485P519543T'
};
obj.paymentAmount = 10.0;
obj.paymentCurrency = 'USD';
obj.recipient = 'moin_k_1347963077_biz@yahoo.com';
obj.merchantName = 'Test Test';
obj.itemDesc = 'something';
obj.memo = 'something';
obj.tax = 0;
obj.shipping = 0;
当我点击 paypal pay 按钮时,它会引发错误
"The application is not approved to use the following parameters with this type of payment".
这是完整的 Eclipse 项目http://marinefreshbd.com/paypal/Paypal.zip