Embedded payments and 'This function is temporarily unavailable' error

佐手、 提交于 2020-01-22 02:04:46

问题


I am trying to implement Embedded chained payments.

I have downloaded PHP PayPal SDK and it works fine without embedded option. The problem comes when I try to do it embedded:

I get my payKey with sdk. It returns something like:

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

(href of the link: https://www.sandbox.paypal.com/webscr&cmd=_ap-payment&paykey=AP-9EB01133M3012281Y)

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> 

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)

I am using sandbox.


回答1:


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.



来源:https://stackoverflow.com/questions/12666184/embedded-payments-and-this-function-is-temporarily-unavailable-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!