Class: Spree::Gateway::BraintreeVzeroPaypalExpress
- Inherits:
-
BraintreeVzeroBase
- Object
- BraintreeVzeroBase
- Spree::Gateway::BraintreeVzeroPaypalExpress
- Defined in:
- app/models/spree/gateway/braintree_vzero_paypal_express.rb
Instance Method Summary collapse
- #find_identifier_hash(payment, utils) ⇒ Object
- #method_type ⇒ Object
- #push_order_to_state(order, state, email) ⇒ Object
Instance Method Details
#find_identifier_hash(payment, utils) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'app/models/spree/gateway/braintree_vzero_paypal_express.rb', line 19 def find_identifier_hash(payment, utils) token = payment[:braintree_token] || vaulted_token_by_email(payment, utils) if token.present? { payment_method_token: token } else { payment_method_nonce: payment[:braintree_nonce] } end end |
#method_type ⇒ Object
9 10 11 |
# File 'app/models/spree/gateway/braintree_vzero_paypal_express.rb', line 9 def method_type 'braintree_vzero_paypal_express' end |
#push_order_to_state(order, state, email) ⇒ Object
13 14 15 16 17 |
# File 'app/models/spree/gateway/braintree_vzero_paypal_express.rb', line 13 def push_order_to_state(order, state, email) order.update_column(:email, email) order.next! until order.state.eql?(state) order.update_column(:email, nil) end |