Skip to content

Instantly share code, notes, and snippets.

@denmarkin
Created May 29, 2011 11:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save denmarkin/997651 to your computer and use it in GitHub Desktop.
Save denmarkin/997651 to your computer and use it in GitHub Desktop.
Example of ActiveMerchant Express Checkout request construction
amount = thing.build_payment.price_in_cents
response = EXPRESS_GATEWAY.setup_authorization(amount,
:ip => request.remote_ip,
:return_url => new_payment_url,
:cancel_return_url => new_order_url,
:no_shipping => true,
:items => [{:name => "#{thing.title}", :amount => amount}]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment