I also get this error: Could not retrieve order. OrderEndpoint.php:459
Hello @anantaraj
The screenshot is a big low res, but I can see that the “Place Order” button is not the correct button for using our plugin/payment method. When you select our payment method, a JavaScript is supposed to replace the WooCommerce button with our (yellow by default) PayPal button. The theme can block this activity from occurring, and this will lead to what you are experiencing and the error that comes along with it. So you need to figure out what is blocking this.
Now I also went to the checkout page and I also see that the card payment option, also does not work as it should. When you select the card payment option, there should be shown the fields to enter “Card number”, “date” and “CCV”, but nothing is showing. This will also not work like this; you might be using another page to fill in these details? I am not an expert in themes, but you might want to check out how the plugin functions when you use a standard theme, like Storefront. The card images should be possible to add in our plugin settings under the tab “advanced card processing” and selection them in the option “Show logo of the following credit cards”. For adding the PayPal logo you could use this code.
Let me know if this helps or if you have additional questions.
@ookris this error can be caused by many situations, and we don’t believe we know all the causes yet at this moment. I would suggest opening your own thread or opening a private support request with us privately via these instructions.
Kind regards,
Joost
Hello, i got the same issue.
The custom theme we used are deregistering the standard jquery version (wp_deregister_script(‘jquery’);) and include a custom.
Removing this custom version and adding wp_enqueue_script(‘jquery’); in function.php will resume this issues.
If it can help
Hi, I have the same error. In my case, it is the Borlabs Cookies plugin that seems to be causing the problem. Once I disable it, the PayPal buttons load and the error is gone.
Turned on, the PayPal buttons are not rendered (the PayPal div wrapper is empty) the default “Buy Now” button is what causes the error when clicked.
Any idea how to stop borlabs cookies from affecting in the checkout page?
Cheers
Hello @forty1981
this sound like something that you should ask the developer of the Borlabs plugin.
Kind regards,
Joost
@joostvandevijver , Yes I see there is a JavaScript error in my site, At first when the page loads at checkout page the error will comes from the button.js (from the woo commerce PayPal payment plugin ) and later it is overrides by the spinner.js, that’s the reason I think the PayPal button is not showing.
Now, how to handle these type of error, though its first time I am facing such kind of issue in my sites.
@digeek I cannot get you properly, Though I tried the same approached as you said, nothing changed in my checkout page.
Can you bit guide me, since you have solved this kind of issue in the site previously .
Thank you
Hello,
This thread was opened for the situation where the WooCommerce button was utilized instead of the PayPal button. This was addresses and should be resolved by conflict testing. The error “Could not Retrieve order” can be caused by many other situations, so if you require additional PayPal Payments support, I suggest you open a new thread or reach out to our dedicated support team via instruction for this here: https://paypal.inpsyde.com/docs/request-support/
This thread will be marked as resolved.
Kind regards,
Joost
Hello @anantaraj
If you are still with this problem, I would advise you to open a private support threat with us, so we can take a closer look (as advised above).
My apologies if you did not get to a solution at this point, but the thread got hijacked a bit, and it got closed off (since the cause was identified).
Kind regards,
Joost
@joostvandevijver , Yes I cannot figure it out by myself, I have also send a private support as per you said.
Actually, @joostvandevijver really helps me to solve the issue, the issue was from the custom theme jquery issue, which was preventing paypal button to show,
After deregistering the jquery from the theme it start working.
function remove_custom_jquery() {
wp_deregister_script(‘ghd-jquery’);
}
add_action(‘wp_enqueue_scripts’, ‘remove_custom_jquery’, 999);
this code deregister the custom theme scripts.
For Paypal Image
function woocommerce_paypal_payments_gateway_icon( $icon, $id ) {
if ( $id === ‘ppcp-gateway’ ) {
return ‘//your paypal image link wrap in img tag’;
} else {
return $icon;
}
}
add_filter( ‘woocommerce_gateway_icon’, ‘woocommerce_paypal_payments_gateway_icon’, 10, 2 );
For Debit and credit card image
function woocommerce_debitcard_payments_gateway_icon( $icon, $id ) {
if ( $id === ‘ppcp-card-button-gateway’ ) {
return ‘//your credit card image link wrap in img tag’;
} else {
return $icon;
}
}
add_filter( ‘woocommerce_gateway_icon’, ‘woocommerce_debitcard_payments_gateway_icon’, 10, 2 );
Actually, i need this function because I am using standard card processing, in Advance card processing you will find the option to show image in tab of “Advanced Card Processing”:
-
This reply was modified 3 weeks, 2 days ago by
anantaraj. Reason: code clarity