Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
The Hitch Hiker's Guide to Android Pay
Search
Tomoaki Imai
November 22, 2016
Programming
1
1.7k
The Hitch Hiker's Guide to Android Pay
[Japanese] This slide is a guide for implementing Android Pay
Tomoaki Imai
November 22, 2016
Tweet
Share
More Decks by Tomoaki Imai
See All by Tomoaki Imai
パッションの見つけ方,育て方
tomoima525
0
54
Decentralized ID とWebの未来
tomoima525
0
140
Web3/メタバースにおけるグローバルのトレンドと活用の最前線
tomoima525
2
2.9k
自分の道の歩み方~楽しくチャレンジするためのヒント~
tomoima525
2
450
Continuum: Background Checker with Zero-Knowledge Proof
tomoima525
0
2.5k
Catching up with TurboModule
tomoima525
1
3.5k
シリコンバレースタートアップのリモート開発
tomoima525
3
1.9k
A guide to writing specs toward engineers
tomoima525
0
280
A guide to writing specs toward engineers(Japanese)
tomoima525
9
2.5k
Other Decks in Programming
See All in Programming
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
190
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
890
色々なIaCツールを実際に触って比較してみる
iriikeita
0
330
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
2
660
Macとオーディオ再生 2024/11/02
yusukeito
0
370
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
890
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.7k
cmp.Or に感動した
otakakot
2
140
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
250
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
Jakarta EE meets AI
ivargrimstad
0
600
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Agile that works and the tools we love
rasmusluckow
327
21k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
RailsConf 2023
tenderlove
29
900
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Thoughts on Productivity
jonyablonski
67
4.3k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Navigating Team Friction
lara
183
14k
Transcript
The Hitch Hiker’s Guide to Android Pay @Shibuya.apk 11/22/2016 Tomoaki
Imai
twitter: @tomoaki_imai github: tomoima525 ࠓҪ ஐষ Android Engineer http://mercan.mercari.com/entry/2016/11/18/110000
࠷ۙHotͳ
None
|| Pay Apple Pay & Android Pay
Mercari supports and
Android Pay ֓ཁ • Google AccountʹܾࡁใΛඥ͚ • ొޙجຊతʹϫϯλοϓͰߪೖ ྃͰ͖Δ •
ܾࡁใΛʹอ࣋͠ͳ͍(Apple PayϩʔΧϧʹ҉߸Խͯ͠อଘ) • (ݱঢ়USͷΈ) ళฮܾࡁΫʔϙϯػ ೳରԠ • Android OS 4.4Ҏ্
Coming Japan 2017?
“ͪΐͪΐͬͱೖΕͯΑ” ͱݴΘΕͨ࣌ʹࠔΒͳ͍ͨΊʹ!
Agenda • Android Payಋೖཁ݅/ಋೖεέδϡʔϧ • Android PayͷΈ • ·ͬͨ͜ͱ
Agenda • Android Payಋೖཁ݅/ಋೖεέδϡʔϧ • Android PayͷΈ • ·ͬͨ͜ͱ
ಋೖཁ݅ • Processor(ܾࡁߦձࣾ)͕ରԠ͍ͯ͠Δ • Mercariͷ߹Braintreeͱ͍͏Processorͱఏܞ͍ͯ͠Δ • play service SDK 9.0.0Ҏ্(9.0.0ҎԼͰରԠ͍ͯ͠Δ͕ɺProcessor͕ఏڙͯ͠
͍ΔSDKͱ߹ੑ͕औΕͳ͘ͳΔՄೳੑ͕͋Δ) compile “com.google.android.gms:play-services-base:9.0.0" compile "com.google.android.gms:play-services-wallet:9.0.0"
Android Pay ಋೖεέδϡʔϧ • ։ൃ։࢝~ϩʔϯν·Ͱ3िؒ • ࣮ΑΓUIݕ౼, ϑΟʔυόοΫରԠ͕͔͔࣌ؒͬͨ • αʔόʔαΠυʹ͍ͭͯɺApple
Pay ͷΈ͕ྲྀ༻Ͱ͖ͨͷͰରԠͳ͠ "OESPJE1BZ"1*Λͬͯ ࣮ࡍʹΞϓϦΛ࡞Δ%BZ )BDLBUIPO ͜͜ͰϓϩτλΠϓ࡞ Android Pay Hackathon week1 week2 Launch ࣮࣌ͷෆ໌(PPHMFࣾ ʹ͍߹Θͤ "QLΛૹ σβΠϯ͕ΨΠυϥΠϯʹ Ԋ͍ͬͯΔ͔ ڍಈʹͳ͍͔ ϓϩτλΠϓ ༷σβΠϯ ࣮ςετ (PPHMFϨϏϡʔϑΟʔυόοΫରԠ ༻ڥͰͷ ར༻ͷղআ
Agenda • Android Payಋೖཁ݅/ಋೖεέδϡʔϧ • Android PayͷΈ • ·ͬͨ͜ͱ
Android Pay ͷΈ ͕"OESPJE1BZʹରԠ͍ͯ͠Δ͔νΣοΫ 8BMMFU1BZNFOUTJT3FBEZ5P1BZ ܾࡁΛ͢Δͷʹඞཁͳ5PLFOΛ1SPDFTTPSʹϦΫΤετ AndroidPay.getTokenizationParameters(braintreeFragment, (parameters, allowedCardNetworks) ->
{…}); 5PLFOΛݩʹ.BTLFE8BMMFUΛੜ ॅॴใɺӅṭ͞ΕͨΫϨΧใؚ͕·ΕΔ Wallet.Payments.loadMaskedWallet(googleApiClient, maskedWalletRequest, requestCode); .BTLFE8BMMFU͔Β'VMM8BMMFUΛੜ ΫϨΧܾࡁͷͨΊʹඞཁͳτʔΫϯใ͕͋Δ Wallet.Payments.loadFullWallet(googleApiClient, fullWalletRequest, REQUEST_FULL_WALLET); τʔΫϯใΛݩʹܾࡁΛߦ͏ AndroidPay.tokenize(braintreeFragment, fullWallet); Processor Google Server Client
Agenda • Android Payಋೖཁ݅/ಋೖεέδϡʔϧ • Android PayͷΈ • ·ͬͨ͜ͱ
Masked Wallet? Full Wallet? • MaskedWallet, Full Walletͷׂ • MaskedWalletܾࡁલʹϢʔβʔఏࣔʹඞཁͳใ(ActivityؒͰ͍·Θ͠OK)
• FullWalletܾࡁ࣌ʹඞཁͳใ(Ұ͖ΓɺຖMaskedWallet͔Βੜ) public MaskedWalletRequest createMaskedWalletRequest(PaymentMethodTokenizationParameters parameters, Collection<Integer> allowedCardNetworks, int finalPaymentPrice){ Cart cart = Cart.newBuilder().setCurrencyCode(Const.CURRENCY_USD) .setTotalPrice(finalPaymentPrice).build(); / return MaskedWalletRequest.newBuilder() .setPaymentMethodTokenizationParameters(parameters) .addAllowedCardNetworks(allowedCardNetworks) .setMerchantName(Const.MERCHANT_NAME) .setCurrencyCode(Const.CURRENCY_USD) .setEstimatedTotalPrice(cart.getTotalPrice()) .setCart(cart) .setShippingAddressRequired(true) .build(); } • Ͳ͏͍͏ใΛͦΕͧΕͷλΠϛϯάͰGoogleଆʹૹΕྑ͍͔Θ͔Βͳ͍ • ૹΕྑ͍ใΛ֬ೝ
ຬ͖ͨ͢ཁ͕݅৭ʑ • Branding Requirements • https://developers.google.com/android-pay/ui-branding • https://android-pay-toolkit.withgoogle.com/overview/in-android-applications • ༻ՄೳͳϩΰɺαΠζɺจݴ
• ϑϩʔͷ؍Ͱͷཁ݅ • ඇରԠͰදࣔ͠ͳ͍ etc
ݕূ͕େม • ରԠ͢ΔΫϨδοτΧʔυ͕खݩʹඞཁ ‣ ProcessorʹΑͬͯςετΧʔυ͕ར༻Ͱ͖ͳ͍ ‣ ࣗલͷΧʔυ͏ -> ొ੍ݶʹҾ͔͔ͬͬͯΧʔυఀࢭ •
༻ڥͰͷݕূGoogleͷApproveΛड͚͔ͯΒ(ͭ·Γϩʔϯνલ) • PreAuthorize(Ұར༻ͨ͠߹ʹͦͷೝূΛ࠶ར༻ग़དྷΔػೳ)Λoffʹ͢Δ ߹ʹ app ͷstorekeyΛม͑Δඞཁ͕͋Δ
ProcessorʹΑ࣮ͬͯҟͳΔ • Processor֤ࣾʹΑ࣮ͬͯͷํ๏͕ҟͳΔ • Processor͕มΘΔͱશͯมΘΔՄೳੑ͕͋Δ mGoogleApiClient = new GoogleApiClient.Builder(getActivity()) .enableAutoManage(fragmentActivity,
this /* onConnectionFailedListener */) .setAccountName(accountName) // optional .addApi(Wallet.API, new Wallet.WalletOptions.Builder() .setEnvironment(Constants.WALLET_ENVIRONMENT) .setTheme(WalletConstants.THEME_LIGHT) .build()) .build(); Wallet.Payments.loadFullWallet(mGoogleApiClient, fullWalletRequest, REQUEST_CODE_RESOLVE_LOAD_FULL_WALLET); braintreeFragment.getGoogleApiClient(googleApiClient -> Wallet.Payments.loadFullWallet(googleApiClient, fullWalletRequest, REQUEST_FULL_WALLET)); Braintree Stripe
·ͱΊ • ಋೖཁ݅Λຬ͍ͨͯ͠Δ͔֬ೝ! • ϨϏϡʔؚΊ3िؒΛݟ͓ͯ͘ͷ͕٢(αʔόαΠυผ) • ಋೖલʹΨΠυϥΠϯਫ਼ಡ/ αϯϓϧΞϓϦ৮Δ • https://github.com/android-pay/androidpay-quickstart
• https://codelabs.developers.google.com/codelabs/android- pay