Sha256: a1a552dc440e12d99ebca2feab28c8f85db2e3beb199b7f92c25ff362a327fdd
Contents?: true
Size: 793 Bytes
Versions: 12
Compression:
Stored size: 793 Bytes
Contents
# This module is meant to be mixed into a controller that needs to support paypal express transactions module MuckCommerce module PaypalMethods def express response = OrderTransaction.paypal_express_gateway.setup_authorization(@cart.total, :ip => request.remote_ip, :return_url => build_paypal_express_return_url, :cancel_return_url => build_paypal_express_cancel_url ) redirect_to OrderTransaction.paypal_express_gateway.redirect_url_for(response.token) end protected def build_paypal_express_return_url new_order_url end def build_paypal_express_cancel_url cart_url(@cart) end def paypal_express? !params[:token].blank? end end end
Version data entries
12 entries across 12 versions & 1 rubygems