嵌入式付款和“此功能暂时不可用"错误 [英] Embedded payments and 'This function is temporarily unavailable' error
问题描述
我正在尝试实施嵌入式链式支付.
I am trying to implement Embedded chained payments.
我已经下载了PHP PayPal SDK,并且在没有嵌入式选项的情况下也可以正常工作.当我尝试将其嵌入时会出现问题:
I have downloaded PHP PayPal SDK and it works fine without embedded option. The problem comes when I try to do it embedded:
我用SDK获得我的payKey.它返回如下内容:
I get my payKey with sdk. It returns something like:
付款-回应 responseEnvelope.timestamp:2012-09-30T16:30:09.512-07:00 responseEnvelope.ack:成功 responseEnvelope.correlationId:297f1e4a38b63 responseEnvelope.build:3779320 payKey:AP-9EB01133M3012281Y paymentExecStatus:已创建 *重定向URL以完成付款
Pay - Response responseEnvelope.timestamp: 2012-09-30T16:30:09.512-07:00 responseEnvelope.ack: Success responseEnvelope.correlationId: 297f1e4a38b63 responseEnvelope.build: 3779320 payKey: AP-9EB01133M3012281Y paymentExecStatus: CREATED * Redirect URL to Complete Payment
(链接的引用: https://www.sandbox.paypal.com/webscr&cmd=_ap-payment&paykey=AP-9EB01133M3012281Y )
然后,我复制支付密钥(AP-9EB01133M3012281Y)并粘贴到以下html代码上:
Then, I copy the paykey (AP-9EB01133M3012281Y) and I paste on this html code:
<script type="text/javascript" src="https://www.paypalobjects.com/js/external/dg.js"></script>
<form action= "https://www.sandbox.paypal.com/webapps/adaptivepayment/flow/pay" target="PPDGFrame">
<input id="type" type="hidden" name="expType" value="light"></input>
<input id="paykey" type="hidden" name="paykey" value="AP-3GH99339RW1696440"> </input>
<button id="submitBtn" value="Pay with PayPal"><p style="font-size:20px">Pay</button>
</form>
<script>var dgFlow = new PAYPAL.apps.DGFlow({ trigger: 'submitBtn' });</script>
当我单击按钮时,iframe会正确显示,但会出现错误:交易已取消.此功能暂时不可用". 如果单击取消"按钮,则可以正确地重定向到我的sdk页面(如果我不需要嵌入它,则相同)
When I click the button, the iframe is shown right, but an error appears: "Transaction Cancelled. This function is temporarily unavailable". If I click the cancel button, I am redirect correctly to my sdk page (the same if I wouldn't have do it embedded)
我正在使用沙箱.
推荐答案
在创建PayRequest消息时不设置senderEmail应该可以解决此问题.看来,贝宝(PayPal)嵌入式流程要求买方/发送者在贝宝(PayPal)上手动插入他/她的电子邮件.
Not setting the senderEmail when you create the PayRequest message should resolve the issue. It seems the PayPal embedded flow requires the buyer/sender to insert his/her email manually on PayPal.
这篇关于嵌入式付款和“此功能暂时不可用"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!