Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Developing Apple Pay In-App Provisioning in merpay

D2f212ce418f3daa29c23914c9b6892b?s=47 kenmaz
March 27, 2019

Developing Apple Pay In-App Provisioning in merpay

Presentation slide for "merpay Tech Talk for iOS/Android Engineer" event.
https://mercari.connpass.com/event/124161/

D2f212ce418f3daa29c23914c9b6892b?s=128

kenmaz

March 27, 2019
Tweet

Transcript

  1. Developing Apple Pay In-App Provisioning in merpay Kentaro Matsumae (@kenmaz)

    merpay #merpay_techtalk merpay Tech Talk for iOS/Android Engineer, Mar 27th
  2. "HFOEB w "QQMF1BZ w "QQMF1BZ*O"QQ1SPWJTJPOJOH w .FSDBSJBSDIJUFDUVSFPWFSWJFX w %FWFMPQJOHXJUITBOECPYBQQ

  3. None
  4. "QQMF1BZ

  5. $SFEJU$BSE .BHOFUJDTUSJQF w .BHOFUJDTUSJQF w 4JHO 1IPUPTCZ೔ຊΫϨδοτڠձIUUQTXXXKDSFEJUPSKQTFDVSJUZJDIUNM

  6. $SFEJU$BSE *$ w *$DIJQSFBEFS w EJHJUT1*/OVNCFS 1IPUPTCZ೔ຊΫϨδοτڠձIUUQTXXXKDSFEJUPSKQTFDVSJUZJDIUNM

  7. "QQMF1BZ w "EE1MBTUJD$SFEJU$BSET JOUP8BMMFUBQQ w 4FDVSF&MFNFOU w 'BDF*%1BTTDPEF BVUIFOUJDBUJPO w

    /'$DPOUBDUMFTTQBZNFOU
  8. "QQMF1BZ3FHJTUSBUJPO'MPX J04%FWJDF "QQMF 1BZNFOU /FUXPSL w $BSEIPMEFSOBNF w $BSE/VNCFS '1"/

     w 4FDVSJUZ$PEF 5PLFO %1"/ 4FDVSF &MFNFOU '1"/TV⒏Y  IUUQTTVQQPSUBQQMFDPNKBKQ)5 '1"/ˠ%1"/
  9. "QQMF1BZ1BZNFOU'MPX J04%FWJDF /'$$BSE 3FBEFS 1BZNFOU /FUXPSL "VUI ✅ %1"/ 4FDVSF

    &MFNFOU %1"/ˠ'1"/ *TTVFS
  10. w '1"/ 'VOEJOH1SJNBSZ"DDPVOU/VNCFS  w %1"/ %FWJDF1SJNBSZ"DDPVOU/VNCFS  w 1BZNFOUQSPDFTTVTFTFODSZQUFE%1"/POMZ

    OPU'1"/ w &ODSZQUFEBOETUPSFEJO4FDVSF&MFNFOU w %1"/DIBOHFTFWFSZUJNFZPVSFHJTUFS w l5PLFOJ[BUJPOzl5PLFO1BZNFOUz '1"/%1"/
  11. %1"/ TV⒏Y '1"/ TV⒏Y &YQFSJNFOU3FTFUUJOH"QQMF1BZ

  12. None
  13. "QQMF1BZ*O"QQ1SPWJTJPOJOH 'SPNJTTVJOHWJSUVBMDBSEUPBEEJOHJUJOUP"QQMF8BMMFU  "MMQSPDFTTBSFEPOFJO"QQ

  14. "QQMF1BZ*O"QQ1SPWJTJPOJOH *TTVFS "QQMF

  15. "QQMF1BZ*O"QQ1SPWJTJPOJOH *TTVFS "QQMF *TTVFSFRVFTUGPSBWJSUVBM QSFQBJEDBSE

  16. "QQMF1BZ*O"QQ1SPWJTJPOJOH *TTVFS "QQMF *TTVFBWJSUVBMQSFQBJEDBSE '1"/ %1"/

  17. "QQMF1BZ*O"QQ1SPWJTJPOJOH *TTVFS "QQMF 3FRVFTUUPSFHJTUFSDBSEUISPVHI1BTT,JU"1* PassKit - PKAddPaymentPassViewController - PKPassLibrary %1"/

  18. "QQMF1BZ*O"QQ1SPWJTJPOJOH *TTVFS "QQMF 3FHJTUFSDBSEJOUP8BMMFUBQQ 4FDVSF &MFNFOU

  19. %1"/ "QQMF1BZ1BZNFOU'MPX J04%FWJDF /'$$BSE 3FBEFS 1BZNFOU /FUXPSL 4FDVSF &MFNFOU %1"/ˠ'1"/

    "VUI ✅ NFSQBZ
  20. %1"/ TV⒏Y '1"/ TV⒏Y &YQFSJNFOU3FTFUUJOH"QQMF1BZ " HBJO

  21. 1,"EE1BZNFOU1BTT7JFX$POUSPMMFS open class PKAddPaymentPassViewController : UIViewController { public init?( requestConfiguration

    configuration: PKAddPaymentPassRequestConfiguration, delegate: PKAddPaymentPassViewControllerDelegate?) } public protocol PKAddPaymentPassViewControllerDelegate : NSObjectProtocol { public func addPaymentPassViewController(_ controller: PKAddPaymentPassViewController, generateRequestWithCertificateChain certificates: [Data], nonce: Data, nonceSignature: Data, completionHandler handler: @escaping (PKAddPaymentPassRequest) -> Void) public func addPaymentPassViewController(_ controller: PKAddPaymentPassViewController, didFinishAdding pass: PKPaymentPass?, error: Error?) }
  22. 1,1BZNFOU1BTT1,1BTT-JCSBSZ open class PKPaymentPass : PKPass { open var primaryAccountIdentifier:

    String { get } open var primaryAccountNumberSuffix: String { get } weak open var deviceAccountIdentifier: NSString? { get } weak open var deviceAccountNumberSuffix: NSString? { get } } open class PKPassLibrary : NSObject { open func passes() -> [PKPass] open func remotePaymentPasses() -> [PKPaymentPass] open func present(_ pass: PKPaymentPass) open func canAddPaymentPass(withPrimaryAccountIdentifier primaryAccountIdentifier: String) -> Bool open func canAddFelicaPass() -> Bool }
  23. .FSDBSJ "SDIJUFDUVSF0WFSWJFX

  24. GSBNFXPSLT 'SBNFXPSLT

  25. w .FSDBSJ&OUJUZ w .FSDBSJ,JU w ʜ 'SBNFXPSLT

  26. NFSQBZGSBNFXPSL

  27. 4BOECPY"QQT 4BOECPY"QQ

  28. 4FFNPSF w .FSDBSJ5FDI$POG w IUUQTUFDIDPOGNFSDBSJDPNTFTTJPO w J04%$+BQBO w IUUQTGPSUFFKQJPTEDKBQBOQSPQPTBMFGDE EEDBFEFECBB

  29. %FWFMPQJOH "QQMF1BZ*O"QQ1SPWJTJPOJOH 8JUI4BOECPY"QQ

  30. None
  31. 130#-&. w .645UPJOTUBMMUIFBQQWJB5FTU'MJHIUGPS EFCVHHJOH w &WFSZUJNFZPVEFCVH ZPVOFFEUPSFCVJME BOEVQMPBEUIF"QQUP5FTU'MJHIU #VJME 6QMPBE

    5FTU'MJHIU1SPDFTTJOH NJO
  32. w 5FTU'MJHIUQSPDFTTJOHUJNFEFQFOETPOCJOBSZTJ[F w .JOJNJ[FUIFDPEFUPSFEVDFCVJMEJOHBOE5'QSPDFTTJOH UJNF w 4BOECPY"QQJTVTFGVMUPEPJU 3&40-65*0/

  33. 0SHBOJ[FQSPWJTJPOJOHSFMBUFE DPEFJOUPPOFDPNQPOFOU 1SPWJTJPOJOH $PSF 1SPWJTJPOJOH 6* .FSQBZGSBNFXPSL

  34. 4BOECPY"QQXJUI$PSFDPNQPOFOU 1SPWJTJPOJOH $PSF 1SPWJTJPOJOH 6* .FSQBZGSBNFXPSL 4BOECPY "QQ

  35. 3&46-54 1SPWJTJPOJOH $PSFDPNQPOFOUT ,# 4BOECPY"QQ #VJME 6QMPBE 5FTU'MJHIU1SPDFTTJOH NJO Y'BTUFS

  36. 6*JNQMFNFOUBUJPO VTJOH4BOECPY"QQ

  37. 1SPWJTJPOJOH'MPX

  38. 1SPWJTJPOJOH'MPX

  39. 1SPWJTJPOJOH'MPX 4BOECPY "QQ 4UBSU

  40. 1SPWJTJPOJOH$PSF 1SPWJTJPOJOH'MPX 4BOECPY "QQ 4UBSU

  41. %FQFOEFODZ*OKFDUJPO public protocol DependencyRegistry { var service: ServiceType { get

    } var mercariViewControllerFactory: MercariViewControllerFactoryType { get } var mercariExperimentProvider: MercariExperimentsProviderType { get } var nfcClient: NFCClientType { get } … 1SPWJEFTBMMFYUFSOBMFOWJSPONFOUEFQFOEFOUPCKFDUT 1SPWJTJPOJOH $PSF 1SPUPDPM
  42. %FQFOEFODZ3FHJTUSZ %FQFOEFODZ 3FHJTUSZ "MM7JFX$POUSPMMFSTBSFJOJUJBMJ[FEXJUI%FQFOEFODZ3FHJTUSZ

  43. 6*VTFT$PSFDPNQPOFOUUISPVHI %FQFOEFODZ3FHJTUSZ %FQFOEFODZ 3FHJTUSZ 1SPWJTJPOJOH $PSF 1SPWJTJPOJOH 6* .FSQBZGSBNFXPSL 1SPEVDUJPO

    "QQ
  44. .FSQBZGSBNFXPSL 4BOECPY "QQ %FQFOEFODZ 3F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