Payment Service (Overview and Payment Gateways)

Post on 13-Apr-2017

812 views 2 download

transcript

Payment Service (Overview and Payment Gateways)

Yuki MatsukuraMetaps Inc.

shinjuku.rb #31@metaps

• Metaps Inc. (2014 - ) – SPIKE Engineer

• @matsubokkuri• http://github.com/matsubo• http://matsu.teraren.com/blog/

Yuki Matsukura

Outline

• Payment service stack

• Dealing with Payment Gateways

• Payment in Ruby

PAYMENT SERVICE STACK

https://spike.cc/

Payment Service

EC

MarketingAutomation

Market

E-money

Users

SPIKE Service Stack

API

Payment Service

Stripe

CAFIS VISA Net Master Net…

LIFE

Payment Service Stack

Users (Buyers)

Mitsui Sumitomo

Bank of America

GMO Brain Tree…

Acquirer

Issuer

PaymentGateways

JR East LUMINE ENEOS…

DEALING WITH PAYMENT GATEWAYS

KPIs to choose GW

• Fee– Initial setup cost, Monthly fee– Transaction fee, Payment fee

http://bit.ly/1lh0O22

KPIs to choose GW

• Sandbox– Some gateways cannot be test …

KPIs to choose GW

• Stability– SLA– Gateways returns error text with 200 response.

MTBF = 72.2 days, MTTR = 22.3mins, Availability = 99.978%

PAYMENT IN RUBY

Payment Gateway API

• ActiveMerchant– https://github.com/activemerchant/

active_merchant

– This is a collection of API library• NOT abstracting all gateways.• API parameter is different

This would be differentfrom payment gateway.

KPIs to choose GW

• Timeout– Payment Gateways– Authentication Bank– Our service• net/http• unicorn• Reverse proxy• (Browser)

State activity diagram 1

State activity diagram 2

To Be continued

• Fraud protection• Fight with Gateway timeout• Automation• Security• Customer support• Gem• Development environment• ER Diagram