solidus
https://github.com/solidusio/solidus
Ruby
🛒 Solidus, the open-source eCommerce framework for industry trailblazers.
Spree::Payment::Processing#process!
"process!" means:
- Do nothing when:
- There is no payment method
- The payment method does not require a source
- The payment is in the "processing" state
- 'auto_capture?' is false and the payment is already authorized.
- Raise an exception when:
- The source is missing or invalid
- The payment is in a state that cannot transition to 'processing'
(failed/void/invalid states). Note: 'completed' can transition to
'processing' and thus calling #process! on a completed Payment
will attempt to re-authorize/re-purchase the payment.
- Otherwise:
- If 'auto_capture?' is true:
- Call #purchase on the payment gateway. (i.e. authorize+capture)
even if the payment is already completed.
- Else:
- Call #authorize on the payment gateway even if the payment is
already completed.Edit
git clone [email protected]:solidusio/solidus.git
cd solidus
open core/app/models/spree/payment/processing.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Spree--Payment--Processing-process--for-pr
# Commit to gitgit add core/app/models/spree/payment/processing.rbgit commit -m "better docs for Spree::Payment::Processing#process!"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Spree--Payment--Processing-process--for-pr
hub pull-request
# Celebrate!