Class: Yukon::PaypalExpressGateway
- Inherits:
-
Object
- Object
- Yukon::PaypalExpressGateway
- Defined in:
- lib/yukon/paypal_express_gateway.rb
Instance Method Summary collapse
-
#initialize(product, gateway) ⇒ PaypalExpressGateway
constructor
A new instance of PaypalExpressGateway.
- #set_express_checkout(express_checkout) ⇒ Object
Constructor Details
#initialize(product, gateway) ⇒ PaypalExpressGateway
Returns a new instance of PaypalExpressGateway.
3 4 5 6 |
# File 'lib/yukon/paypal_express_gateway.rb', line 3 def initialize(product, gateway) @product = product @gateway = gateway end |
Instance Method Details
#set_express_checkout(express_checkout) ⇒ Object
8 9 10 11 12 |
# File 'lib/yukon/paypal_express_gateway.rb', line 8 def set_express_checkout(express_checkout) cart = express_checkout.cart @gateway.setup_purchase(cart.total_amount, express_checkout.to_h) end |