the button redirect to a wrong checkout URL
-
Hy,
I installed and configured the plugin.
When I want to pay a booking, the payment URL given after clicking the button is wrong.Despite this, I can see the transaction coming in Mollie.
In the transaction details in Mollie, I can see the payment url (which is different from the payment url behind the button).
This payment URL in Mollie is correct.
If I go to this URL, the payment is possible.
If I make the payment, the return to wordpress is OK (callback URL and webhook), the booking goes to paid status.With the test or production API key, the problem is the same.
Last vesrion of wordpress, events manager, events manager Pro and Mollie gateway plugin.Did I make a wrong configuration?
For information : I use bancontact as a payment method on Mollie.It seems that the only problem with my configuration is the payment url given by clicking on the button on wordpress.
Thank you in advance,
Steve.
-
Hi Steve,
Thank you for reaching out. Do you have a live link to your site, so I can take a look as well, please?
The checkout URL (redirection to the Mollie Payment page) is created by the Mollie API and is different for every payment.
Could you post the link behind the button and the one in your Mollie Dashboard?
Hi Steve,
I just checked my own Mollie Dashboard, but the URL that the customer is redirected to for the payment is not shown anywhere.
There are two URLs in the Dashboard…Redirect URL:
https://your-website.org/events/event-name/?em_mollie_return=EM_Booking_ID
This where Mollie redirects your customer back to after the payment.Webhook URL:
https://your-website.org/wp-admin/admin-ajax.php?action=em_payment&em_payment_gateway=mollie
Mollie calls the webhook, so that your server can process the payment details.Patrick.
Thanks for the quick answer.
With the test API Key
The bad link generate with the button : https://www.mollie.com/paymentscreen/testmode/?resource=payment&id=tr_Me3PQUTvDW&mode=test&amount=%5Bobject+Object%5D&settlementAmount=%5Bobject+Object%5D&amountRefunded=null&amountRemaining=null&description=billetterie+La+collaboration+interdisciplinaire+au+c%C5%93ur+du+quotidien+des+professionnels&method=bancontact&status=open&createdAt=2021-04-01T18%3A06%3A16%2B00%3A00&paidAt=null&canceledAt=null&expiresAt=2021-04-01T19%3A06%3A16%2B00%3A00&failedAt=null&profileId=pfl_xNDa4HQmCd&sequenceType=oneoff&redirectUrl=https%3A%2F%2Fbilletterie.vinci.be%2F%3Fem_mollie_return%3D42&webhookUrl=https%3A%2F%2Fbilletterie.vinci.be%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dem_payment%26em_payment_gateway%3Dmollie&mandateId=null&subscriptionId=null&orderId=null&settlementId=null&locale=fr_FR&metadata=%5Bobject+Object%5D&details=null&restrictPaymentMethodsToCountry=null&_links=%5Bobject+Object%5D&_embedded=null&isCancelable=false&amountCaptured=null&applicationFeeAmount=null&authorizedAt=null&expiredAt=null&customerId=null&countryCode=null
The good link than I can see in Mollie : https://www.mollie.com/paymentscreen/testmode/?method=mistercash&token=2.39uq46With the live API Key
The bad link generate with the button : https://bancontact.girogate.be/bi/t2bc?resource=payment&id=tr_cfUPHaMEr9&mode=live&amount=%5Bobject+Object%5D&settlementAmount=%5Bobject+Object%5D&amountRefunded=null&amountRemaining=null&description=billetterie+La+collaboration+interdisciplinaire+au+c%C5%93ur+du+quotidien+des+professionnels&method=bancontact&status=open&createdAt=2021-04-01T18%3A15%3A31%2B00%3A00&paidAt=null&canceledAt=null&expiresAt=2021-04-01T19%3A15%3A31%2B00%3A00&failedAt=null&profileId=pfl_xNDa4HQmCd&sequenceType=oneoff&redirectUrl=https%3A%2F%2Fbilletterie.vinci.be%2F%3Fem_mollie_return%3D44&webhookUrl=https%3A%2F%2Fbilletterie.vinci.be%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dem_payment%26em_payment_gateway%3Dmollie&mandateId=null&subscriptionId=null&orderId=null&settlementId=null&locale=fr_FR&metadata=%5Bobject+Object%5D&details=null&restrictPaymentMethodsToCountry=null&_links=%5Bobject+Object%5D&_embedded=null&isCancelable=false&amountCaptured=null&applicationFeeAmount=null&authorizedAt=null&expiredAt=null&customerId=null&countryCode=null
The good link than I can see in Mollie : https://bancontact.girogate.be/bi/t2bc?tx=900741889&rs=HHYXMXJBLXw3rgzk9FUcY8uGpGU7Jryx&cs=4d79ea91abf0615f62c5f0c7a36931ae99a3dcbf700246317cc0b669eb58ad9fThe WebHook and the metadata are OK in mollie because if I pay with de good link (from Mollie) the process is OK in wordpress (the booked is mentionned as payed).
It seems that the script fails to interpret the arguments in the URL…
A missing package on the server?The good link, the bad link, where is the ugly 🙂
Please tell me where in the Mollie Dashboard you found these URLs. I am unable to find anything similar in my own Dashboard.
Since there is no live link, what button do you mean exactly? Are you using Quick Payment Buttons?
Here is the complete scenario:
I install and configure events manager, events manager pro, mollie payment plugin for events manager pro.
I activate only the Mollie payment gateway.I create a event and set a price for it.
I log in as a user and book a paid event by clicking on the “Book” link on this page: https://zupimages.net/up/21/13/ddvb.png
I am redirected to a wrong checkout URL: example of wrong URL message above. It’s impossible for the user to make the payment with the wrong URL (the result on the wrong URL is “page not found”)
I log into Mollie and I can see this transaction here: https://zupimages.net/up/21/13/tidg.png
If I click on the transaction, I can see the details of the transaction : https://zupimages.net/up/21/13/pka0.png
The payment url (here in test mode, but I have the same problem with Live Key) is different from the payment URL behind the wordpress “Book” button.
If I go to the good payment url (the one from mollie), I can pay (or simulate a payment in test mode) and the return to word press is OK.
https://zupimages.net/up/21/13/cxn1.png
And my booking is mentionned as payed in wordpress.
The same problem with or without the “quick paiement button”
Thank you for the extensive explanation. I really appreciate that.
See this screen shot of my dashboard: https://snipboard.io/iRSfuE.jpgLooking at your screenshots, it looks like the Events Manager booking form is in single bookings mode with multiple tickets (not single ticket mode) and I noticed that you only have BanContact / MisterCash as an activated payment method.
Normally the customer would be redirected to a payment screen listing all activated payment methods, but with only one option Mollie probably skips that…
I have raised this issue at Mollie support as well, since you are the first to have the wrong url in live mode.
If you indeed use a single payment method, I could give you a tiny code change that might solve it.
One more question…
Some themes load the page trough javascript / jQuery. Could please tell me which theme you are using?Thanks,
The theme is very basic, it’s the “Twenty Twenty”.
You are right I’m in “multiple tickets mode”.
I have test with the “simple ticket mode”, the problem is the same.Yes, we have only one payement method activated in Mollie, only “BanContact / MisterCash”.
I you have a idea with a tiny code change, I really appreciate it.
Thanks,
Steve.
Adding this line will create a BanContact specific payment:
'method' => \Mollie\Api\Types\PaymentMethod::BANCONTACT,Paste this line in /wp-content/plugins/stonehenge-em-mollie/includes/class-gateway.php on line 135.
That section should then look like this:
$mollie = $EM_Mollie->start_mollie(); $request = $mollie->payments->create( array( 'method' => \Mollie\Api\Types\PaymentMethod::BANCONTACT, 'amount' => array( 'currency' => strtoupper( get_option('dbem_bookings_currency') ), value' => number_format( $EM_Booking->get_price(), 2) ), 'description' => $description, 'redirectUrl' => $this->get_mollie_return_url() . "?em_mollie_return={$EM_Booking->booking_id}", 'webhookUrl' => $this->get_payment_return_url(), 'locale' => get_locale(), // Set checkout page to blog's locale. 'sequenceType' => 'oneoff', // Default for single payment. 'metadata' => array( 'booking_id' => $EM_Booking->booking_id, 'name' => $EM_Booking->get_person()->get_name(), 'email' => $EM_Booking->get_person()->user_email, ), ));Youhoouuuuuu 🙂
You found the problem 🙂
Unfortunately, adding a ‘method’ attribute in the class-gateway.php doesn’t work BUT you are right, the problem was that I only had one payment method enabled in Mollie.
I activated another method and it works!
The first screen on Mollie is a screen where you can choose the payment method.
And it seems that Mollie doesn’t like it when you activate only one payment method.Tested with test and live API key, it’s now OK.
Thanks a lot for your help Patrick 🙂
Steve.
-
This reply was modified 4 years, 9 months ago by
elstevot.
I am very glas the the problem has been solved. And also good for me to know about the one payment method…
Enjoy the plugin. 🙂
-
This reply was modified 4 years, 9 months ago by
The topic ‘the button redirect to a wrong checkout URL’ is closed to new replies.