我正试图让PayPal的链式付款在他们的沙盒环境中运行。但是,每当我在登录后的最后阶段点击“付款”时,我总会被重定向到一个页面,其中包含一般错误消息“您的付款无法完成。请返回参与网站,然后重试。”
我尝试使用相同的结果进行链式和并行付款。 我还跟踪了网络上的一些建议,这些建议调整了商家帐户设置,确保在“已屏蔽”选项下取消选中某些字段。还要检查货币和国家/地区代码。最初的国家代码是en_GB和货币GBP,这不起作用我尝试用USD进行en_US但是在所有情况下我得到相同的消息。
我也试过添加一个IPN网址,因为PayPal会向它发布一些错误代码/消息但是得到了nadda!如果单击“返回测试存储”,它将转到取消URL,而不包含任何POST / GET参数。
我正在使用http://paypal.github.io/#adaptive-payments-tab-php-5-3
中的PHP SDK
所以问题是,是否有人建议我如何找出究竟出了什么问题或者我可以尝试修复的其他事情?
答案 0 :(得分:0)
我在沙箱环境中遇到此问题,因为我没有包含应用程序ID。我使用了APP-80W284485P519543T
,其中一个示例表示为 Sandbox应用程序ID,然后就可以了。
答案 1 :(得分:0)
Mobile Payments Library Developer Guide and Reference
–
Android OS
Edition
Oct 2016
5
Preface
**Important:
The Mobile Payments Library is based on the PayPal Adaptive Payments API.
As of October 6, 2016, Adaptive Payments is now a limited releas
e product. It is restricted to
select partners for approved use cases and should not be used for new integrations without guidance from PayPal**
=============================================
first implement method
private void initLibrary() {
PayPal pp = PayPal.getInstance();
if(pp == null) {
pp = PayPal.initWithAppID(this, PAYPAL_APP_ID, PayPal.ENV_SANDBOX);
pp.setLanguage("en_US"); // Sets the language for the library.
pp.setFeesPayer(PayPal.FEEPAYER_EACHRECEIVER);
// pp.setShippingEnabled(true);
pp.setDynamicAmountCalculationEnabled(false);
}
}
**paypal button click event code**
double secondary_payment = 0;
double primary_payment = 0;
PayPalAdvancedPayment advPayment = makeChainedPayment(secondary_payment,primary_payment,"primary_email","secondary_email");
Intent checkoutIntent = PayPal.getInstance().checkout(advPayment, your_current_activity);
startActivityForResult(checkoutIntent, 1);
=============================================
private PayPalAdvancedPayment makeChainedPayment(double priceSecondary, double pricePrimary, String primary_email, String secondary_email) {
PayPalAdvancedPayment payment = new PayPalAdvancedPayment();
payment.setCurrencyType("USD");
// payment.setMerchantName("PushND");
BigDecimal bigDecimalPrimary=new BigDecimal(pricePrimary);
PayPalReceiverDetails receiverPrimary = new PayPalReceiverDetails();
receiverPrimary.setRecipient(primary_email);
//receiverPrimary.setRecipient("adaptive_receiver_1@pushnd.com");
receiverPrimary.setSubtotal(bigDecimalPrimary);
receiverPrimary.setIsPrimary(true);
payment.getReceivers().add(receiverPrimary);
PayPalReceiverDetails receiverSecondary= new PayPalReceiverDetails();
receiverSecondary.setRecipient(secondary_email);
BigDecimal bigDecimalSecond=new BigDecimal(priceSecondary);
receiverSecondary.setSubtotal(bigDecimalSecond);
payment.getReceivers().add(receiverSecondary);
return payment;
}