I am working in embedded adaptive preapproval payment now the issue I am facing is how to implement preapproval payment using light box.
I have implemented pay action by setting paykey using light box its working good, but same the thing I have followed with little modification in code for preapproval request was not working light box get hangs up. kindly let me know what I am missing here.
HTML code:
<html>
<head>
<script src="https://www.paypalobjects.com/js/external/dg.js" type="text/javascript"></script>
</head>
<body>
<form action="https://www.sandbox.paypal.com/webapps/adaptivepayment/flow/preapprovalkey" target="PPDGFrame" class="standard">
<label for="buy">Buy Now:</label>
<input type="image" id="submitBtn" value="Pay with PayPal" src="https://www.paypalobjects.com/en_US/i/btn/btn_paynowCC_LG.gif">
<input id="type" type="hidden" name="expType" value="light">
<input id="preapprovalkey" type="hidden" name="preapprovalkey" value="{{preapprovalkey}}">
</form>
<script type="text/javascript" charset="utf-8">
var dgFlow = new PAYPAL.apps.DGFlow({ trigger: 'submitBtn' });
</script>
</body>
</html>