integration of online payments - common pitfalls and how to avoid them

31
WebCamp 2014 - Peter Trobec - @ptrobec INTEGRATION OF ONLINE PAYMENTS Peter Trobec [email protected] @ptrobec

Upload: peter-trobec

Post on 20-Jun-2015

153 views

Category:

Software


2 download

DESCRIPTION

Integrating multiple online payments in your app or on your website can be a daunting task, if you don’t receive proper info from all departments involved. I will try to present you the common challenges that you will face during this process.

TRANSCRIPT

Page 1: Integration of online payments - common pitfalls and how to avoid them

WebCamp 2014 - Peter Trobec - @ptrobec

INTEGRATION OF ONLINE PAYMENTS

Peter [email protected]

@ptrobec

Page 2: Integration of online payments - common pitfalls and how to avoid them

WebCamp 2014 - Peter Trobec - @ptrobec

What will we cover?

● Overview of online payments● Project management● Documentation● Development

– Sample code & test environment– Statuses– Logging– Bugs

Page 3: Integration of online payments - common pitfalls and how to avoid them

WebCamp 2014 - Peter Trobec - @ptrobec

Overview of Online Payments● Different providers

– Global● PayPal● Google Wallet● Amazon Payments

– Local● MegaPOS● PikPay● Cetelem● Liisi

Page 4: Integration of online payments - common pitfalls and how to avoid them

WebCamp 2014 - Peter Trobec - @ptrobec

Overview of Online Payments

● Have different payment methods– Purchase – digital goods– Authorization – physical goods

Page 5: Integration of online payments - common pitfalls and how to avoid them

WebCamp 2014 - Peter Trobec - @ptrobec

Purchase

● Money can be transferred immediately● No stock needed

Page 6: Integration of online payments - common pitfalls and how to avoid them

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

Page 7: Integration of online payments - common pitfalls and how to avoid them

WebCamp 2014 - Peter Trobec - @ptrobec

Overview of Online Payments

Always make sure the financial department signed the contracts!

Page 8: Integration of online payments - common pitfalls and how to avoid them

WebCamp 2014 - Peter Trobec - @ptrobec

PROJECT MANAGEMENT

Page 9: Integration of online payments - common pitfalls and how to avoid them

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

Page 10: Integration of online payments - common pitfalls and how to avoid them

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

Page 11: Integration of online payments - common pitfalls and how to avoid them

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

Page 12: Integration of online payments - common pitfalls and how to avoid them

WebCamp 2014 - Peter Trobec - @ptrobec

DOCUMENTATION

Page 13: Integration of online payments - common pitfalls and how to avoid them

WebCamp 2014 - Peter Trobec - @ptrobec

Documentation

What you expect you'll get

Page 14: Integration of online payments - common pitfalls and how to avoid them

WebCamp 2014 - Peter Trobec - @ptrobec

Documentation

What you'll get...

Page 15: Integration of online payments - common pitfalls and how to avoid them

WebCamp 2014 - Peter Trobec - @ptrobec

Documentation can be...

● Outdated● In a foreign language● Lacking the most needed info● Just an API reference

Page 16: Integration of online payments - common pitfalls and how to avoid them

WebCamp 2014 - Peter Trobec - @ptrobec

Always

REQUEST THE LATEST DOCUMENTATION!!!

Page 17: Integration of online payments - common pitfalls and how to avoid them

WebCamp 2014 - Peter Trobec - @ptrobec

DEVELOPMENT

Page 18: Integration of online payments - common pitfalls and how to avoid them

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

Page 19: Integration of online payments - common pitfalls and how to avoid them

WebCamp 2014 - Peter Trobec - @ptrobec

Test environment

● Not in English● Not working● Want to make a complete test transaction?● Nope.● But why?● Not working.

Page 20: Integration of online payments - common pitfalls and how to avoid them

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

Page 21: Integration of online payments - common pitfalls and how to avoid them

WebCamp 2014 - Peter Trobec - @ptrobec

Test environment example

PROVIDED INFO:NONE

Page 22: Integration of online payments - common pitfalls and how to avoid them

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

Page 23: Integration of online payments - common pitfalls and how to avoid them

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

Page 24: Integration of online payments - common pitfalls and how to avoid them

WebCamp 2014 - Peter Trobec - @ptrobec

Statuses

● Hard to „track“ the meaning● Not in English● 10 integrations, 100 statuses

Page 25: Integration of online payments - common pitfalls and how to avoid them

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

Page 26: Integration of online payments - common pitfalls and how to avoid them

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

Page 27: Integration of online payments - common pitfalls and how to avoid them

WebCamp 2014 - Peter Trobec - @ptrobec

Logging

● Log everything● Follow the bank way – make only inserts● Always operate with the latest status

Page 28: Integration of online payments - common pitfalls and how to avoid them

WebCamp 2014 - Peter Trobec - @ptrobec

Bugs

● It's your fault, not the bank's● Have you logged everything?● Bugs with payments are always critical

Page 29: Integration of online payments - common pitfalls and how to avoid them

WebCamp 2014 - Peter Trobec - @ptrobec

The end

● Countless little fixes on:– Front-end– Legal text– Various calculators

Page 30: Integration of online payments - common pitfalls and how to avoid them

WebCamp 2014 - Peter Trobec - @ptrobec

The end

Endless stream of e-mails

Page 31: Integration of online payments - common pitfalls and how to avoid them

WebCamp 2014 - Peter Trobec - @ptrobec

Q & A