Long connection time with Javascript SDK API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using following PayPal Javascript API SDK button.
When opening the payment website for the first time within a new web browser session, it takes about 30 seconds to connect to the PayPal service through the paypal button.
For each new refresh payment website it only takes a few seconds to connect to the paypal service. Please if you can help me with advice on how to reduce that first connection time to some reasonable limits.
I am using https environment for my html web site and only order function with paypal button without subscription.
Part of my javascript file with paypal button instance
PayPal = paypal.Buttons({
style: {
layout: 'vertical',
color: 'blue',
shape: 'rect',
label: 'paypal'
},
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{ amount: {currency_code:'EUR', value: ORDER_TOTAL } }]
});
},
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
log('Transaction completed by ' + details.payer.name.given_name,3);
});
},
onCancel: function (data) {
log("Payment cancel by user",3) ;
},
onError: function (err) {
log("Something goes wrong",3);
}
}).render('#paypal-button-container')
};
Thanks in advance,
Tomislav
- Labels:
-
REST SDK

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Error Connecting to GiveWp plugin - without prompt. in Sandbox Environment
- Uncaught ReferenceError: paypal is not defined in PayPal Payments Standard
- PayPal Checkout support is disabled in REST APIs
- What are basic create-paypal-order and capture-paypal-order files? in REST APIs
- Paypal is not defined (errorr) when making the payment integration live in PayPal Payments Standard