Slide 1

Slide 1 text

Payment Processing Sean Sullivan May 16, 2017 Portland Java User Group

Slide 2

Slide 2 text

• software engineer • 21 years Java • 6 years at Gilt • back office systems @ Gilt About me

Slide 3

Slide 3 text

January 2016

Slide 4

Slide 4 text

https://en.wikipedia.org/wiki/Hudson%27s_Bay_Company

Slide 5

Slide 5 text

saksfifthavenue.com saksoff5th.com lordandtaylor.com gilt.com thebay.com

Slide 6

Slide 6 text

www.gilt.com

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

Web Checkout Android Checkout iPhone Checkout Checkout service

Slide 9

Slide 9 text

checkout service payment system payment processor checkout UI order processing system order queue

Slide 10

Slide 10 text

2008 order processing

Slide 11

Slide 11 text

2017 discount service payment service ship calculator service order processing inventory service

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

Credit card service • add card • delete card • list cards • authorize • capture • refund

Slide 14

Slide 14 text

Credit card service version 1.x Java + java.util.HashMap + service framework version 2.x Java + Scala + JAX-RS version 3.x Scala + Play Framework + ApiDoc

Slide 15

Slide 15 text

http://www.apidoc.me/doc/

Slide 16

Slide 16 text

Date and time java.lang.Long java.util.Date java.util.Calendar joda-time library java.time API

Slide 17

Slide 17 text

java.time API

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

Money java.lang.Double java.lang.String java.math.BigDecimal joda-money library JavaMoney API

Slide 20

Slide 20 text

JavaMoney

Slide 21

Slide 21 text

org.javamoney moneta 1.1 Moneta library

Slide 22

Slide 22 text

import org.javamoney.moneta.Money import java.math.BigDecimal val salary = Money.of( new BigDecimal(“25000000.00”), “USD”) Moneta example

Slide 23

Slide 23 text

Security concerns • client-side credit card encryption • Java crypto strength • key management • safe logging

Slide 24

Slide 24 text

https://paysvc.giltvault.com/payment_service/get_publickey?callback=demo Public Key endpoint

Slide 25

Slide 25 text

Unlimited strength crypto oracle.com

Slide 26

Slide 26 text

Key management tech.gilt.com

Slide 27

Slide 27 text

Logging import ch.qos.logback.classic.PatternLayout import ch.qos.logback.classic.spi.ILoggingEvent class MaskingPatternLayout extends PatternLayout { ... }

Slide 28

Slide 28 text

Logging 2017-05-16 20:08:18,312 INFO com.gilt.Foobar REDACTED

Slide 29

Slide 29 text

Code coverage https://github.com/jacoco/jacoco https://bitbucket.org/atlassian/clover http://cobertura.github.io/cobertura/ https://github.com/scoverage

Slide 30

Slide 30 text

Code coverage https://twitter.com/LlewellynFalco/status/812714305695019008

Slide 31

Slide 31 text

The end

Slide 32

Slide 32 text

No content