solidus

https://github.com/solidusio/solidus

Ruby

🛒 Solidus, the open-source eCommerce framework for industry trailblazers.

Spree::Order::Payments#process_payments!

processes any pending payments and must return a boolean as it's
return value is used by the checkout state_machine to determine
success or failure of the 'complete' event for the order

Returns:

- true if all pending payments processed successfully

- true if a payment failed, ie. raised a GatewayError
  which gets rescued and converted to TRUE when
  :allow_checkout_gateway_error is set to true

- false if a payment failed, ie. raised a GatewayError
  which gets rescued and converted to FALSE when
  :allow_checkout_on_gateway_error is set to false

Source | Google | Stack overflow

Edit

git clone [email protected]:solidusio/solidus.git

cd solidus

open core/app/models/spree/order/payments.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Spree--Order--Payments-process_payments--for-pr


# Commit to git

git add core/app/models/spree/order/payments.rbgit commit -m "better docs for Spree::Order::Payments#process_payments!"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Spree--Order--Payments-process_payments--for-pr

hub pull-request


# Celebrate!