Accepting Online Payment for Your Library and ‘Stripe’ as an Example

Bohyun Kim
Bohyun KimCTO & Associate Professor
ACCEPTING ONLINE
PAYMENT FOR YOUR
LIBRARY
& ‘STRIPE’ AS AN EXAMPLE
Code4Lib DC Unconference, Aug. 11-12, 2014.
Bohyun Kim
Associate Director for Library Applications and Knowledge
Systems
University of Maryland, Baltimore
Health Sciences and Human Services Library
Twitter: @bohyunkim
Website: http://bohyunkim.net
Elements of Online Payment
 ACH (Automated Clearing House) payments: Electronic credit
and debit transfers. Most payment solutions use ACH to send
money (minus fees) to their customers.
 Merchant Account: A bank account that allows a customer to
receive payments through credit or debit cards. Merchant providers
are required to obey regulations established by card associations.
Many processors act as both the merchant account as well as the
payment gateway.
 Payment Gateway: The middleman between the merchant and
their sponsoring bank. It allows merchants to securely pass credit
card information between the customer and the merchant and also
between merchant and the payment processor.
 Payment Processor: A company that a merchant uses to handle
credit card transactions. Payment processors implement anti-fraud
measures to ensure that both the front-facing customer and the
merchant are protected.
 PCI (the Payment Card Industry) Compliance: A merchant or
payment gateway must set up their payment environment in a way
that meets the Payment Card Industry Data Security Standard (PCI
DSS).
 Source: http://sixrevisions.com/tools/online-payment-systems/
How Online Payment Works
Different payment gateways,
merchant accounts, and
bank accounts are setup to
work together (or not). Your
bank may also be able to
act as the merchant
account.
Source:
http://www.larryullman.com/
2012/10/10/introduction-to-
stripe/
Online Payment Systems
 Authorize.net
 PayPal
 Google Checkout
 Amazon Payments
 Stripe
 WePay
 Dwolla
 Braintree
 Samurai
Source: http://sixrevisions.com/tools/online-payment-
systems/
Stripe
Stripe acts as both the
payment gateway and
the merchant account.
Your website
communicates the
customer and order
information to Stripe,
Stripe clears the
payment information
with the associated
credit card company,
and Stripe puts the
money in your bank
account.
Source:
http://www.larryullman.c
om/2012/10/10/introducti
API Keys for Testing
Resources
 Card Numbers for Testing
https://stripe.com/docs/testing#cards
 Code Examples
https://stripe.com/docs/examples
 Docs
https://stripe.com/docs
Starting Point
 Borrowed example from
https://github.com/myg0v/Simple-Bootstrap-
Stripe-Payment-Form
Accepting Online Payment for Your Library and ‘Stripe’ as an Example
Accepting Online Payment for Your Library and ‘Stripe’ as an Example
When the Payment Succeeds,
Modify and Enhance
 Add Patron & Payment Details.
 Allow custom amount for payment.
 Change the currency to USD.
 Configure the validation for new fields.
(Bootstrapvalidator jQuery Plugin)
 Hide the payment form once the charge goes
through.
 Other examples:
https://stripe.com/docs/examples
Accepting Online Payment for Your Library and ‘Stripe’ as an Example
Accepting Online Payment for Your Library and ‘Stripe’ as an Example
Process
 You create a form on your website that accepts the payment details.
 You include a Stripe JavaScript library on the page.
 You write a JavaScript function that watches for the form submission (i.e.,
you create an event handler for the form’s submission).
 When the form is submitted, the user’s payment details are securely sent to
Stripe via Ajax.
 Stripe will confirm that the payment information is valid and return a token
that uniquely identifies that payment information.
 The JavaScript function that handles the Ajax response stores the token in
a hidden form element and submits the form.
 The server-side script (aka, the PHP code) that handles the form’s
submission uses the token to actually process the payment.
 So the customer never leaves your site but the payment information never
hits your server: the best of both worlds. (This is the process when all
works well; payment verification errors introduce new processes.)
Source: http://www.larryullman.com/2012/11/28/creating-a-form-for-handling-
payments-with-stripe/
JS/jQuery
Accepting Online Payment for Your Library and ‘Stripe’ as an Example
PHP
Accepting Online Payment for Your Library and ‘Stripe’ as an Example
Modified Form
Testing
Dashboard
Logs
Token Request
Charge Request
Failed Charge
Charge Response - Declined
Error Codes
More to be Done
 Send the confirmation e-mail upon the
payment success.
 … More.
Questions?
Photo credit: Flickr Nina`H
https://www.flickr.com/photos/ninahiironniemi/209281997
1 of 30

More Related Content

What's hot(20)

Aadhaar Enable Payment SystemAadhaar Enable Payment System
Aadhaar Enable Payment System
Ezulix Software Private Limited1.4K views
PayU Biz Product Deck (1)PayU Biz Product Deck (1)
PayU Biz Product Deck (1)
ICICI Bank4.1K views
Stripe SCAStripe SCA
Stripe SCA
Stefano Rainieri139 views
Pinch Product DevPinch Product Dev
Pinch Product Dev
openlooplabs434 views
PayumoneyPayumoney
Payumoney
Prof Ansari709 views
When iOT meet FinTech.When iOT meet FinTech.
When iOT meet FinTech.
qumedia978 views
Startup Highway WorkshopStartup Highway Workshop
Startup Highway Workshop
PayPal908 views
Joomla virtuemart auspost secure pay payment gatewayJoomla virtuemart auspost secure pay payment gateway
Joomla virtuemart auspost secure pay payment gateway
Webkul Software Pvt. Ltd.70 views
myPOS - Reshaping the world of paymentsmyPOS - Reshaping the world of payments
myPOS - Reshaping the world of payments
myPOS Europe Ltd749 views
myPOS - an innovative cashless solutionmyPOS - an innovative cashless solution
myPOS - an innovative cashless solution
myPOS Europe Ltd508 views
Payeezy Integration Payeezy Integration
Payeezy Integration
O2b Technologies243 views

Similar to Accepting Online Payment for Your Library and ‘Stripe’ as an Example

E commerce infrastructureE commerce infrastructure
E commerce infrastructuresahilm87
27.9K views10 slides
Payment GatewayPayment Gateway
Payment GatewayNyros Technologies
51.4K views22 slides
Mea1Mea1
Mea1ecommerce
806 views63 slides

Similar to Accepting Online Payment for Your Library and ‘Stripe’ as an Example(20)

E commerce infrastructureE commerce infrastructure
E commerce infrastructure
sahilm8727.9K views
Payment gateway testingPayment gateway testing
Payment gateway testing
Atul Pant5.1K views
Payment GatewayPayment Gateway
Payment Gateway
Nyros Technologies51.4K views
Mea1Mea1
Mea1
ecommerce806 views
E PaymentE Payment
E Payment
Ankit Saxena20.6K views
Online Payment Gateway SystemOnline Payment Gateway System
Online Payment Gateway System
Mannu Khani34.9K views
Payment gatewayPayment gateway
Payment gateway
HananBahy690 views
Open web paymentsOpen web payments
Open web payments
Praveen Alavilli9.3K views
Active MerchantActive Merchant
Active Merchant
John Ward2.4K views
ACH Payments(NACHA/NACH/Direct debit System)ACH Payments(NACHA/NACH/Direct debit System)
ACH Payments(NACHA/NACH/Direct debit System)
Surya Prakash Tripathi1.3K views
Online payments and Security Gateways Online payments and Security Gateways
Online payments and Security Gateways
Sarujan Chandrakumaran901 views
9781423903055 ppt ch119781423903055 ppt ch11
9781423903055 ppt ch11
临枫 盖963 views
9781423903055 ppt ch119781423903055 ppt ch11
9781423903055 ppt ch11
临枫 盖2.7K views
Payments primerPayments primer
Payments primer
Sumeet Maniar782 views
Get Paid presentation_20190123Get Paid presentation_20190123
Get Paid presentation_20190123
Peter Walker394 views

More from Bohyun Kim(20)

AI for LibrariesAI for Libraries
AI for Libraries
Bohyun Kim286 views

Recently uploaded(20)

[2023] Putting the R! in R&D.pdf[2023] Putting the R! in R&D.pdf
[2023] Putting the R! in R&D.pdf
Eleanor McHugh36 views
Web Dev - 1 PPT.pdfWeb Dev - 1 PPT.pdf
Web Dev - 1 PPT.pdf
gdsczhcet49 views
ThroughputThroughput
Throughput
Moisés Armani Ramírez31 views

Accepting Online Payment for Your Library and ‘Stripe’ as an Example

  • 1. ACCEPTING ONLINE PAYMENT FOR YOUR LIBRARY & ‘STRIPE’ AS AN EXAMPLE Code4Lib DC Unconference, Aug. 11-12, 2014. Bohyun Kim Associate Director for Library Applications and Knowledge Systems University of Maryland, Baltimore Health Sciences and Human Services Library Twitter: @bohyunkim Website: http://bohyunkim.net
  • 2. Elements of Online Payment  ACH (Automated Clearing House) payments: Electronic credit and debit transfers. Most payment solutions use ACH to send money (minus fees) to their customers.  Merchant Account: A bank account that allows a customer to receive payments through credit or debit cards. Merchant providers are required to obey regulations established by card associations. Many processors act as both the merchant account as well as the payment gateway.  Payment Gateway: The middleman between the merchant and their sponsoring bank. It allows merchants to securely pass credit card information between the customer and the merchant and also between merchant and the payment processor.  Payment Processor: A company that a merchant uses to handle credit card transactions. Payment processors implement anti-fraud measures to ensure that both the front-facing customer and the merchant are protected.  PCI (the Payment Card Industry) Compliance: A merchant or payment gateway must set up their payment environment in a way that meets the Payment Card Industry Data Security Standard (PCI DSS).  Source: http://sixrevisions.com/tools/online-payment-systems/
  • 3. How Online Payment Works Different payment gateways, merchant accounts, and bank accounts are setup to work together (or not). Your bank may also be able to act as the merchant account. Source: http://www.larryullman.com/ 2012/10/10/introduction-to- stripe/
  • 4. Online Payment Systems  Authorize.net  PayPal  Google Checkout  Amazon Payments  Stripe  WePay  Dwolla  Braintree  Samurai Source: http://sixrevisions.com/tools/online-payment- systems/
  • 5. Stripe Stripe acts as both the payment gateway and the merchant account. Your website communicates the customer and order information to Stripe, Stripe clears the payment information with the associated credit card company, and Stripe puts the money in your bank account. Source: http://www.larryullman.c om/2012/10/10/introducti
  • 6. API Keys for Testing
  • 7. Resources  Card Numbers for Testing https://stripe.com/docs/testing#cards  Code Examples https://stripe.com/docs/examples  Docs https://stripe.com/docs
  • 8. Starting Point  Borrowed example from https://github.com/myg0v/Simple-Bootstrap- Stripe-Payment-Form
  • 11. When the Payment Succeeds,
  • 12. Modify and Enhance  Add Patron & Payment Details.  Allow custom amount for payment.  Change the currency to USD.  Configure the validation for new fields. (Bootstrapvalidator jQuery Plugin)  Hide the payment form once the charge goes through.  Other examples: https://stripe.com/docs/examples
  • 15. Process  You create a form on your website that accepts the payment details.  You include a Stripe JavaScript library on the page.  You write a JavaScript function that watches for the form submission (i.e., you create an event handler for the form’s submission).  When the form is submitted, the user’s payment details are securely sent to Stripe via Ajax.  Stripe will confirm that the payment information is valid and return a token that uniquely identifies that payment information.  The JavaScript function that handles the Ajax response stores the token in a hidden form element and submits the form.  The server-side script (aka, the PHP code) that handles the form’s submission uses the token to actually process the payment.  So the customer never leaves your site but the payment information never hits your server: the best of both worlds. (This is the process when all works well; payment verification errors introduce new processes.) Source: http://www.larryullman.com/2012/11/28/creating-a-form-for-handling- payments-with-stripe/
  • 18. PHP
  • 23. Logs
  • 27. Charge Response - Declined
  • 29. More to be Done  Send the confirmation e-mail upon the payment success.  … More.
  • 30. Questions? Photo credit: Flickr Nina`H https://www.flickr.com/photos/ninahiironniemi/209281997