concretecms-community-store / community_store_mollie

Adds the Mollie payment gateway to Community Store
MIT License
0 stars 3 forks source link

bugfix - immediately redirect to mollie checkout url #4

Closed wardhache closed 4 years ago

wardhache commented 4 years ago

@Mesign, @Jozzeh, @Mesuva

Here is the fix for the error that @Mesign was getting on checkout: "The form has expired". The solution seemed to be that we immediately should have redirected to the mollie checkout, rather than go through the redirect form automatically provided by Community Store.

The first commit was just for my own sake, because the difference in tabs (2 vs 4 spaces) was bugging me.

The other issues that slipped through the update I did a few months ago seemed to have been a wrong parameter type in the method getByMolliePaymentID, and a wrong check if order exists on redirecting to the complete page.

I hope this solves al your issues. I tested it on Concrete5 8.5.4 with PHP 7.4. I did also remove all nullable return type to make it compatible with PHP 7.0

Maybe test this in a local environment first, I would like a second pair of eyes to resolve all open issues.

Thanks!