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

Google Pay - How it Works

Google Pay - How it Works

Example how can integrate with Google Pay

virgiliosolano

July 09, 2019
Tweet

More Decks by virgiliosolano

Other Decks in Programming

Transcript

  1. Request "apiVersion": 2, "apiVersionMinor": 0, "allowedPaymentMethods": [ { "type": "CARD",

    "parameters": { "allowedAuthMethods": [ "PAN_ONLY", "CRYPTOGRAM_3DS" ], "allowedCardNetworks": [ "AMEX", "DISCOVER", "JCB", "MASTERCARD", "VISA" ], "billingAddressRequired": true, "billingAddressParameters": { "format": "FULL" } ... Response "value": @Boolean isReadyToPay
  2. Request { "apiVersion": 2, "apiVersionMinor": 0, "allowedPaymentMethods": [], "transactionInfo": {

    "totalPrice": "110.00", "totalPriceStatus": "FINAL", "currencyCode": "BRL" }, "merchantInfo": { "merchantName": "Merchant" }, "shippingAddressRequired": true, "shippingAddressParameters": { "phoneNumberRequired": false, "allowedCountryCodes": [ "BR", "US", "GB" ] loadPaymentData "allowedPaymentMethods": [{ "type": "CARD", "parameters": { "allowedAuthMethods": [ "PAN_ONLY", "CRYPTOGRAM_3DS" ], "allowedCardNetworks": [ "MASTERCARD", "VISA" ], "billingAddressRequired": true, "billingAddressParameters": { "format": "FULL" } }, "tokenizationSpecification": { "type": "PAYMENT_GATEWAY", "parameters": { "gateway": "stripe", "stripe:publishableKey": "pk_test_bgGMqPA9qAaz2VXeVLiIZF74", "stripe:version": "2018-11-08" }
  3. Response loadPaymentData "apiVersionMinor": 0, "apiVersion": 2, "paymentMethodData": { "description": "Mastercard •••• 9226",

    "tokenizationData": { "type": "PAYMENT_GATEWAY", "token": { "id": "tok_1EXPXOBC0306gJTcTpYUtNVl", "object": "token", "card": {}, "client_ip": "74.125.113.100", "created": 1557221078, "livemode": false, "type": "card", "used": false } }, "type": "CARD", "info": {...}, "shippingAddress": {...} } "card": { "id": "card_1EXPXOBC0306gJTc1O5uszoA", "object": "card", "address_city": null, "address_country": null, "address_line1": null, "address_line1_check": null, "address_line2": null, "address_state": null, "address_zip": null, "address_zip_check": null, "brand": "MasterCard", "country": "US", "cvc_check": null, "dynamic_last4": "4242", "exp_month": 12, "exp_year": 2025, "funding": "credit", "last4": "9226", "metadata": {}, "name": "Virgilio Magalhaes", "tokenization_method": "android_pay" },
  4. Response loadPaymentData "apiVersionMinor": 0, "apiVersion": 2, "paymentMethodData": { "description": "Mastercard •••• 9226",

    "tokenizationData": { "type": "PAYMENT_GATEWAY", "token": { "id": "tok_1EXPXOBC0306gJTcTpYUtNVl", "object": "token", "card": {...}, "client_ip": "74.125.113.100", "created": 1557221078, "livemode": false, "type": "card", "used": false } }, "type": "CARD", "info": {...}, "shippingAddress": {...} } "info": { "cardNetwork": "MASTERCARD", "cardDetails": "9226", "billingAddress": { "address3": "", "sortingCode": "", "address2": "aus res, bloco a, ap 702", "countryCode": "BR", "address1": "Rua 39 Norte", "postalCode": "72913-180", "name": "Virgilio Magalhaes", "locality": "Brasília", "administrativeArea": "DF" ... "shippingAddress": { "address3": "", "sortingCode": "", "address2": "aus res, bloco a, ap 702", "countryCode": "BR", "address1": "Rua 39 Norte", "postalCode": "72913-180", "name": "Virgilio Magalhaes", "locality": "Brasília", "administrativeArea": "DF" }
  5. Stripe integration 1 - Create an account here: https://dashboard.stripe.com/test/apikeys 2-

    Read integration instructions for Android: https://stripe.com/docs/mobile/android/google-pay 3 - All development are ready in sample app: https://github.com/google-pay/android-quickstart 4 - You need to override the app parameters and token to stripe public key 5 - The new sample app with credentials are available: https://github.com/virgiliosolano/googlepay