gpt4 book ai didi

android - 如何在 MPL android 中获取 PayPal 交易详情

转载 作者:行者123 更新时间:2023-11-29 00:06:00 25 4
gpt4 key购买 nike

我正在使用 MPL 进行自适应支付。一切正常,但我想要 PayPal 交易详情,但它在付款后仅返回 paykey 作为响应。

    public void PayPalActivityResult(int requestCode, int resultCode, Intent intent) {
switch (resultCode) {
case Activity.RESULT_OK:
// The payment succeeded
String payKey = intent.getStringExtra(PayPalActivity.EXTRA_PAY_KEY);
Log.d("payKey", payKey+"");
this.paymentSucceeded(payKey);
break;
case Activity.RESULT_CANCELED:
this.paymentCanceled();
break;
case PayPalActivity.RESULT_FAILURE:
String errorID = intent.getStringExtra(PayPalActivity.EXTRA_ERROR_ID);
String errorMessage = intent.getStringExtra(PayPalActivity.EXTRA_ERROR_MESSAGE);
this.paymentFailed(errorID, errorMessage);
}
}

所以有任何解决方案可以通过 paykey 或其他方式获取交易详细信息。

请给我一些建议或解决方案。

最佳答案

我通过即时付款通知 (IPN) 获得了 Paypal 交易详情。我设置了一个 IPN URL,例如:-

PayPalAdvancedPayment advPayment = new PayPalAdvancedPayment();
/*
some block of code
*/

advPayment.setIpnUrl("IPN-Url");// this additional line i have attached to make code

然后它将交易详情发送到我的服务器。

关于android - 如何在 MPL android 中获取 PayPal 交易详情,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33739345/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com