lib/helpers/controller_helpers.rb in wepay-rails-0.1.57 vs lib/helpers/controller_helpers.rb in wepay-rails-0.1.58
- old
+ new
@@ -85,9 +85,10 @@
# :require_shipping No A boolean value (0 or 1). If set to 1 then the payer will be asked to enter a shipping address when they pay. After payment you can retrieve this shipping address by calling /checkout
# :shipping_fee No The amount that you want to charge for shipping.
# :charge_tax No A boolean value (0 or 1). If set to 1 and the account has a relevant tax entry (see /account/set_tax), then tax will be charged.
def init_checkout_and_send_user_to_wepay(parms)
response = wepay_gateway.perform_checkout(parms)
+ File.open('/tmp/noisebytes.log','a') {|f|f.write(response.inspect)}
raise WepayRails::Exceptions::InitializeCheckoutError.new("A problem occurred while trying to checkout. Wepay didn't send us back a checkout uri") unless response && response.has_key?('checkout_uri')
redirect_to response['checkout_uri'] and return
end
end
end
\ No newline at end of file