从IOS收到Paypal自适应付款Pay密钥验证 [英] Paypal Adaptive payment Pay key validation received from IOS

查看:122
本文介绍了从IOS收到Paypal自适应付款Pay密钥验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的应用中,我们使用的是 IOS MPL库进行并行付款.从IOS获得付款密钥后,当我尝试使用PHP应用程序对其进行验证时,它显示了以下错误:

In our app we are using IOS MPL library to make the parallel payment. After I get the pay key from the IOS, when I tried to validate it using PHP app, it shows me the following error:

 [error] => Array
        (
            [0] => ErrorData Object
                (
                    [errorId] => 540031
                    [domain] => PLATFORM
                    [subdomain] => Application
                    [severity] => Error
                    [category] => Application
                    [message] => You do not have permission to get these payment details
                    [exceptionId] => 
                    [parameter] => 
                )

        )

但是,如果我使用PHP Adaptive Payment API创建并行付款,则可以验证Paykey并获得正确的收据.

But If I create a parallel payment using PHP Adaptive payment API, I am able to validate the paykey and get the correct receipt.

我还发现了当我尝试在PHP中创建并行支付时,它要求我提供应用程序ID,API用户名,API密码和API签名.但是,当我们使用IOS MPL库时,它只是询问App ID.在沙盒模式下,我们始终使用相同的APP ID-APP-80W284485P519543T,这对于所有(通用)都是相同的.然后,应用程序将如何知道识别谁打了电话?

Also what I found is when I try to create the parallel payment in PHP it asks me for App ID, API Username, API Password and API signature. But when we use IOS MPL libarary it just asks for App ID. In sandbox mode we always use same APP ID - APP-80W284485P519543T, which is same for all(universal). Then how the app will know identify who has made the call?

当我使用PHP应用程序在沙盒模式下创建付款,并尝试使用其他"API凭据"验证交易时,出现相同的错误您无权获取这些付款详细信息",我当我们尝试使用IOS Pay密钥时收到.

When I create a payment in sandbox mode using PHP application, and try to validate the transaction using a different "API credentials", then I get the same error "You do not have permission to get these payment details", which I receive when we try to do with IOS Pay key.

推荐答案

以下是我从Paypal收到的回复: 这是发件人的iPhone应用程序通过MPL sdk库制作的AP txn. api调用者是发送者.

Here is the reply I get from the Paypal: This is AP txn made through MPL sdk library from an iPhone app of the sender. The api caller is the sender.

并行支付中的接收者是不同的.

The receivers in the parallel payment are different.

当接收方A/C之一进行PaymentDetails api调用时,他是此调用的api调用者.因此,对于API调用者可以在paymentdetails api中查看的信息几乎没有限制. 接收者的A/c持有人将只能查看其交易记录,因为他不是创建付款密钥的原始api调用者.

When one of receiver a/c made paymentdetails api call, he is the api caller for this call. So there are few restrictions on what info a api caller can view in paymentdetails api. The receiver a/c holder will be able to view only his leg of transaction since he is NOT the original api caller that created the payment key.

这就是为什么在付款细节API之后,您只能看到交易信息的一部分.

That's why after paymentdetails API, you can only see the leg of your transaction information.

我还问Paypal,MPL库中是否有一种方法可以定义商人的API凭证,可以在进行自适应支付时代替发送者的API来使用.他们说不,MPL库不是那样构建的.

Also I asked Paypal, if there is a way in MPL library to define the API credentials of the merchant which can be used while doing Adaptive payment instead of the sender's API. They said no, MPL library is not built like that.

因此,最后,我使用IPN呼叫解决了该问题.我没有通过验证从IOS设备获得的Pay密钥来更新数据库,而是这样做的:我已告诉IOS开发人员在自适应支付呼叫中发送IPN url.然后通过IPN网址更新数据库.

So finally, I have used IPN call to resolve the problem. Instead of updating the DB by validating the Pay key I get from the IOS device, what I did is: i have told the IOS developers to send the IPN url in Adaptive payment call. Then through the IPN url I update my database.

这篇关于从IOS收到Paypal自适应付款Pay密钥验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆