简体   繁体   English

如何在PayPal网站付款专业版上测试信用卡交易的买方方?

[英]How to test buyer side of a Credit Card transaction on PayPal Website Payments Pro?

We are running an e-commerce web site on Ruby on Rails and for the processing of Credit Cards we use the ActiveMerchant plugin to interface to our PayPal Website Payments Pro account using our API credentials. 我们正在Ruby on Rails上运行一个电子商务网站,为了处理信用卡,我们使用ActiveMerchant插件通过我们的API凭证连接到PayPal网站Payments Pro帐户。

As part of the checkout process we first call the authorize function on our gateway object and then, after some further checks, we perform the capture part. 作为结帐过程的一部分,我们首先在网关对象上调用authorize函数,然后在进行进一步检查后执行捕获部分。

We have lately been experiencing a bug where an amount gets reserved twice on a customer's account: one charge being only the authorization and the second being the final purchase. 我们最近遇到了一个错误,该错误在客户的帐户上保留了两次金额:一次仅是授权费用,第二次是最终购买费用。 So to the client it looks like we are billing him twice (once for authorization, once for final purchase) while we are actually receiving the money only once and the "second charge" on his account is simply an authorization that we don't clear for some reason. 因此,对于客户来说,好像我们要向他开两次帐单(一次授权,一次最终购买),而实际上我们只收到一次款项,而他帐户上的“第二笔费用”仅仅是我们不清除的授权由于某些原因。 (This seems to happen particularly when PayPal FMF rejects our transaction and we re-process.) (尤其是当PayPal FMF拒绝我们的交易并重新处理时,这种情况似乎发生了。)

I am trying to troubleshoot this by creating PayPal Sandbox Accounts for Buyer and for Seller. 我正在尝试通过为买方和卖方创建PayPal沙箱帐户来解决此问题。 I am running through the code line by line via Rails Console and simulating different conditions to try and replicate the error. 我正在通过Rails Console逐行运行代码,并模拟不同的条件来尝试并复制错误。 However, my successful Credit Card transactions only appear in my "seller"/"merchant" account and not in the "buyer" account on the PayPal Sandbox so I cannot see what the effect of my code sequence is having on a customer's card. 但是,我成功的信用卡交易仅显示在我的“卖方” /“商人”帐户中,而不显示在PayPal沙盒上的“买方”帐户中,因此我看不到代码序列对客户卡的影响。 This post seems to indicate that that is just the way things are and that it is indeed not possible to test the effect on Buyer Credit Card side. 这篇文章似乎表明,事情就是这样,并且确实不可能测试对买方信用卡方面的影响。 This post suggests using PayPal Express Checkout but that is not what we need on our site as we're specifically looking at Credit Card transactions here that are integrated to our site. 这篇文章建议使用PayPal Express Checkout,但这并不是我们网站上所需要的,因为我们在这里专门研究与我们网站集成的信用卡交易。

How can I test the effect of my code on a client's Credit Card? 如何测试我的代码在客户信用卡上的效果? Is there perhaps something I missed in PayPal or is there maybe some mode/log/monitor in ActiveMerchant that I can use to see this? 也许我在PayPal中错过了一些东西,或者在ActiveMerchant中有一些模式/日志/监视器可以用来查看此信息? I need to find the line of code that is causing us to authorize twice. 我需要找到导致我们两次授权的代码行。

If the initial transaction is being rejected by FMF, and then you reattempt another transaction this would cause a second hold on the buyers card as this would be a completely different transaction attempt. 如果初始交易被FMF拒绝,然后您重新尝试另一笔交易,则这将导致买家卡被第二次冻结,因为这将是完全不同的交易尝试。 The bank may have approved the first transaction, but then the FMF filters declined it based on your settings. 银行可能已经批准了第一笔交易,但是FMF过滤器根据您的设置拒绝了它。 As far as the bank is concerned, it is still a valid charge that was approved. 就银行而言,它仍然是已批准的有效费用。 So when you run your second attempt, this will cause a second hold on the card for the same amount but for a different transaction. 因此,当您进行第二次尝试时,这将导致第二次持卡,金额相同但交易不同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM