I've been trying to switch over our classic express checkout to in-context express checkout.
As instructed, I've switched the URL to https://www.paypal.com/checkoutnow/
This is the HTML snippet in the cart:
<div class="col-md-6">
<a id="paypalcheckout" href="paypal_checkout/PostToPaypal.cfm?orderidentifier=XXXX">
<img class="paypal-button-hidden" src="/img/paypal.png" alt="" class="img-responsive center-block"/>
</a>
</div>
<script>
window.paypalCheckoutReady = function() {
paypal.checkout.setup("ZZZZ", {locale: 'en_US', environment: 'sandbox', button: ['paypalcheckout']});
}
</script>
<script async src="//www.paypalobjects.com/api/checkout.js"></script>
PostToPaypal.cfm makes the necessary api requests and gets back the EC-code and then redirects to this link:
https://www.sandbox.paypal.com/checkoutnow/2?incontext=1&token=EC-YYYY
The click results in a pop up window with the main window going dark. But after a few seconds, the pop up window makes the main page go to classic checkout and closes. It's letting me continue and checkout successfully with the old method. So I know the EC number is correct. Can anyone help me understand what I need to do to make in-context checkout work? Thank you in advance.
For me the issue was the CALLBACK
param when getting transaction id. When I removed it, it worked.