Closed goodforever closed 5 years ago
Hi @goodforever,
Sorry for the late response!
Since payments created via hosted payment pages (which Mollie uses) work a little different compared to "traditional" Spree payments, we created several override in the payment processing module.
The first call that's made when processing the actual payment is done in the process!
method.
After that, we create a new payment by calling the process_with_mollie
in the same module. This will retrieve some data we need to create the actual Mollie payment.
Using this data, we make a call to the Mollie gateway class: create_transaction
.
If you want to follow the rest of the payment flow, the best way to step through the process would be to set a breakpoint in the payment processing decorator. 👍
I understand that this might be a little confusing at first. I wrote an in-depth article on the Mollie blog a couple of months ago that explain why we had to make certain overrides to Spree modules. You can read it here: Better payments for Spree Commerce.
Hope this helps! Please let me know if you have any additional questions.
Closing this for now. Feel free to reopen it if you run into any issues.
I read checkout.md , at Creating a new payment step , which func is called in spree-mollie-gateway ? what is its params ?
checkout.md in following: Creating a new payment When you're about to advance your order to the payment state, you can do so by calling:
curl -X "PUT" "http://localhost:3000/api/v1/checkouts//next" \
-H 'X-Spree-Token: '