mollie / spree-mollie-gateway

Mollie payments for Spree Commerce.
https://www.mollie.com
16 stars 23 forks source link

Which function is called at first ? #30

Closed goodforever closed 5 years ago

goodforever commented 6 years ago

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: '

vernondegoede commented 6 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.

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.

vernondegoede commented 5 years ago

Closing this for now. Feel free to reopen it if you run into any issues.