Express Checkout Buttons Issue

mukeshsachdev
Contributor
Contributor

Hello,

 

I have tried to integrate Express Checkout Button into my Meteor JS Application and what I got is it works well in the browser version and when I have tested in Android Real Devices and IOS too it gives me error. Window is closing on initialisation of Buttons.

 

Please help me out with this. Following is the code I have used.

 

1. Added this script in head of html

<script src="https://www.paypal.com/sdk/js?client-id=ClientID"></script>

 

2. Used this code to render the button and get them onto my app window

paypal.Buttons({
createOrder: function(data, actions) {
// Set up the transaction
return actions.order.create({
purchase_units: [{
amount: {
value: '65.00',
currency: 'USD'
}
}]
});
},
onApprove: function(data, actions) {
// Capture the funds from the transaction
return actions.order.capture().then(function(details) {
// Show a success message to your buyer
alert('Transaction completed by ' + details.payer.name.given_name);
console.log(details);
});
}
}).render('#paypal-button');

 

The above code is working well in browser but when it runs on Android Devices and IOS it gives error.

 

1. js:1 Uncaught Error: Message recieved in closed window

2. buttons?style.label=paypal&style.layout=vertical&style.color=gold&style.shape=rect&style.tagline=fa…:791 Uncaught Error: Target window is closed

 

Is Express Buttons are supported in Real devices?

 

Thank You,

 

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.