Integration of online payments - common pitfalls and how to avoid them
-
Upload
peter-trobec -
Category
Software
-
view
151 -
download
2
description
Transcript of Integration of online payments - common pitfalls and how to avoid them
WebCamp 2014 - Peter Trobec - @ptrobec
INTEGRATION OF ONLINE PAYMENTS
Peter [email protected]
@ptrobec
WebCamp 2014 - Peter Trobec - @ptrobec
What will we cover?
● Overview of online payments● Project management● Documentation● Development
– Sample code & test environment– Statuses– Logging– Bugs
WebCamp 2014 - Peter Trobec - @ptrobec
Overview of Online Payments● Different providers
– Global● PayPal● Google Wallet● Amazon Payments
– Local● MegaPOS● PikPay● Cetelem● Liisi
WebCamp 2014 - Peter Trobec - @ptrobec
Overview of Online Payments
● Have different payment methods– Purchase – digital goods– Authorization – physical goods
WebCamp 2014 - Peter Trobec - @ptrobec
Purchase
● Money can be transferred immediately● No stock needed
WebCamp 2014 - Peter Trobec - @ptrobec
Authorization
● Money only authorized – not transferred● Products must be on stock● Products have to be ready for delivery● Authorization can expire● Money is transferred only after capture is initiated
WebCamp 2014 - Peter Trobec - @ptrobec
Overview of Online Payments
Always make sure the financial department signed the contracts!
WebCamp 2014 - Peter Trobec - @ptrobec
PROJECT MANAGEMENT
WebCamp 2014 - Peter Trobec - @ptrobec
Rules
1.Always assign a responsible person
2.Communicate with all departments involved
3.Educate everyone involved in the process
4.On each change, update all the parties involved
5.If anything goes wrong, you will have to know the answer, why it went wrong and how to fix it
WebCamp 2014 - Peter Trobec - @ptrobec
Instructions
● Prepare instructions for all departments● Each department should get custom instructions ● Educate everyone on how the integration works● Explain the differences between normal and online
payments
WebCamp 2014 - Peter Trobec - @ptrobec
Reports
● Most departments will need some kind of report● Finance department will need the most accurate
report● Not all online payments providers offer concise
reports so be sure to agree on this beforehand
WebCamp 2014 - Peter Trobec - @ptrobec
DOCUMENTATION
WebCamp 2014 - Peter Trobec - @ptrobec
Documentation
What you expect you'll get
WebCamp 2014 - Peter Trobec - @ptrobec
Documentation
What you'll get...
WebCamp 2014 - Peter Trobec - @ptrobec
Documentation can be...
● Outdated● In a foreign language● Lacking the most needed info● Just an API reference
WebCamp 2014 - Peter Trobec - @ptrobec
Always
REQUEST THE LATEST DOCUMENTATION!!!
WebCamp 2014 - Peter Trobec - @ptrobec
DEVELOPMENT
WebCamp 2014 - Peter Trobec - @ptrobec
Sample code
● Not for your platform● Not in a form of a plugin● Just an example● Always needs a complete rewrite● Unsecure
WebCamp 2014 - Peter Trobec - @ptrobec
Test environment
● Not in English● Not working● Want to make a complete test transaction?● Nope.● But why?● Not working.
WebCamp 2014 - Peter Trobec - @ptrobec
Test environment example
● Hungarian leasing provider– Needed info:
● Tax identification number● Personal document number (ID number)● Valid land line/mobile number
WebCamp 2014 - Peter Trobec - @ptrobec
Test environment example
PROVIDED INFO:NONE
WebCamp 2014 - Peter Trobec - @ptrobec
Test environment example
● What needed to be tested:– Whole payment process with:
● Successful leasing outcome● Unsuccessful leasing outcome● Pending leasing outcome● Timeout
● What could be tested:– Nothing
WebCamp 2014 - Peter Trobec - @ptrobec
What will you need for testing
● Credit card nubers and info● Sensitive personal data
– ID number– Passport number– Salary– employer
WebCamp 2014 - Peter Trobec - @ptrobec
Statuses
● Hard to „track“ the meaning● Not in English● 10 integrations, 100 statuses
WebCamp 2014 - Peter Trobec - @ptrobec
Status examples
● With same meaning:– APPROVED
– ACCEPTED
– GREEN
– 100
– INVOICE=123456:STATUS=PAID:PAY_TIME=YYYYMMDDhhmmss:STAN=[6 digits]:BCODE=[6 digits/letters]
– SATISFIED
– INITIALIZED
– 4
– 0000
WebCamp 2014 - Peter Trobec - @ptrobec
Payment statuses comparison
● Same provider with 2 systems:
– System 1:● 1, 2, 3, 4, 5, 7, 99, 888
– System 2:● VARIATION 1:
– PAYMENT_AUTHORIZED, PAYMENT_RECEIVED, TEST, COMPLETE, REVERSED, REFUND
● VARIATION 2:– SAME AS 1, BUT WITH ADDED STATUS: CASH
● VARIATION 3:– NOT_FOUND, WAITING_PAYMENT, CARD_NOTAUTHORIZED, IN_PROGRESS,
PAYMENT_AUTHORIZED, COMPLETE, FRAUD, INVALID, TEST
WebCamp 2014 - Peter Trobec - @ptrobec
Logging
● Log everything● Follow the bank way – make only inserts● Always operate with the latest status
WebCamp 2014 - Peter Trobec - @ptrobec
Bugs
● It's your fault, not the bank's● Have you logged everything?● Bugs with payments are always critical
WebCamp 2014 - Peter Trobec - @ptrobec
The end
● Countless little fixes on:– Front-end– Legal text– Various calculators
WebCamp 2014 - Peter Trobec - @ptrobec
The end
Endless stream of e-mails
WebCamp 2014 - Peter Trobec - @ptrobec
Q & A