Payments On Rails

4,984 views
4,474 views

Published on

Emil Marceta's talk at RailsConf 2008 (E-xact Transactions Ltd.)

Published in: Technology, Economy & Finance
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,984
On SlideShare
0
From Embeds
0
Number of Embeds
37
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Payments On Rails

  1. Payments On Rails E-xact Transactions (emil@e-xact.com)
  2. <introduction> Hello
  3. E-xactly, who?
  4. Payment Processor
  5. 1-866-733-8613. Vancouver, BC
  6. :founded => 1999, :per_year => 3B.dollars, :team => (2..8)
  7. Me?
  8. About </introduction>
  9. <exactonrails> Merchants | E-xact | Payment Network
  10. special && !special
  11. “Non-special” • Standard Rails platform • Plugins - Solr, cache_fu, will_paginate etc. • Capistrano / Webistrano • SQL Backend
  12. Apache Proxy (mod_security, mod_proxy_balancer,...) | ||| lighttpd/fastcgi Rails
  13. “Special” • Mission Critical Financial services • High Volume Transactions Processing • Rails to the “Enterprise”
  14. “Big Rewrite”
  15. Win32 (.NET)
  16. Why Rails?
  17. 2006
  18. 2006 Fall
  19. 2007 Spring
  20. Migrated 5K Customers
  21. Customers
  22. RPM
  23. Primary Provider For </exactonrails>
  24. <api> api.e-xact.com
  25. gem install exact4r
  26. # build a purchase request request = Exact::Request.new({ :transaction_type => quot;00quot;, # purchase :amount => 10.50, :cardholder_name => quot;Simon Brownquot;, :cc_number => quot;4111111111111111quot;, :cc_expiry => quot;1005quot;, # MUST be YYMM format :gateway_id => quot;XXXXXXXquot;, # which gateway to submit the request to :password => quot;YYYYYYquot; # your password for that gateway }) response = request.submit
  27. Response response.transaction_tag # 1234 response.exact_resp_code # quot;00quot; response.exact_message # quot;Transaction Normalquot; response.bank_resp_code # quot;00quot; response.bank_message # quot;APPROVEDquot;
  28. :rest || :json || :soap
  29. SOAP (legacy)
  30. REST XML (default)
  31. JSON
  32. uri = URI.parse('https://api.e-xact.com') http = Net::HTTP.new(uri.host, uri.port) req_headers= { 'Content-Type' => 'application/json; charset=utf-8' } req = {} req[:amount] = 100.to_s req[:cardholder_name] = 'Fred Hanks' req[:email_address] = 'fred@acme.org' req[:address] = '2000 Elm street' req[:cc_number] = '4111111111111111' req[:cc_expiry] = '0907' req[:transaction_type] = :purchase req[:gateway_id] = 'XXXXXX' req[:password] = 'YYYYYYY' response = http.request_post(uri.path, req.to_json, req_headers) res = ActiveSupport::JSON.decode(response) assert_equal 1, res['transaction_approved'], res.inspect
  33. Transaction set • Purchase • Refund • Pre-authorization, completion • Void • Debit • ....
  34. Tagged Transaction
  35. API | Cardholder Data | E-xact </api>
  36. <payment_pages> Payment Pages
  37. $ rails store create create app/controllers create app/helpers create app/models create app/views/layouts create config/environments create config/initializers create db create doc create lib create lib/tasks create log ....
  38. $ ./script/install active_merchant (http://activemerchant.org)
  39. patch -p0 < am.patch (http://www.e-xact.com/developers/downloads/#ActiveMerch)
  40. Merchant Site | checkout.e-xact.com | Cardholder Data </payment_pages>
  41. Summary
  42. Questions?
  43. Contact

×