מדריך

במדריך הזה מוסבר איך לשלב אפליקציית אינטרנט עם Google Pay API ואיך להגדיר אותה לקבלת כרטיסי תשלום.

שלב 1: מגדירים את גרסת Google Pay API

מצהירים על הגרסה של Google Pay API שבה האתר שלכם משתמש. הגרסאות העיקריות והמשניות נדרשות בשדות של כל אובייקט שעובר, והן נכללות בתגובה.

בדוגמת הקוד הבאה מוצגות גרסאות API מוצהרות:

const baseRequest = {
  apiVersion: 2,
  apiVersionMinor: 0
};

שלב 2: מבקשים טוקן תשלום מספק התשלומים

‫Google מצפינה את המידע על הכרטיס שנבחר על ידי משלם כדי שספק התשלום יוכל לעבד אותו בצורה מאובטחת.

const tokenizationSpecification = {
  type: 'PAYMENT_GATEWAY',
  parameters: {
    'gateway': 'example',
    'gatewayMerchantId': 'exampleGatewayMerchantId'
  }
};

מחליפים את הערכים example ו-exampleGatewayMerchantId בערכים המתאימים לספק התשלומים שלכם. בטבלה הבאה אפשר למצוא את הערכים הספציפיים של gateway ושל gatewayMerchantId לספק התשלומים שלכם:

שער פרמטרים ומסמכים
‫9Pay
  "gateway": "ninepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

ABA PayWay
  "gateway": "ababank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

accept.blue
  "gateway": "acceptblue"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

ACI
  "gateway": "aciworldwide"
  "gatewayMerchantId": "YOUR_ENTITY_ID"

תיעוד למפתחים

ACpay
  "gateway": "acpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Acquired.com
  "gateway": "acquired"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Adyen
  "gateway": "adyen"
  "gatewayMerchantId": "YOUR_MERCHANT_ACCOUNT_NAME"

תיעוד למפתחים

AI Fintech
  "gateway": "aifintech"
  "gatewayMerchantId": "YOUR_MERCHANT_ACCOUNT_NAME"

תיעוד למפתחים

Airba Pay
  "gateway": "airbapay""
  "gatewayMerchantId": "YOUR_MERCHANT_ACCOUNT_NAME"

תיעוד למפתחים

Airvend
  "gateway": "airvend"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Airwallex
  "gateway": "airwallex"
  "gatewayMerchantId": "YOUR_MERCHANT_ACCOUNT_NAME"

תיעוד למפתחים

Akurateco
  "gateway": "akuratecolab"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Alfa-Bank
  "gateway": "alfabank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Algoritma
  "gateway": "algoritma"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Allinpay
  "gateway": "allinpayintl"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

AllPayments
  "gateway": "allpayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

alticepay
  "gateway": "alticepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

AMO FINTECH LLC
  "gateway": "amofintech"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Amwal Pay
  "gateway": "amwalalraqamia"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

אין מסמכי תיעוד למפתחים

Anedot
  "gateway": "anedot"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

ApcoPay
  "gateway": "apcopay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

APPEX
  "gateway": "epos"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

AsiaBill
  "gateway": "asiabill"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

אין מסמכי תיעוד למפתחים

סיוע
  "gateway": "assist"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Assist Belarus
  "gateway": "belassist"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Assist Kazakhstan
  "gateway": "assistkz"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Aurus
  "gateway": "auruspay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Authorize.net
  "gateway": "authorizenet"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Axerve
  "gateway": "gestpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

azericardgpay
  "gateway": "azericardgpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

B2B Soft Pay
  "gateway": "b2bsoftpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Bank 131
  "gateway": "bank131"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

BANK RBK
  "gateway": "bankrbkkzpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Bank Vostok
  "gateway": "bankvostok"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Barclaycard
  "gateway": "barclayssmartpayadvance"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Barion
  "gateway": "barion"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Basis Theory
  "gateway": "basistheory"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

BCC.KZ
  "gateway": "bccpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

bePaid
  "gateway": "ecomcharge"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Bereke Bank
  "gateway": "berekepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

מערכות חיוב
  "gateway": "billingsystems"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Bindo Labs Limited
  "gateway": "bindo"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

bisys.kz
  "gateway": "bisysgpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Bizzon
  "gateway": "bizzon"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

חסימות
  "gateway": "blocks"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Bluefin
  "gateway": "bluefin"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Bluefin Europe
  "gateway": "bluefineurope"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Blue Media
  "gateway": "bluemedia"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

BlueSnap
  "gateway": "bluesnap"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

BORICA
  "gateway": "borica"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

BPC
  "gateway": "bpcpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

BR-DGE
  "gateway": "comcarde"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Braintree
  "gateway": "braintree"
  "braintree:apiVersion": "v1"
  "braintree:sdkVersion": "braintree.client.VERSION"
  "braintree:merchantId": "YOUR_BRAINTREE_MERCHANT_ID"
  "braintree:clientKey": "YOUR_BRAINTREE_TOKENIZATION_KEY"

תיעוד למפתחים

Braspag
  "gateway": "cielo"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

BridgerPay
  "gateway": "bridgerpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

BT Pay
  "gateway": "btpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Buckaroo
  "gateway": "buckaroo"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Buya
  "gateway": "buya"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

CardCom
  "gateway": "cardcom"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

CardConnect
  "gateway": "cardconnect"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Cardknox
  "gateway": "cardknox"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

cardlink
  "gateway": "cardlink"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Cardstream
  "gateway": "crst"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

תזרים מזומנים
  "gateway": "cashflowsgateway"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Cathay United Bank
  "gateway": "cathaybk"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

CCAvenue UAE
  "gateway": "ccavenueuae"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

CCV (צופים בו-זמנית)
  "gateway": "ccv"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Cecabank
  "gateway": "cecabank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Celerispay
  "gateway": "celerispay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

CentralPay
  "gateway": "centralpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Chargehive
  "gateway": "chargehive"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

CharityEngine
  "gateway": "charityengine"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Chase Merchant Services
  "gateway": "chase"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Checkout.com
  "gateway": "checkoutltd"
  "gatewayMerchantId": "YOUR_PUBLIC_KEY"

תיעוד למפתחים

CityPay
  "gateway": "citypay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Cloud9 Payment Gateway (C9PG)
  "gateway": "c9pg"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

CloudPayments
  "gateway": "cloudpayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

CloudWalk
  "gateway": "cloudwalk"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Coinflow
  "gateway": "coinflow"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Computop
  "gateway": "computop"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

ConcordPay
  "gateway": "concordpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Connectum
  "gateway": "connectum"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

ConnexPay
  "gateway": "connexpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

CoralPay
  "gateway": "coralpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Corefy
  "gateway": "paycoreio"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Corvus Pay
  "gateway": "corvuspay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Credorax
  "gateway": "credorax"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

CrossPay
  "gateway": "crosspay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Cross Switch
  "gateway": "crossswitch"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

CSG Forte
  "gateway": "csgforte"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

CTBC Bank
  "gateway": "ctbcbank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

CURO Payments
  "gateway": "curopayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

CYBERBIZ
  "gateway": "cyberbizpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Cybersource
  "gateway": "cybersource"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

danube.pay
  "gateway": "danubepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Datacap Systems, Inc.
  "gateway": "datatrans"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Datatrans
  "gateway": "datatrans"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

DECTA
  "gateway": "decta"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

אין מסמכי תיעוד למפתחים

Dejavoo
  "gateway": "denovosystempay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

DEUNA
  "gateway": "deuna"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Deutsche Bank AG
  "gateway":
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

אין מסמכי תיעוד למפתחים

Deutsche Bank – Merchant Solutions
  "gateway":
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

DG Financial Technology, Inc.‎
  "gateway": "veritrans"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

מימון דיגיטלי
  "gateway": "digitalfinance"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Dintero
  "gateway": "dintero"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

dLocal
  "gateway": "dlocal"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

DNA Payments
  "gateway": "dnapayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

דוג'ו
  "gateway": "dojo"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Dotpay
  "gateway": "dotpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

e-SiTef - Software Express
  "gateway": "softwareexpress"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

easycard
  "gateway": "easycard"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

EasyPay
  "gateway": "easypay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Easypay EU
  "gateway": "easypaypt"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

EBANX
  "gateway": "ebanx"
  "gatewayMerchantId": "YOUR_PUBLIC_INTEGRATION_KEY"

תיעוד למפתחים

eCard
  "gateway": "ecard"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

ECOMMPAY
  "gateway": "ecommpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Ecopaynet
  "gateway": "ecopaynet"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

ECPay
  "gateway": "ecpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

אין מסמכי תיעוד למפתחים

eftcorporation
  "gateway": "eftcorporation"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

eGHL
  "gateway": "eghl"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Elavon (Converge)
  "gateway": "convergepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Emerchantpay
  "gateway": "emerchantpay"
  "gatewayMerchantID": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

emspay
  "gateway": "emsonline"
  "gatewayMerchantID": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

מקודד
  "gateway": "encoded"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

epay
  "gateway": "epay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

EPAYJSC
  "gateway": "epayjsc"
  "gatewayMerchantID": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

EpicPay
  "gateway": "epicpay"
  "gatewayMerchantID": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Espago
  "gateway": "espago"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Etisalat
  "gateway": "etisalatpaymentgateway"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

אין מסמכי תיעוד למפתחים

EveryPay S.A.
  "gateway": "EveryPay S.A."
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Evervault
  "gateway": "evervault"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

EVONET
  "gateway": "cardinfolink"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

EVOPAY
  "gateway": "EVOPAY"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Evo Payment Gateway
  "gateway": "evopaymentgateway"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

אין מסמכי תיעוד למפתחים

exactly.com
  "gateway": "exactly"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Exact Payments
  "gateway": "exactpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Fat Zebra
  "gateway": "fatzebra"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Fenige
  "gateway": "fenige"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Fexco payUnite
  "gateway": "fexco"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Fibonatix
  "gateway": "fibonatixparagon"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Financial Line
  "gateway": "finline"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Finanso UA
  "gateway": "finansoua"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

fincode byGMO
  "gateway": "fincode"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

FINEXUS
  "gateway": "finexus"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Finix
  "gateway": "finix"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

First American by Deluxe
  "gateway": "firstpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Fiuu (לשעבר Razer Merchant Services ו-MOLPay)
  "gateway": "molpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

FIS Biller Solutions
  "gateway": "fisglobalbsp"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Fiserv
  "gateway": "fiserv"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Fiserv
  "gateway": "fiservipg"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Flitt
  "gateway": "flitt"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Fluid Pay
  "gateway": "fluidpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

FM Finance LTD
  "gateway": "fmfinanceltd"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

ForteBank
  "gateway": "fortebank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

פרקטל
  "gateway": "fractal"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Freedom Finance Bank
  "gateway": "axayscom"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

FreedomPay
  "gateway": "freedompay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

FreedomPay.Money
  "gateway": "payboxmoney"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Freepay
  "gateway": "freepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Frontstream
  "gateway": "frontstreampayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Fung Payments
  "gateway": "fungpayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

GBPayments
  "gateway": "gbpayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

geidea
  "gateway": "geidea"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

GETTRX
  "gateway": "globalelectronictechnology"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Global One Pay
  "gateway": "globalonepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

אין מסמכי תיעוד למפתחים

Global Payments
  "gateway": "globalpayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

globalpaymentsinc
  "gateway": "globalpaymentsinc"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

GMO Payment Gateway
  "gateway": "gmopg"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

GoDaddy Payments
  "gateway": "godaddypayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Good Idea Technologies
  "gateway": "git"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

GoPay
  "gateway": "gopay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

GP Webpay
  "gateway": "gpwebpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

אין מסמכי תיעוד למפתחים

Gravity Payments
  "gateway": "gravitypayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Gr4vy
  "gateway": "gr4vy"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Halyk Bank
  "gateway": "halykbank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Helcim
  "gateway": "helcim"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

HIPS
  "gateway": "hips"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

HiTrust
  "gateway": "hitrustpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

hutko
  "gateway": "hutko"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Hyp
  "gateway": "hyp"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

icard
  "gateway": "icardwallet"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

iCount
  "gateway": "iCount"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

IDid Tecnologia Ltda
  "gateway": "idid"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

iKhokha
  "gateway": "ikhokha"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

IMOJE
  "gateway": "imoje"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Impaya
  "gateway": "impayarus"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Inovio Payments
  "gateway": "inoviopay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

InPlat
  "gateway": "inplat"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

InstaMed
  "gateway": "instamed"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

IntaSend Solutions Limited
  "gateway": "intasend"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

IntellectMoney
  "gateway": "intellectmoney"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

פתרונות אינטראקטיביים לעסקאות
  "gateway": "interactivets"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

גלריית התשלומים של Interswitch
  "gateway": "interswitch"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Intervale
  "gateway": "intervale"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

ioka fintech
  "gateway": "ioka"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

iPay88
  "gateway": "ipay88"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

IPSI
  "gateway": "ipsi"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

iQmetrix
  "gateway": "iqmetrixpaymentservicesgateway"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

IXOPAY
  "gateway": "ixopay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

JetPay
  "gateway": "jetpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

JudoPay
  "gateway": "judopay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

אין מסמכי תיעוד למפתחים

KapitalBank
  "gateway": "eCommerceKapitalBank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Kassa
  "gateway": "kassacom"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

kassa24pay
  "gateway": "kassa24pay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Kineox
  "gateway": "kineox"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Klix by Citadele
  "gateway": "klix"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Koin
  "gateway": "koin"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

KPay Group
  "gateway": "kpaygroup"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Lapsa Payments
  "gateway": "lapsapayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

LHV Pank
  "gateway": "lhvpank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Liberty
  "gateway": "liberty"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Life Pay
  "gateway": "lifepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Limepay
  "gateway": "limepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Linkly
  "gateway": "linkly"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

LiqPay
  "gateway": "liqpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

LITIQON OÜ
  "gateway": "nuvex"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Littlepay
  "gateway": "littlepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

LogPay
  "gateway": "logpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Loyale
  "gateway": "loyale"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

lynck
  "gateway": "lynck"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

קוסמוס
  "gateway": "lyra"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Magnetiq Bank
  "gateway": "magnetiq"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

maib
  "gateway": "maibecomm"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

MakeCommerce (Maksekeskus)
  "gateway": "maksekeskus"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Maksu GMBH
  "gateway": "maksupayeu"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

מנדרינית
  "gateway": "mandarin"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Market Pay
  "gateway": "marketpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

שירותי Payment Gateway של Mastercard
  "gateway": "mpgs"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

MerchantE
  "gateway": "merchante"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Midtrans
  "gateway": "midtrans"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Merchant Warrior
  "gateway": "merchantwarrior"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Minsait Payments Systems
  "gateway": "minsaitpaymentsgateway"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

MITEC
  "gateway": "mitecmx"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

MIXPLAT
  "gateway": "mixplat"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

MOBI.Money
  "gateway": "mobimoney"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Modulbank
  "gateway": "modulbank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Mollie
  "gateway": "mollie"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Mondido
  "gateway": "mondido"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Monei
  "gateway": "monei"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

monek
  "gateway": "monek"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Moneris
  "gateway": "moneris"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Moneta
  "gateway": "moneta"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

אין מסמכי תיעוד למפתחים

Monext
  "gateway": "monext"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

MoneyHash
  "gateway": "moneyhash"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Money.Mail.Ru
  "gateway": "moneymailru"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

monripayments
  "gateway": "monripayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Moov
  "gateway": "moov"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

MPay
  "gateway": "managepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

mstartipg
  "gateway": "mstartipg"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Multicarta
  "gateway": "mulitcarta"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

MultiSafepay
  "gateway": "multisafepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Mundipagg
  "gateway": "mundipagg"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

MyCheck
  "gateway": "mycheck"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

MyChoice2Pay
  "gateway": "mychoice2pay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

MyFatoorah
    "gateway": "myfatoorah"
    "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

MyPay
  "gateway": "mypay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

אין מסמכי תיעוד למפתחים

myPOS
  "gateway": "mypos"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

N&TS Group
  "gateway": "netsgroup"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

NCCC
  "gateway": "nccc"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Neolink
  "gateway": "neolinkprocessing"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Neon Pay
  "gateway": "neonpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Netopia
  "gateway": "netopia"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Netvalve
  "gateway": "netvalve"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Network International
  "gateway": "networkintl"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Newebpay (לשעבר STPath, ‏ Pay2Go)
  "gateway": "newebpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Newtech
  "gateway": "newtechmobile"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Nexi
  "gateway": "nexi"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Nexi Easy
  "gateway": "easy"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

NMI
  "gateway": "gatewayservices"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

תשלומים בצהריים
  "gateway": "noonpayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Noqoody Pay
  "gateway": "noqoodypay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Novalnet
  "gateway": "novalnet"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Nexi Relay
  "gateway": "nexirelay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

NTT DATA
  "gateway": "nttdatahk"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Nuvei
  "gateway": "nuvei"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Oceanpayment
  "gateway": "oceanpayment"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Omise
  "gateway": "omise"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Omno
  "gateway": "omno"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

One Inc
  "gateway": "oneinc"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Onelya
  "gateway": "onelya"
  "gatewayMerchantId": "YOUR_GATWAY_MERCHANT_ID"

תיעוד למפתחים

Onerway
  "gateway": "ronghan"
  "gatewayMerchantId": "YOUR_GATWAY_MERCHANT_ID"

תיעוד למפתחים

OneVision Limited
  "gateway": "onevision"
  "gatewayMerchantId": "YOUR_GATWAY_MERCHANT_ID"

תיעוד למפתחים

OnPay
  "gateway": "onpayio"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Opayo by Elavon
  "gateway": "opayoelavon"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

OrkestaPay
  "gateway": "orkestapay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Oschadbank
  "gateway": "oschadbank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

pagarme
  "gateway": "pagarme"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PagBank
  "gateway": "pagbank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PagBrasil
  "gateway": "pagbrasil"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PagSeguro
  "gateway": "pagsegurointernational"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PAY2M
  "gateway": "pay2m"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Payarc
  "gateway": "payarc"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Pay.com
  "gateway": "paycom"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PAYCOMET
  "gateway": "paycomet"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Paycross Ltd
  "gateway": "paycross"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Paydock
  "gateway": "paydock"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PayEase
  "gateway": "payeasenet"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PayEngine
  "gateway": "payengine"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PayerMax
  "gateway": "payermax"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PayFabric
  "gateway": "payfabric"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PayFacto
  "gateway": "payfacto"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PayFast
  "gateway": "gopayfastuat"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

paygent
  "gateway": "paygent"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Payhub
  "gateway": "payhub"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PayKKa
  "gateway": "paykkaeu"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PayLane
  "gateway": "paylane"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Payler
  "gateway": "payler"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PayLink®‎
  "gateway": "paylink"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

מטען ייעודי
  "gateway": "payload"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Paymark
  "gateway": "paymark"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PayMaster
  "gateway": "paymaster"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

פיוז'ן תשלומים
  "gateway": "paymentfusion"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Paymentvision
  "gateway": "paymentvision"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Paymentwall
  "gateway": "paymentwall"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Paymo
  "gateway": "paymo"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Paymob
  "gateway": "gpaymob"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PayMongo
  "gateway": "paymongo"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Paymtech
  "gateway": "paymtech"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PayNearMe
  "gateway": "paynearme"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Payneteasy
  "gateway": "payneteasy"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Pay.nl
  "gateway": "paynl"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Paynopain
  "gateway": "paynopain"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PayOne
  "gateway": "payone"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PayOnline
  "gateway": "payonline"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Payoo
  "gateway": "payoo"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Pay Theory
  "gateway": "paytheory"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PayPlus
  "gateway": "payplus"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PayPro Pvt Ltd
  "gateway": "paypro"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

אין מסמכי תיעוד למפתחים

Payrails
  "gateway": "payrails"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Payrexx
  "gateway": "payrexx"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PayRiff
  "gateway": "payriff"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Payrix
  "gateway": "payrix"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Paysafe
  "gateway": "paysafe"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Payscout
  "gateway": "payscout"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Paysend Business
  "gateway": "paysend"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Paysoft
  "gateway": "paysoft"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Pay360
  "gateway": "pay360"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

paytech
  "gateway": "paytechsolutions"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PayTech Ukraine
  "gateway": "paytech"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Payten Payment Gateway
  "gateway": "paytentr"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Paythru
  "gateway": "paythru"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Payture
  "gateway": "payture"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PayU
  "gateway": "payu"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PayU LATAM
  "gateway": "payulatam"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PAYUNi
  "gateway": "payuni"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PayU Romania
  "gateway": "payuro"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PayU Russia
  "gateway": "payuru"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Payway
  "gateway": "payway"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Paywiser
  "gateway": "paywiser"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Payzone Ireland
  "gateway": "payzoneireland"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PBT Gateway Services Ltd
  "gateway": "pbtgateway"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Pelecard
  "gateway": "pelecard"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Pensopay
  "gateway": "pensopay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Pikassa
  "gateway": "pikassa"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PingPong
  "gateway": "pingpongx"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Pin Payments
  "gateway": "pinpayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

כוכב לכת
  "gateway": "cccpayment"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PlanetPay
  "gateway": "itcardpaymentservice"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Plategka.com
  "gateway": "plategkacom"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Platon
  "gateway": "platon"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

פומלה
  "gateway": "pomelopay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Portmone
  "gateway": "portmonecom"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Preczn
  "gateway": "preczn"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PrimePay
  "gateway": "primepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Primer
  "gateway": "primer"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Procard
  "gateway": "procard"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

ProcessOut
  "gateway": "processout"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Przelewy24
  "gateway": "przelewy24"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PSCB
  "gateway": "pscbru"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PSiGate Inc.
  "gateway": "psigate"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

PXP Financial
  "gateway": "pxpfinancial"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Qenta Payment CEE
  "gateway": "qenta"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

QIWI
  "gateway": "qiwi"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Qualpay
  "gateway": "qualpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

QuickPay
  "gateway": "quickpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Qvalent
  "gateway": "qvalent"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

רדיאלי
  "gateway": "radial"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Raiffeisen Processing Centre
  "gateway": "raiffeisenprocessingcentre"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Rapyd
  "gateway": "rapyd"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

RBK.money
  "gateway": "rbkmoney"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Rebail Capital
  "gateway": "rebailcapital"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Rebilly
  "gateway": "Rebilly"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Recurly
  "gateway": "recurly"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Reddot
  "gateway": "reddotpayment"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Rede
  "gateway": "rede"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Redsys
  "gateway": "redsys"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Reepay
  "gateway": "reepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

RocketGate
  "gateway": "rocketgate"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

קו השורש
  "gateway": "rootline"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Russian Standard Bank
  "gateway": "rsb"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Ryft
  "gateway": "ryft"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Safepay
  "gateway": "safepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Saferpay
  "gateway": "worldlinesaferpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Safexpay
  "gateway": "safexpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Sberbank
  "gateway": "sberbank"
  "gatewayMerchantId": "YOUR_ORGANIZATION_NAME"

תיעוד למפתחים

SEB Baltic
  "gateway": "sebbaltic"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

טכנולוגיית SEBES
  "gateway": "sebes"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

SecurePay
  "gateway": "securepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Sense Bank
  "gateway": "sensebank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

SensePass
  "gateway": "sensepass"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Servicios Digitales Popular S.A.
  "gateway": "pagosazul"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Shift4
  "gateway": "shift4payments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Shiji Group
  "gateway": "shijipaymentsolutions"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

SH Start High
  "gateway": "shstartpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

shvarenapay
  "gateway": "shvarenapay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

simbasoft
  "gateway": "simbasoft"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Sipay
  "gateway": "sipay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

SmartPay
  "gateway": "smartpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Softbank Payment Service
  "gateway": "sbps"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Softtouch POS and Payments
  "gateway": "softtouch"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

מוצק
  "gateway": "solid"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

שירותי תשלום של Sony
  "gateway": "sonypaymentservices"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Splitit
  "gateway": "splitit"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Spreedly
  "gateway": "spreedly"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

ריבוע
  "gateway": "square"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

SredaPay
  "gateway": "sredapay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

SSLCOMMERZ
  "gateway": "sslcommerz"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Stancer
  "gateway": "stancer"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Stripe
  "gateway": "stripe"
  "stripe:version": "2018-10-31"
  "stripe:publishableKey": "YOUR_PUBLIC_STRIPE_KEY"

תיעוד למפתחים

SUMIT
  "gateway": "sumit"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Suntech
  "gateway": "esafe"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

תשלומים על גלשנים
  "gateway": "surfboard"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Svea Bank
  "gateway": "svea"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Swedbank Baltic
  "gateway": "swedbankbaltic"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Swedbank Pay
  "gateway": "payexswedbankpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

TabaPay
  "gateway": "tabapay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

TapPay (Cherri Tech)
  "gateway": "tappay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

TapPayments
  "gateway": "tappayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

tarlanpayments
  "gateway": "tarlanpayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

TAS Link
  "gateway": "taslink"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Tatra banka (CardPay)
  "gateway": "tatrabanka"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

אין מסמכי תיעוד למפתחים

TEKO
  "gateway": "teko"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

theMAP
  "gateway": "themap"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Till Payments
  "gateway": "tillpayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Time Project LLC
  "gateway": "timeproject"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Tinkoff
  "gateway": "tinkoff"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

TIPTOP PAY
  "gateway": "tiptoppay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

אין מסמכי תיעוד למפתחים

TPay
  "gateway": "tpaycom"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

TPay.com
  "gateway": "tpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Transact Campus
  "gateway": "transactcampus"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Transact Pro
  "gateway": "transactpro"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

רשת שירותי עסקאות
  "gateway": "tns"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Transpayrent
  "gateway": "transpayrent"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Tranzila
  "gateway": "tranzila"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Tranzzo
  "gateway": "tranzzo"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Tribe Payments
  "gateway": "tribepayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Truevo
  "gateway": "truevo"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

TrustPay
  "gateway": "trustpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Trust Payments
  "gateway": "trustpayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

טונה
  "gateway": "tuna"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

2can&ibox
  "gateway": "twocan"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

UAPAY
  "gateway": "uapay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

UBRR
  "gateway": "ubrrpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Ukrcardpay
  "gateway": "ukrcardpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

UkrGasBank Pay
  "gateway": "ukrgasbankpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Unibank OJSC
  "gateway": "unibankcheckout"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

unitedfinancialcorporation
  "gateway": "unitedfinancialcorporation"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Uniteller
  "gateway": "uniteller"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Unitpay
  "gateway": "unitpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Unlimint
  "gateway": "unlimint"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Unzer
  "gateway": "unzer"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Unzer Austria
  "gateway": "unzeraustria"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

UPC
  "gateway": "upc"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Upgate
  "gateway": "upgate"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

USAePay
  "gateway": "usaepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

UseePay
  "gateway": "useepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

USIO, Inc.
  "gateway": "usio"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Valitor
  "gateway": "valitor"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

value.io
  "gateway": "inspirecommerce"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Vanco
  "gateway": "vanco"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

VantagePay
  "gateway": "vantagepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

אין מסמכי תיעוד למפתחים

Vantiv
  "gateway": "vantiv"
  "vantiv:merchantPayPageId": "YOUR_PAY_PAGE_ID"
  "vantiv:merchantOrderId": "YOUR_ORDER_ID"
  "vantiv:merchantTransactionId": "YOUR_TRANSACTION_ID"
  "vantiv:merchantReportGroup": "*web"

תיעוד למפתחים

Vayapay
  "gateway": "vayapay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

אין מסמכי תיעוד למפתחים

Vendo
  "gateway": "vendoservices"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Verestro
  "gateway": "verestro"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

אבטחה טובה מאוד
  "gateway": "verygoodsecurity"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Victoriabank
  "gateway": "victoriabank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Vindicia
  "gateway": "vindicia"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Viva Wallet
  "gateway": "vivawallet"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

VTEX
  "gateway": "vtex"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Waffo
  "gateway": "waffo"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Wallee
  "gateway": "wallee"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Walletdoc
  "gateway": "walletdoc"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Walletto
  "gateway": "walletto"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

WayForPay
  "gateway": "wayforpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

WEAT
  "gateway": "weatpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

WhenThen
  "gateway": "whenthen"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Windcave
  "gateway": "windcave"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Wirebank
  "gateway": "wirebank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Wirecard
  "gateway": "wirecard"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

WOOPPAY
  "gateway": "wooppay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

WooshPay
  "gateway": "swooshtransfer"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Worldline (GlobalCollect)
  "gateway": "globalcollect"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Worldline - Ingenico (WL Online Checkout)
  "gateway": "worldlineingenicoogone"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

‫Worldline Nordics (Worldline Online Checkout)
  "gateway": "worldlineonlinecheckout"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Worldline Sips
  "gateway": "wlsips"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Worldnet
  "gateway": "worldnet"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Worldpay
  "gateway": "worldpay"
  "gatewayMerchantId": "YOUR_WORLDPAY_MERCHANT_ID"

תיעוד למפתחים

Wpay
  "gateway": "wpayaus"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

WSPay
  "gateway": "wspay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

xMoney
  "gateway": "xmoneypay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

XPATE
  "gateway": "xpate"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

xpay
  "gateway": "xpaycomua"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

XPay by PostEx
  "gateway": "xpaybypostex"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

YabandPay B.V.
  "gateway": "yabandpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

מערכת התשלומים YIĞIM
  "gateway": "yigim"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

אין מסמכי תיעוד למפתחים

‫ЮKassa (YooKassa)
  "gateway": "yoomoney"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Yuno
  "gateway": "yuno"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Z-credit
  "gateway": "zcredit"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Zalopay
  "gateway": "zalopay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

ZEN.com
  "gateway": "zen"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Zest
  "gateway": "zestpayment"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

Zuora
  "gateway": "zuora"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

תיעוד למפתחים

טיפ: example הוא שם שער תקין בסביבת הבדיקה. אם רוצים לנסות את ה-API, אפשר להשאיר את דוגמת הקוד שלמעלה כמו שהיא. כשמשתמשים בשער example, האתר לא מקבל נתוני כרטיס שאפשר לבצע איתם עסקה, אבל תהליך המשתמש נראה אותו דבר.

סוג הטוקניזציה PAYMENT_GATEWAY הוא ההטמעה הכי נפוצה של אמצעי התשלום בכרטיס על ידי מוכרים ב-Google Pay API. אם ספק התשלומים שלכם לא נתמך, יכול להיות שתוכלו לקבל תשלומים באמצעות Google Pay על ידי שילוב ישיר. מידע נוסף זמין במאמרי העזרה בנושא טוקניזציה ישירה.

שלב 3: מגדירים את הרשתות הנתמכות של כרטיסי התשלום

מגדירים את רשתות הכרטיסים שמתקבלות באתר. דוגמת קוד:

const allowedCardNetworks = ["AMEX", "DISCOVER", "INTERAC", "JCB", "MASTERCARD", "VISA"];

יכול להיות שממשק Google Pay API יחזיר כרטיסים שרשומים ב-Google.com‏ (PAN_ONLY) או טוקן של מכשיר במכשיר מבוסס-Android שאומת באמצעות קריפטוגרמה של 3D Secure‏ (CRYPTOGRAM_3DS). אתם יכולים לקבוע אם הממשק יחזיר את שתי השיטות או רק אחת מהן.

לפני שמגדירים את allowedCardAuthMethods, צריך לוודא מול ספק שירותי התשלומים והבנק הרוכש אם אסימוני מכשיר (CRYPTOGRAM_3DS) נתמכים באזור שלכם.

דוגמת קוד:

const allowedCardAuthMethods = ["PAN_ONLY", "CRYPTOGRAM_3DS"];

מידע נוסף זמין במאמרי העזרה בנושא CardParameters. כדאי גם לבדוק עם שער התשלומים או עם מעבד התשלומים אילו רשתות כרטיסים נתמכות, ואם יש תמיכה בטוקנים של מכשירי Android.

חשוב לדעת:
  • חשוב לוודא שאתם מיישמים גם את הבדיקות הקיימות שלכם לזיהוי סיכונים ואת אמצעי הבקרה הקיימים שלכם על עסקאות תשלום גם על עסקאות ב-Google Pay. האימות ובדיקות ההונאה של Google Pay לא נועדו להחליף את תהליכי ניהול הסיכונים שלכם.
  • אם אתם תומכים ב-PAN_ONLY, אתם צריכים להפעיל אימות 3D Secure (אימות דו-שלבי) לעסקאות של כרטיסי PAN ב-Google Pay PAN_ONLY באותו אופן שבו אתם מפעילים אימות 3D Secure לעסקאות רגילות בכרטיס.

שלב 4: תיאור אמצעי התשלום המותרים

כדי לתאר את אמצעי התשלום המותרים, פועלים לפי השלבים הבאים:

  1. כדי לתאר את התמיכה באתר באמצעי התשלום CARD, צריך לשלב בין שיטות האימות הנתמכות ורשתות הכרטיסים הנתמכות. דוגמת קוד:
    const baseCardPaymentMethod = {
      type: 'CARD',
      parameters: {
        allowedAuthMethods: allowedCardAuthMethods,
        allowedCardNetworks: allowedCardNetworks
      }
    };
  2. מרחיבים את אובייקט אמצעי התשלום של כרטיס הבסיס כדי לתאר את המידע שצפוי לחזור לאפליקציה. צריך לכלול תיאור של נתוני התשלום שעברו טוקניזציה. דוגמת קוד:
    const cardPaymentMethod = Object.assign(
      {tokenizationSpecification: tokenizationSpecification},
      baseCardPaymentMethod
    );
  3. מידע נוסף על parameters נתמכים זמין במאמר CardParameters.

    בשלב הזה, Google Pay תומך רק בסוג אמצעי התשלום CARD.

שלב 5: טעינה של ספריית JavaScript של Google Pay API

כדי לטעון את ספריית JavaScript של Google Pay API, צריך לבצע את השלבים הבאים:

  1. כוללים בדף את קובץ ה-JavaScript שמתארח ב-Google. דוגמת קוד:
    <script
      async
      src="https://pay.google.com/gp/p/js/pay.js"
      onload="console.log('TODO: add onload function')">
    </script>
  2. אחרי שספריית JavaScript של Google Pay API נטענת, מאתחלים אובייקט PaymentsClient. בשלב הפיתוח הראשוני נעשה שימוש בסביבת TEST, שמחזירה אמצעי תשלום פיקטיביים שמתאימים להפניה למבנה של תגובת תשלום. בסביבה הזו, אמצעי התשלום שנבחר לא יכול לבצע עסקה. דוגמת קוד:
    הערה: מומלץ לאתחל את paymentsClient רק פעם אחת. משתמשים באותו מופע כשמפעילים את כל שאר ממשקי ה-API, כמו CreateButton,‏ IsReadyToPay,‏ PrefetchPaymentData ו-LoadPaymentData.
    const paymentsClient =
        new google.payments.api.PaymentsClient({environment: 'TEST'});

    למידע נוסף על הדרישות לסביבת PRODUCTION שמחזירה אמצעי תשלום שאפשר לחייב, אפשר לעיין ברשימת המשימות לשילוב.

שלב 6: בדיקה אם אפשר לשלם באמצעות Google Pay API

כדי לבדוק אם אפשר לשלם באמצעות Google Pay API, מבצעים את השלבים הבאים:

  1. מוסיפים את אמצעי התשלום המותרים לאובייקט הבקשה הבסיסי. דוגמת קוד:
    const isReadyToPayRequest = Object.assign({}, baseRequest);
    isReadyToPayRequest.allowedPaymentMethods = [baseCardPaymentMethod];
  2. מתקשרים אל isReadyToPay() כדי לקבוע אם אמצעי התשלום שצוינו נתמכים על ידי Google Pay API בדפדפן ובמכשיר הנוכחי. דוגמת קוד:
    paymentsClient.isReadyToPay(isReadyToPayRequest)
        .then(function(response) {
          if (response.result) {
            // add a Google Pay payment button
          }
        })
        .catch(function(err) {
          // show error in developer console for debugging
          console.error(err);
        });

שלב 7: הוספת לחצן תשלום של Google Pay

כדי לעודד את הקונים לבצע תשלום באמצעות אמצעי תשלום שנתמכים על ידי Google Pay API והאתר שלכם, כדאי להוסיף לדף לחצן תשלום של Google Pay. מידע נוסף על סוגי הלחצנים, הצבעים והדרישות לתצוגה זמין בהנחיות המיתוג.

דוגמת קוד של לחצן תשלום:

const button =
    paymentsClient.createButton({onClick: () => console.log('TODO: click handler'),
    allowedPaymentMethods: []}); // same payment methods as for the loadPaymentData() API call
document.getElementById('container').appendChild(button);

שלב 8: יוצרים אובייקט PaymentDataRequest

כדי ליצור אובייקט PaymentDataRequest:

  1. יוצרים אובייקט JavaScript שמתאר את התמיכה של האתר ב-Google Pay API. רשימה מלאה של המאפיינים הנתמכים זמינה במאמר PaymentDataRequest. דוגמת קוד:
    const paymentDataRequest = Object.assign({}, baseRequest);
  2. מוסיפים את אמצעי התשלום שהאפליקציה תומכת בהם, כמו כל הגדרה של נתונים נוספים שצפויים בתגובה. דוגמת קוד:
    paymentDataRequest.allowedPaymentMethods = [cardPaymentMethod];
  3. הגדרת מחיר כולל ומטבע לקבלת אישור מהקונה. דוגמת קוד:
    חשוב: מוֹכרים שמבצעים עיבוד של עסקאות באזור הכלכלי האירופי (EEA) או בכל מדינה אחרת שחלים עליה דרישות של אימות חזק ללקוח (SCA), צריכים לכלול את הפרמטרים countryCode, totalPrice ו-merchantName כדי לעמוד בדרישות ה-SCA.
    paymentDataRequest.transactionInfo = {
      totalPriceStatus: 'FINAL',
      totalPrice: '123.45',
      currencyCode: 'USD',
      countryCode: 'US'
    };
  4. צריך לציין שם מוֹכר שגלוי למשתמשים, ולהשתמש בערך TEST merchantId כשמשתמשים ב-TEST. פרטים נוספים ומידע על המקרים שבהם צריך להחליף את הערך TEST merchantId זמינים במאמר MerchantInfo. דוגמה לקוד של שם מוֹכר שגלוי למשתמשים:
    paymentDataRequest.merchantInfo = {
      merchantName: 'Example Merchant'
      merchantId: '12345678901234567890'
    };
    הערה: הערך של TEST merchantId הוא מספרי. הערך הספציפי של merchantId יכול להיות מספרי או אלפאנומרי. פרטים נוספים על קבלת merchantId ספציפיים זמינים במאמר בנושא MerchantInfo.

שלב 9: רישום של גורם מטפל באירועים עבור תנועות של משתמשים

כדי לרשום handler של אירועים למחוות משתמשים, מבצעים את השלבים הבאים:

  1. מגדירים handler לאירוע קליק עבור לחצן הרכישה. ה-event handler קורא ל-loadPaymentData() מיד אחרי האינטראקציה עם לחצן התשלום של Google Pay.
  2. אחרי שמשתמש Google מעניק לאתר שלכם הרשאה לקבל מידע על אמצעי התשלום שנבחר ועל פרטים ליצירת קשר (אופציונלי), צריך לטפל בתגובה מ-Google Pay API.
  3. מחפשים את טוקן התשלום בתגובה paymentData. אם מטמיעים שילוב של שער, צריך להעביר את האסימון הזה לשער בלי לבצע בו שינויים.
    הערה: בסביבת TEST, תגובת תשלום כוללת נתוני סיכום על אמצעי התשלום שנבחר, שמתאימים להצגה בדף אישור. תגובת התשלום לא כוללת אמצעי תשלום שאפשר לבצע איתו עסקה.
    paymentsClient.loadPaymentData(paymentDataRequest).then(function(paymentData){
      // if using gateway tokenization, pass this token without modification
      paymentToken = paymentData.paymentMethodData.tokenizationData.token;
    }).catch(function(err){
      // show error in developer console for debugging
      console.error(err);
    });

שלב 10 (אופציונלי): הגדרת אישור תשלומים

השיטה Authorize Payments משמשת להתחלת תהליך התשלום ולאישור סטטוס ההרשאה של התשלום. כדי להגדיר אישור תשלומים, פועלים לפי השלבים הבאים:

  1. רישום קריאה חוזרת (callback) של onPaymentAuthorized() ב-PaymentOptions.
  2. קוראים לפונקציה loadPaymentData() עם כוונת הקריאה החוזרת PAYMENT_AUTHORIZATION.
  3. הטמעה של onPaymentAuthorized().

רישום של התקשרות חזרה (callback) אל onPaymentAuthorized

בדוגמת הקוד הבאה אפשר לראות איך רושמים קריאות חוזרות (callback) של onPaymentAuthorized:

{
  environment: "TEST",
  merchantInfo: {
    merchantName: "Example Merchant",
    merchantId: "12345678901234567890"
  },
  paymentDataCallbacks: {
    onPaymentAuthorized: onPaymentAuthorized
  }
}

טעינת נתוני תשלום באמצעות כוונות של קריאה חוזרת

בדוגמת הקוד הבאה אפשר לראות איך מאתחלים את דף התשלום באמצעות Authorize Payments:

const paymentDataRequest = Object.assign({}, baseRequest);
paymentDataRequest.allowedPaymentMethods = [cardPaymentMethod];
paymentDataRequest.transactionInfo = getGoogleTransactionInfo();
paymentDataRequest.merchantInfo = {
  merchantName: 'Example Merchant'
  merchantId: '12345678901234567890',
};

paymentDataRequest.callbackIntents = ["PAYMENT_AUTHORIZATION"];

טיפול בקריאות חוזרות (callback) של onPaymentAuthorized

הקריאה החוזרת (callback) של onPaymentAuthorized() מופעלת עם אובייקט PaymentData על ידי Google אחרי שהמשלם מאשר תשלום באמצעות פעולת משתמש, למשל אם הוא לוחץ על תשלום.

הפונקציה להחזרת ערך מחזירה ערך Promise<PaymentAuthorizationResult>. לאובייקט PaymentAuthorizationResult יש סטטוס של מצב עסקה SUCCESS או ERROR. אם הפעולה מצליחה, גיליון התשלום נסגר בהצלחה. אם מתרחשת שגיאה, גיליון התשלום מציג את פרטי השגיאה שמוחזרים אחרי עיבוד התשלום. המשתמש יכול לשנות את נתוני התשלום בטופס התשלום ולאשר שוב את התשלום. דוגמת קוד:

function onPaymentAuthorized(paymentData) {
  return new Promise(function(resolve, reject){
    // handle the response
    processPayment(paymentData)
    .then(function() {
      resolve({transactionState: 'SUCCESS'});
    })
    .catch(function() {
      resolve({
        transactionState: 'ERROR',
        error: {
          intent: 'PAYMENT_AUTHORIZATION',
          message: 'Insufficient funds',
          reason: 'PAYMENT_DATA_INVALID'
        }
      });
    });
  });
}

שלב 11 (אופציונלי אם הפעלתם משלוחים): הגדרת עדכוני מחירים דינמיים

התכונה 'עדכוני מחירים דינמיים' מאפשרת למוֹכר לעדכן באופן דינמי את אפשרויות המשלוח ואת פרטי העסקה על סמך כתובת המשלוח שנבחרה. בנוסף, אתם יכולים לעדכן באופן דינמי את פרטי העסקה על סמך אפשרות המשלוח שנבחרה.

כדי להגדיר עדכוני מחירים דינמיים, פועלים לפי השלבים הבאים:

  1. צריך לרשום את הקריאות החוזרות onPaymentAuthorized ו-onPaymentDataChanged ב-PaymentOptions.
  2. מתקשרים לפונקציה loadPaymentData() עם כוונות של קריאה חוזרת. פרטים נוספים זמינים בדוגמה המתאימה.
  3. הטמעה של onPaymentAuthorized ושל onPaymentDataChanged.

רישום של קריאה חוזרת (callback) של PaymentData

בדוגמת הקוד הבאה אפשר לראות שנדרשת הרשמה של פונקציות קריאה חוזרת באובייקט PaymentsClient paymentOptions כדי להשתמש בעדכוני מחירים דינמיים.

{
  environment: "TEST",
  merchantInfo: {
    merchantName: "Example Merchant",
    merchantId: "12345678901234567890"
  },
  paymentDataCallbacks: {
    onPaymentAuthorized: onPaymentAuthorized,
    onPaymentDataChanged: onPaymentDataChanged
  }
}

טעינת נתוני תשלום באמצעות כוונות של קריאה חוזרת

בדוגמת הקוד הבאה אפשר לראות איך צריך לאתחל את דף התשלום עם כתובת למשלוח ואפשרויות משלוח שנדרשות:

const paymentDataRequest = Object.assign({}, baseRequest);
paymentDataRequest.allowedPaymentMethods = [cardPaymentMethod];
paymentDataRequest.transactionInfo = getGoogleTransactionInfo();
paymentDataRequest.merchantInfo = {
  merchantId: '12345678901234567890',
  merchantName: 'Example Merchant'
};

paymentDataRequest.callbackIntents = ["SHIPPING_ADDRESS",  "SHIPPING_OPTION", "PAYMENT_AUTHORIZATION"];


paymentDataRequest.shippingAddressRequired = true;
paymentDataRequest.shippingAddressParameters = getGoogleShippingAddressParameters();
paymentDataRequest.shippingOptionRequired = true;

טיפול בקריאה חוזרת (callback) של onPaymentDataChanged

הקריאה החוזרת onPaymentDataChanged מופעלת עם אובייקט IntermediatePaymentData שכולל את כתובת המשלוח ואת אפשרות המשלוח שנבחרו בדף התשלום.

הקריאה החוזרת מחזירה Promise<PaymentDataRequestUpdate>. לאובייקט PaymentDataRequestUpdate יש פרטי טרנזקציה חדשים, אפשרויות משלוח ושגיאה בנתוני התשלום. הנתונים האלה מעדכנים את דף התשלום.

לטפל במקרים חריגים, כמו כתובת למשלוח שלא ניתן לספק לה שירות או אפשרות משלוח לא תקינה, ישירות בדף התשלום. מגדירים אובייקט PaymentDataError כדי להדגיש את הסיבה לשגיאה באמצעות הודעת שגיאה למשתמש. חשוב לכלול בהודעה את הכוונה הרלוונטית. לפרטים על הגדרת האובייקט וההודעה, אפשר לעיין בדוגמת הקוד הבאה:

function onPaymentDataChanged(intermediatePaymentData) {
  return new Promise(function(resolve, reject) {

    let shippingAddress = intermediatePaymentData.shippingAddress;
    let shippingOptionData = intermediatePaymentData.shippingOptionData;
    let paymentDataRequestUpdate = {};

    if (intermediatePaymentData.callbackTrigger == "INITIALIZE" || intermediatePaymentData.callbackTrigger == "SHIPPING_ADDRESS") {
      if(shippingAddress.administrativeArea == "NJ")  {
        paymentDataRequestUpdate.error = getGoogleUnserviceableAddressError();
      }
      else {
        paymentDataRequestUpdate.newShippingOptionParameters = getGoogleDefaultShippingOptions();
        let selectedShippingOptionId = paymentDataRequestUpdate.newShippingOptionParameters.defaultSelectedOptionId;
        paymentDataRequestUpdate.newTransactionInfo = calculateNewTransactionInfo(selectedShippingOptionId);
      }
    }
    else if (intermediatePaymentData.callbackTrigger == "SHIPPING_OPTION") {
      paymentDataRequestUpdate.newTransactionInfo = calculateNewTransactionInfo(shippingOptionData.id);
    }

    resolve(paymentDataRequestUpdate);
  });
}

שלב 12 (אופציונלי לקודי שובר): הגדרת קודי שובר

קודי הטבה מאפשרים למוֹכרים לעדכן באופן דינמי את אפשרויות המשלוח ואת פרטי העסקה על סמך קוד הטבה שסופק.

כדי להגדיר קודי שוברים, פועלים לפי השלבים הבאים:

  1. מגדירים את הקריאות החוזרות onPaymentDataChanged ב-PaymentOptions.
  2. מתקשרים לפונקציה loadPaymentData() עם כוונות של קריאה חוזרת. פרטים נוספים זמינים בדוגמה המתאימה.
  3. מטמיעים את onPaymentDataChanged callback function.

רישום של פונקציית callback להצעה

בדוגמה הבאה של קוד אפשר לראות שנדרש לרשום פונקציות קריאה חוזרת לקודי שוברים באובייקט PaymentsClient paymentOptions.

{
  environment: "TEST",
  merchantInfo: {
    merchantName: "Example Merchant",
    merchantId: "12345678901234567890"
  },
  paymentDataCallbacks: {
    onPaymentDataChanged: onPaymentDataChanged
  }
}

טעינת נתוני תשלום באמצעות כוונות של קריאה חוזרת

בדוגמת הקוד הבאה אפשר לראות איך צריך לאתחל את דף התשלום באמצעות כוונת קריאה חוזרת (callback) של מבצע:

const paymentDataRequest = Object.assign({}, baseRequest);
paymentDataRequest.allowedPaymentMethods = [cardPaymentMethod];
paymentDataRequest.transactionInfo = getGoogleTransactionInfo();
paymentDataRequest.merchantInfo = {
  merchantId: '12345678901234567890',
  merchantName: 'Example Merchant'
};

paymentDataRequest.callbackIntents = ["OFFER"];

טיפול בקריאה חוזרת (callback) של onPaymentDataChanged

הקריאה החוזרת onPaymentDataChanged מופעלת עם אובייקט IntermediatePaymentData שכולל את כתובת המשלוח ואת אפשרות המשלוח שנבחרו בדף התשלום.

פונקציית ההתקשרות חזרה צריכה להחזיר Promise<PaymentDataRequestUpdate>. האובייקט PaymentDataRequestUpdate כולל פרטי עסקה חדשים, אפשרויות משלוח, נתוני מבצע ושגיאה בפרטי התשלום. הנתונים האלה מעדכנים את דף התשלום.

צריך לטפל במקרים חריגים, כמו קוד הטבה לא תקף, ישירות בגיליון התשלומים. מגדירים אובייקט PaymentDataError כדי להדגיש את הסיבה לשגיאה באמצעות הודעת שגיאה למשתמש. חשוב לכלול בהודעה את הכוונה הרלוונטית. לפרטים על הגדרת האובייקט וההודעה, אפשר לעיין בדוגמת הקוד הבאה, שמתייחסת לאובייקט (validPromoCodes) שמכיל את ערכי קוד ההטבה:

function onPaymentDataChanged(intermediatePaymentData) {
  return new Promise(function(resolve, reject) {

    let redemptionCodes = [];
    let shippingOptionData = intermediatePaymentData.shippingOptionData;
    let paymentDataRequestUpdate = {};
    paymentDataRequestUpdate.newTransactionInfo = getGoogleTransactionInfo();

    // ensure that promo codes set is unique
    if(typeof intermediatePaymentData.offerData != 'undefined') {
      // convert to set then back to array
      redemptionCodes = Array.from(
        new Set(intermediatePaymentData.offerData.redemptionCodes)
      );
    }

    // OPTIONAL: ensure that the newest promo code is the only one applied
    // redemptionCodes = new Array(redemptionCodes[redemptionCodes.length -1]);

    // validate promo codes and add descriptions to payment sheet
    if (intermediatePaymentData.callbackTrigger === 'OFFER') {
      paymentDataRequestUpdate.newOfferInfo = {};
      paymentDataRequestUpdate.newOfferInfo.offers = [];
      for (redemptionCode of redemptionCodes) {
        if (validPromoCodes[redemptionCode]) {
          paymentDataRequestUpdate = validPromoCodes[redemptionCode].function(
            validPromoCodes[redemptionCode],
            paymentDataRequestUpdate
          );
        } else {
          paymentDataRequestUpdate.error = getGoogleOfferInvalidError(redemptionCode);
        }
      }
    }

סיכום של כל המידע

בלוקי הקוד לדוגמה בקטע הזה מציגים דוגמה מלאה מקצה לקצה של מדריך Google Pay API, ספריית JavaScript, אישור תשלומים, עדכוני מחירים דינמיים וקודי קידום מכירות.

מדריך

<div id="container"></div>

<script>
/**
 * Define the version of the Google Pay API referenced when creating your
 * configuration
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest|apiVersion in PaymentDataRequest}
 */
const baseRequest = {
  apiVersion: 2,
  apiVersionMinor: 0
};

/**
 * Card networks supported by your site and your gateway
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 * @todo confirm card networks supported by your site and gateway
 */
const allowedCardNetworks = ["AMEX", "DISCOVER", "INTERAC", "JCB", "MASTERCARD", "VISA"];

/**
 * Card authentication methods supported by your site and your gateway
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 * @todo confirm your processor supports Android device tokens for your
 * supported card networks
 */
const allowedCardAuthMethods = ["PAN_ONLY", "CRYPTOGRAM_3DS"];

/**
 * Identify your gateway and your site's gateway merchant identifier
 *
 * The Google Pay API response will return an encrypted payment method capable
 * of being charged by a supported gateway after payer authorization
 *
 * @todo check with your gateway on the parameters to pass
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#gateway|PaymentMethodTokenizationSpecification}
 */
const tokenizationSpecification = {
  type: 'PAYMENT_GATEWAY',
  parameters: {
    'gateway': 'example',
    'gatewayMerchantId': 'exampleGatewayMerchantId'
  }
};

/**
 * Describe your site's support for the CARD payment method and its required
 * fields
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 */
const baseCardPaymentMethod = {
  type: 'CARD',
  parameters: {
    allowedAuthMethods: allowedCardAuthMethods,
    allowedCardNetworks: allowedCardNetworks
  }
};

/**
 * Describe your site's support for the CARD payment method including optional
 * fields
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 */
const cardPaymentMethod = Object.assign(
  {},
  baseCardPaymentMethod,
  {
    tokenizationSpecification: tokenizationSpecification
  }
);

/**
 * An initialized google.payments.api.PaymentsClient object or null if not yet set
 *
 * @see {@link getGooglePaymentsClient}
 */
let paymentsClient = null;

/**
 * Configure your site's support for payment methods supported by the Google Pay
 * API.
 *
 * Each member of allowedPaymentMethods should contain only the required fields,
 * allowing reuse of this base request when determining a viewer's ability
 * to pay and later requesting a supported payment method
 *
 * @returns {object} Google Pay API version, payment methods supported by the site
 */
function getGoogleIsReadyToPayRequest() {
  return Object.assign(
      {},
      baseRequest,
      {
        allowedPaymentMethods: [baseCardPaymentMethod]
      }
  );
}

/**
 * Configure support for the Google Pay API
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest|PaymentDataRequest}
 * @returns {object} PaymentDataRequest fields
 */
function getGooglePaymentDataRequest() {
  const paymentDataRequest = Object.assign({}, baseRequest);
  paymentDataRequest.allowedPaymentMethods = [cardPaymentMethod];
  paymentDataRequest.transactionInfo = getGoogleTransactionInfo();
  paymentDataRequest.merchantInfo = {
    // @todo a merchant ID is available for a production environment after approval by Google
    // See {@link https://developers.google.com/pay/api/web/guides/test-and-deploy/integration-checklist|Integration checklist}
    // merchantId: '12345678901234567890',
    merchantName: 'Example Merchant'
  };
  return paymentDataRequest;
}

/**
 * Return an active PaymentsClient or initialize
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/client#PaymentsClient|PaymentsClient constructor}
 * @returns {google.payments.api.PaymentsClient} Google Pay API client
 */
function getGooglePaymentsClient() {
  if ( paymentsClient === null ) {
    paymentsClient = new google.payments.api.PaymentsClient({environment: 'TEST'});
  }
  return paymentsClient;
}

/**
 * Initialize Google PaymentsClient after Google-hosted JavaScript has loaded
 *
 * Display a Google Pay payment button after confirmation of the viewer's
 * ability to pay.
 */
function onGooglePayLoaded() {
  const paymentsClient = getGooglePaymentsClient();
  paymentsClient.isReadyToPay(getGoogleIsReadyToPayRequest())
      .then(function(response) {
        if (response.result) {
          addGooglePayButton();
          // @todo prefetch payment data to improve performance after confirming site functionality
          // prefetchGooglePaymentData();
        }
      })
      .catch(function(err) {
        // show error in developer console for debugging
        console.error(err);
      });
}

/**
 * Add a Google Pay purchase button alongside an existing checkout button
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#ButtonOptions|Button options}
 * @see {@link https://developers.google.com/pay/api/web/guides/brand-guidelines|Google Pay brand guidelines}
 */
function addGooglePayButton() {
  const paymentsClient = getGooglePaymentsClient();
  const button =
      paymentsClient.createButton({
        onClick: onGooglePaymentButtonClicked,
        allowedPaymentMethods: [baseCardPaymentMethod]
      });
  document.getElementById('container').appendChild(button);
}

/**
 * Provide Google Pay API with a payment amount, currency, and amount status
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo|TransactionInfo}
 * @returns {object} transaction info, suitable for use as transactionInfo property of PaymentDataRequest
 */
function getGoogleTransactionInfo() {
  return {
    countryCode: 'US',
    currencyCode: 'USD',
    totalPriceStatus: 'FINAL',
    // set to cart total
    totalPrice: '1.00'
  };
}

/**
 * Prefetch payment data to improve performance
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/client#prefetchPaymentData|prefetchPaymentData()}
 */
function prefetchGooglePaymentData() {
  const paymentDataRequest = getGooglePaymentDataRequest();
  // transactionInfo must be set but does not affect cache
  paymentDataRequest.transactionInfo = {
    totalPriceStatus: 'NOT_CURRENTLY_KNOWN',
    currencyCode: 'USD'
  };
  const paymentsClient = getGooglePaymentsClient();
  paymentsClient.prefetchPaymentData(paymentDataRequest);
}

/**
 * Show Google Pay payment sheet when Google Pay payment button is clicked
 */
function onGooglePaymentButtonClicked() {
  const paymentDataRequest = getGooglePaymentDataRequest();
  paymentDataRequest.transactionInfo = getGoogleTransactionInfo();

  const paymentsClient = getGooglePaymentsClient();
  paymentsClient.loadPaymentData(paymentDataRequest)
      .then(function(paymentData) {
        // handle the response
        processPayment(paymentData);
      })
      .catch(function(err) {
        // show error in developer console for debugging
        console.error(err);
      });
}
/**
 * Process payment data returned by the Google Pay API
 *
 * @param {object} paymentData response from Google Pay API after user approves payment
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentData|PaymentData object reference}
 */
function processPayment(paymentData) {
  // show returned data in developer console for debugging
    console.log(paymentData);
  // @todo pass payment token to your gateway to process payment
  // @note DO NOT save the payment credentials for future transactions,
  // unless they're used for merchant-initiated transactions with user
  // consent in place.
  paymentToken = paymentData.paymentMethodData.tokenizationData.token;
}</script>
<script async
  src="https://pay.google.com/gp/p/js/pay.js"
  onload="onGooglePayLoaded()"></script>

אישור תשלומים

<div id="container"></div>

<script>
/**
 * Define the version of the Google Pay API referenced when creating your
 * configuration
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest|apiVersion in PaymentDataRequest}
 */
const baseRequest = {
  apiVersion: 2,
  apiVersionMinor: 0
};

/**
 * Card networks supported by your site and your gateway
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 * @todo confirm card networks supported by your site and gateway
 */
const allowedCardNetworks = ["AMEX", "DISCOVER", "INTERAC", "JCB", "MASTERCARD", "VISA"];

/**
 * Card authentication methods supported by your site and your gateway
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 * @todo confirm your processor supports Android device tokens for your
 * supported card networks
 */
const allowedCardAuthMethods = ["PAN_ONLY", "CRYPTOGRAM_3DS"];

/**
 * Identify your gateway and your site's gateway merchant identifier
 *
 * The Google Pay API response will return an encrypted payment method capable
 * of being charged by a supported gateway after payer authorization
 *
 * @todo check with your gateway on the parameters to pass
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#gateway|PaymentMethodTokenizationSpecification}
 */
const tokenizationSpecification = {
  type: 'PAYMENT_GATEWAY',
  parameters: {
    'gateway': 'example',
    'gatewayMerchantId': 'exampleGatewayMerchantId'
  }
};

/**
 * Describe your site's support for the CARD payment method and its required
 * fields
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 */
const baseCardPaymentMethod = {
  type: 'CARD',
  parameters: {
    allowedAuthMethods: allowedCardAuthMethods,
    allowedCardNetworks: allowedCardNetworks
  }
};

/**
 * Describe your site's support for the CARD payment method including optional
 * fields
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 */
const cardPaymentMethod = Object.assign(
  {},
  baseCardPaymentMethod,
  {
    tokenizationSpecification: tokenizationSpecification
  }
);

/**
 * An initialized google.payments.api.PaymentsClient object or null if not yet set
 *
 * @see {@link getGooglePaymentsClient}
 */
let paymentsClient = null;

/**
 * Configure your site's support for payment methods supported by the Google Pay
 * API.
 *
 * Each member of allowedPaymentMethods should contain only the required fields,
 * allowing reuse of this base request when determining a viewer's ability
 * to pay and later requesting a supported payment method
 *
 * @returns {object} Google Pay API version, payment methods supported by the site
 */
function getGoogleIsReadyToPayRequest() {
  return Object.assign(
      {},
      baseRequest,
      {
        allowedPaymentMethods: [baseCardPaymentMethod]
      }
  );
}

/**
 * Configure support for the Google Pay API
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest|PaymentDataRequest}
 * @returns {object} PaymentDataRequest fields
 */
function getGooglePaymentDataRequest() {
  const paymentDataRequest = Object.assign({}, baseRequest);
  paymentDataRequest.allowedPaymentMethods = [cardPaymentMethod];
  paymentDataRequest.transactionInfo = getGoogleTransactionInfo();
  paymentDataRequest.merchantInfo = {
    // @todo a merchant ID is available for a production environment after approval by Google
    // See {@link https://developers.google.com/pay/api/web/guides/test-and-deploy/integration-checklist|Integration checklist}
    // merchantId: '12345678901234567890',
    merchantName: 'Example Merchant'
  };

  paymentDataRequest.callbackIntents = ["PAYMENT_AUTHORIZATION"];

  return paymentDataRequest;
}

/**
 * Return an active PaymentsClient or initialize
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/client#PaymentsClient|PaymentsClient constructor}
 * @returns {google.payments.api.PaymentsClient} Google Pay API client
 */
function getGooglePaymentsClient() {
  if ( paymentsClient === null ) {
    paymentsClient = new google.payments.api.PaymentsClient({
    	environment: 'TEST',
      paymentDataCallbacks: {
      	onPaymentAuthorized: onPaymentAuthorized
      }
    });
  }
  return paymentsClient;
}

/**
 * Handles authorize payments callback intents.
 *
 * @param {object} paymentData response from Google Pay API after a payer approves payment through user gesture.
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentData object reference}
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentAuthorizationResult}
 * @returns Promise<{object}> Promise of PaymentAuthorizationResult object to acknowledge the payment authorization status.
 */
function onPaymentAuthorized(paymentData) {
	return new Promise(function(resolve, reject){
    // handle the response
    processPayment(paymentData)
    .then(function() {
      resolve({transactionState: 'SUCCESS'});
    })
    .catch(function() {
      resolve({
        transactionState: 'ERROR',
        error: {
          intent: 'PAYMENT_AUTHORIZATION',
          message: 'Insufficient funds',
          reason: 'PAYMENT_DATA_INVALID'
        }
      });
  	});
  });
}

/**
 * Initialize Google PaymentsClient after Google-hosted JavaScript has loaded
 *
 * Display a Google Pay payment button after confirmation of the viewer's
 * ability to pay.
 */
function onGooglePayLoaded() {
  const paymentsClient = getGooglePaymentsClient();
  paymentsClient.isReadyToPay(getGoogleIsReadyToPayRequest())
      .then(function(response) {
        if (response.result) {
          addGooglePayButton();
        }
      })
      .catch(function(err) {
        // show error in developer console for debugging
        console.error(err);
      });
}

/**
 * Add a Google Pay purchase button alongside an existing checkout button
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#ButtonOptions|Button options}
 * @see {@link https://developers.google.com/pay/api/web/guides/brand-guidelines|Google Pay brand guidelines}
 */
function addGooglePayButton() {
  const paymentsClient = getGooglePaymentsClient();
  const button =
      paymentsClient.createButton({
        onClick: onGooglePaymentButtonClicked,
        allowedPaymentMethods: [baseCardPaymentMethod]
      });
  document.getElementById('container').appendChild(button);
}

/**
 * Provide Google Pay API with a payment amount, currency, and amount status
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo|TransactionInfo}
 * @returns {object} transaction info, suitable for use as transactionInfo property of PaymentDataRequest
 */
function getGoogleTransactionInfo() {
  return {
        displayItems: [
        {
          label: "Subtotal",
          type: "SUBTOTAL",
          price: "11.00",
        },
      {
          label: "Tax",
          type: "TAX",
          price: "1.00",
        }
    ],
    countryCode: 'US',
    currencyCode: "USD",
    totalPriceStatus: "FINAL",
    totalPrice: "12.00",
    totalPriceLabel: "Total"
  };
}

/**
 * Show Google Pay payment sheet when Google Pay payment button is clicked
 */
function onGooglePaymentButtonClicked() {
  const paymentDataRequest = getGooglePaymentDataRequest();
  paymentDataRequest.transactionInfo = getGoogleTransactionInfo();

  const paymentsClient = getGooglePaymentsClient();
  paymentsClient.loadPaymentData(paymentDataRequest);
}

/**
 * Process payment data returned by the Google Pay API
 *
 * @param {object} paymentData response from Google Pay API after user approves payment
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentData|PaymentData object reference}
 */
function processPayment(paymentData) {
	return new Promise(function(resolve, reject) {
  	setTimeout(function() {
  		// @todo pass payment token to your gateway to process payment
  		paymentToken = paymentData.paymentMethodData.tokenizationData.token;

    	resolve({});
    }, 3000);
  });
}</script>
<script async
  src="https://pay.google.com/gp/p/js/pay.js"
  onload="onGooglePayLoaded()"></script>

עדכוני מחירים דינמיים

<div id="container"></div>

<script>
/**
 * Define the version of the Google Pay API referenced when creating your
 * configuration
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest|apiVersion in PaymentDataRequest}
 */
const baseRequest = {
  apiVersion: 2,
  apiVersionMinor: 0
};

/**
 * Card networks supported by your site and your gateway
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 * @todo confirm card networks supported by your site and gateway
 */
const allowedCardNetworks = ["AMEX", "DISCOVER", "JCB", "MASTERCARD", "VISA"];

/**
 * Card authentication methods supported by your site and your gateway
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 * @todo confirm your processor supports Android device tokens for your
 * supported card networks
 */
const allowedCardAuthMethods = ["PAN_ONLY", "CRYPTOGRAM_3DS"];

/**
 * Identify your gateway and your site's gateway merchant identifier
 *
 * The Google Pay API response will return an encrypted payment method capable
 * of being charged by a supported gateway after payer authorization
 *
 * @todo check with your gateway on the parameters to pass
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#gateway|PaymentMethodTokenizationSpecification}
 */
const tokenizationSpecification = {
  type: 'PAYMENT_GATEWAY',
  parameters: {
    'gateway': 'example',
    'gatewayMerchantId': 'exampleGatewayMerchantId'
  }
};

/**
 * Describe your site's support for the CARD payment method and its required
 * fields
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 */
const baseCardPaymentMethod = {
  type: 'CARD',
  parameters: {
    allowedAuthMethods: allowedCardAuthMethods,
    allowedCardNetworks: allowedCardNetworks
  }
};

/**
 * Describe your site's support for the CARD payment method including optional
 * fields
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 */
const cardPaymentMethod = Object.assign(
  {},
  baseCardPaymentMethod,
  {
    tokenizationSpecification: tokenizationSpecification
  }
);

/**
 * An initialized google.payments.api.PaymentsClient object or null if not yet set
 *
 * @see {@link getGooglePaymentsClient}
 */
let paymentsClient = null;

/**
 * Configure your site's support for payment methods supported by the Google Pay
 * API.
 *
 * Each member of allowedPaymentMethods should contain only the required fields,
 * allowing reuse of this base request when determining a viewer's ability
 * to pay and later requesting a supported payment method
 *
 * @returns {object} Google Pay API version, payment methods supported by the site
 */
function getGoogleIsReadyToPayRequest() {
  return Object.assign(
      {},
      baseRequest,
      {
        allowedPaymentMethods: [baseCardPaymentMethod]
      }
  );
}

/**
 * Configure support for the Google Pay API
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest|PaymentDataRequest}
 * @returns {object} PaymentDataRequest fields
 */
function getGooglePaymentDataRequest() {
  const paymentDataRequest = Object.assign({}, baseRequest);
  paymentDataRequest.allowedPaymentMethods = [cardPaymentMethod];
  paymentDataRequest.transactionInfo = getGoogleTransactionInfo();
  paymentDataRequest.merchantInfo = {
    // @todo a merchant ID is available for a production environment after approval by Google
    // See {@link https://developers.google.com/pay/api/web/guides/test-and-deploy/integration-checklist|Integration checklist}
    // merchantId: '12345678901234567890',
    merchantName: 'Example Merchant'
  };

  paymentDataRequest.callbackIntents = ["SHIPPING_ADDRESS",  "SHIPPING_OPTION", "PAYMENT_AUTHORIZATION"];
  paymentDataRequest.shippingAddressRequired = true;
  paymentDataRequest.shippingAddressParameters = getGoogleShippingAddressParameters();
  paymentDataRequest.shippingOptionRequired = true;

  return paymentDataRequest;
}

/**
 * Return an active PaymentsClient or initialize
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/client#PaymentsClient|PaymentsClient constructor}
 * @returns {google.payments.api.PaymentsClient} Google Pay API client
 */
function getGooglePaymentsClient() {
  if ( paymentsClient === null ) {
    paymentsClient = new google.payments.api.PaymentsClient({
      environment: "TEST",
      merchantInfo: {
        merchantName: "Example Merchant",
        merchantId: "01234567890123456789"
      },
      paymentDataCallbacks: {
      	onPaymentAuthorized: onPaymentAuthorized,
        onPaymentDataChanged: onPaymentDataChanged
      }
    });
  }
  return paymentsClient;
}


function onPaymentAuthorized(paymentData) {
	return new Promise(function(resolve, reject){

  // handle the response
  processPayment(paymentData)
    .then(function() {
      resolve({transactionState: 'SUCCESS'});
    })
    .catch(function() {
    	resolve({
        transactionState: 'ERROR',
        error: {
          intent: 'PAYMENT_AUTHORIZATION',
          message: 'Insufficient funds',
          reason: 'PAYMENT_DATA_INVALID'
        }
      });
    });

  });
}

/**
 * Handles dynamic buy flow shipping address and shipping options callback intents.
 *
 * @param {object} itermediatePaymentData response from Google Pay API a shipping address or shipping option is selected in the payment sheet.
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#IntermediatePaymentData|IntermediatePaymentData object reference}
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentDataRequestUpdate|PaymentDataRequestUpdate}
 * @returns Promise<{object}> Promise of PaymentDataRequestUpdate object to update the payment sheet.
 */
function onPaymentDataChanged(intermediatePaymentData) {
  return new Promise(function(resolve, reject) {

   	let shippingAddress = intermediatePaymentData.shippingAddress;
    let shippingOptionData = intermediatePaymentData.shippingOptionData;
    let paymentDataRequestUpdate = {};

    if (intermediatePaymentData.callbackTrigger == "INITIALIZE" || intermediatePaymentData.callbackTrigger == "SHIPPING_ADDRESS") {
      if(shippingAddress.administrativeArea == "NJ")  {
        paymentDataRequestUpdate.error = getGoogleUnserviceableAddressError();
      }
      else {
        paymentDataRequestUpdate.newShippingOptionParameters = getGoogleDefaultShippingOptions();
        let selectedShippingOptionId = paymentDataRequestUpdate.newShippingOptionParameters.defaultSelectedOptionId;
        paymentDataRequestUpdate.newTransactionInfo = calculateNewTransactionInfo(selectedShippingOptionId);
      }
    }
    else if (intermediatePaymentData.callbackTrigger == "SHIPPING_OPTION") {
      paymentDataRequestUpdate.newTransactionInfo = calculateNewTransactionInfo(shippingOptionData.id);
    }

    resolve(paymentDataRequestUpdate);
  });
}

/**
 * Helper function to create a new TransactionInfo object.

 * @param string shippingOptionId respresenting the selected shipping option in the payment sheet.
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo|TransactionInfo}
 * @returns {object} transaction info, suitable for use as transactionInfo property of PaymentDataRequest
 */
function calculateNewTransactionInfo(shippingOptionId) {
        let newTransactionInfo = getGoogleTransactionInfo();

  let shippingCost = getShippingCosts()[shippingOptionId];
  newTransactionInfo.displayItems.push({
    type: "LINE_ITEM",
    label: "Shipping cost",
    price: shippingCost,
    status: "FINAL"
  });

  let totalPrice = 0.00;
  newTransactionInfo.displayItems.forEach(displayItem => totalPrice += parseFloat(displayItem.price));
  newTransactionInfo.totalPrice = totalPrice.toString();

  return newTransactionInfo;
}

/**
 * Initialize Google PaymentsClient after Google-hosted JavaScript has loaded
 *
 * Display a Google Pay payment button after confirmation of the viewer's
 * ability to pay.
 */
function onGooglePayLoaded() {
  const paymentsClient = getGooglePaymentsClient();
  paymentsClient.isReadyToPay(getGoogleIsReadyToPayRequest())
      .then(function(response) {
        if (response.result) {
          addGooglePayButton();
          // @todo prefetch payment data to improve performance after confirming site functionality
          // prefetchGooglePaymentData();
        }
      })
      .catch(function(err) {
        // show error in developer console for debugging
        console.error(err);
      });
}

/**
 * Add a Google Pay purchase button alongside an existing checkout button
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#ButtonOptions|Button options}
 * @see {@link https://developers.google.com/pay/api/web/guides/brand-guidelines|Google Pay brand guidelines}
 */
function addGooglePayButton() {
  const paymentsClient = getGooglePaymentsClient();
  const button =
      paymentsClient.createButton({
        onClick: onGooglePaymentButtonClicked,
        allowedPaymentMethods: [baseCardPaymentMethod]
      });
  document.getElementById('container').appendChild(button);
}

/**
 * Provide Google Pay API with a payment amount, currency, and amount status
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo|TransactionInfo}
 * @returns {object} transaction info, suitable for use as transactionInfo property of PaymentDataRequest
 */
function getGoogleTransactionInfo() {
  return {
        displayItems: [
        {
          label: "Subtotal",
          type: "SUBTOTAL",
          price: "11.00",
        },
      {
          label: "Tax",
          type: "TAX",
          price: "1.00",
        }
    ],
    countryCode: 'US',
    currencyCode: "USD",
    totalPriceStatus: "FINAL",
    totalPrice: "12.00",
    totalPriceLabel: "Total"
  };
}

/**
 * Provide a key value store for shippping options.
 */
function getShippingCosts() {
        return {
    "shipping-001": "0.00",
    "shipping-002": "1.99",
    "shipping-003": "10.00"
  }
}

/**
 * Provide Google Pay API with shipping address parameters when using dynamic buy flow.
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#ShippingAddressParameters|ShippingAddressParameters}
 * @returns {object} shipping address details, suitable for use as shippingAddressParameters property of PaymentDataRequest
 */
function getGoogleShippingAddressParameters() {
        return  {
        allowedCountryCodes: ['US'],
    phoneNumberRequired: true
  };
}

/**
 * Provide Google Pay API with shipping options and a default selected shipping option.
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#ShippingOptionParameters|ShippingOptionParameters}
 * @returns {object} shipping option parameters, suitable for use as shippingOptionParameters property of PaymentDataRequest
 */
function getGoogleDefaultShippingOptions() {
        return {
      defaultSelectedOptionId: "shipping-001",
      shippingOptions: [
        {
          "id": "shipping-001",
          "label": "Free: Standard shipping",
          "description": "Free Shipping delivered in 5 business days."
        },
        {
          "id": "shipping-002",
          "label": "$1.99: Standard shipping",
          "description": "Standard shipping delivered in 3 business days."
        },
        {
          "id": "shipping-003",
          "label": "$10: Express shipping",
          "description": "Express shipping delivered in 1 business day."
        },
      ]
  };
}

/**
 * Provide Google Pay API with a payment data error.
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentDataError|PaymentDataError}
 * @returns {object} payment data error, suitable for use as error property of PaymentDataRequestUpdate
 */
function getGoogleUnserviceableAddressError() {
        return {
    reason: "SHIPPING_ADDRESS_UNSERVICEABLE",
    message: "Cannot ship to the selected address",
    intent: "SHIPPING_ADDRESS"
        };
}

/**
 * Prefetch payment data to improve performance
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/client#prefetchPaymentData|prefetchPaymentData()}
 */
function prefetchGooglePaymentData() {
  const paymentDataRequest = getGooglePaymentDataRequest();
  // transactionInfo must be set but does not affect cache
  paymentDataRequest.transactionInfo = {
    totalPriceStatus: 'NOT_CURRENTLY_KNOWN',
    currencyCode: 'USD'
  };
  const paymentsClient = getGooglePaymentsClient();
  paymentsClient.prefetchPaymentData(paymentDataRequest);
}


/**
 * Show Google Pay payment sheet when Google Pay payment button is clicked
 */
function onGooglePaymentButtonClicked() {
  const paymentDataRequest = getGooglePaymentDataRequest();
  paymentDataRequest.transactionInfo = getGoogleTransactionInfo();

  const paymentsClient = getGooglePaymentsClient();
  paymentsClient.loadPaymentData(paymentDataRequest);
}

/**
 * Process payment data returned by the Google Pay API
 *
 * @param {object} paymentData response from Google Pay API after user approves payment
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentData|PaymentData object reference}
 */
function processPayment(paymentData) {
	return new Promise(function(resolve, reject) {
  	setTimeout(function() {
    	// show returned data in developer console for debugging
   	 console.log(paymentData);
  		// @todo pass payment token to your gateway to process payment
  		paymentToken = paymentData.paymentMethodData.tokenizationData.token;

    	resolve({});
    }, 3000);
  });
}</script>
<script async
  src="https://pay.google.com/gp/p/js/pay.js"
  onload="onGooglePayLoaded()"></script>

מבצעים

<div id="container"></div>

<script>
/**
 * Please note: The Promo Code callback is extremely flexible. This example
 * implementation is only one of many ways to interface with it.
 *
 * In production, your promo codes and payment logic should be securely
 * processed on your server, not client-side as in this example. Use AJAX to
 * pass this information to the payment sheet.
 */

/**
 * Define the version of the Google Pay API referenced when creating your
 * configuration
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest|apiVersion in PaymentDataRequest}
 */
const baseRequest = {
  apiVersion: 2,
  apiVersionMinor: 0
};

/**
 * Define valid promo code strings
 *
 * This object paradigm is not necessary to implement Promo Codes, but provides
 * an example of how to implement promo code behavior in a modular way.
 *
 * In production, your promo codes should be securely processed on your server,
 * not client-side as in this example.
 *
 * code: the way the promo code itself is displayed in the payment sheet
 * description: the description provided to the user on the payment sheet
 * function: the function used to calculate the price change
 * value: the value passed into the above function. This value should be
 * negative for a discount.
 */

const validPromoCodes = {
  SOMEPROMOCODE: {
    code: 'SOMEPROMOCODE',
    description: '20% off all products!',
    function: percentageDiscount,
    value: -20 // value should be negative for a discount
  },
  ANOTHERPROMOCODE: {
    code: 'ANOTHERPROMOCODE',
    description: '$5 dollars off!',
    function: staticDiscount,
    value: -5.00 // value should be negative for a discount
  }
}

/**
 * Card networks supported by your site and your gateway
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 * @todo confirm card networks supported by your site and gateway
 */
const allowedCardNetworks = ['AMEX', 'DISCOVER', 'JCB', 'MASTERCARD', 'VISA'];

/**
 * Card authentication methods supported by your site and your gateway
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 * @todo confirm your processor supports Android device tokens for your
 * supported card networks
 */
const allowedCardAuthMethods = ['PAN_ONLY', 'CRYPTOGRAM_3DS'];

/**
 * Identify your gateway and your site's gateway merchant identifier
 *
 * The Google Pay API response will return an encrypted payment method capable
 * of being charged by a supported gateway after payer authorization
 *
 * @todo check with your gateway on the parameters to pass
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#gateway|PaymentMethodTokenizationSpecification}
 */
const tokenizationSpecification = {
  type: 'PAYMENT_GATEWAY',
  parameters: {
    gateway: 'example',
    gatewayMerchantId: 'exampleGatewayMerchantId'
  }
};

/**
 * Describe your site's support for the CARD payment method and its required
 * fields
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 */
const baseCardPaymentMethod = {
  type: 'CARD',
  parameters: {
    allowedAuthMethods: allowedCardAuthMethods,
    allowedCardNetworks: allowedCardNetworks
  }
};

/**
 * Describe your site's support for the CARD payment method including optional
 * fields
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 */
const cardPaymentMethod = Object.assign(
  {},
  baseCardPaymentMethod,
  {
    tokenizationSpecification: tokenizationSpecification
  }
);

/**
 * An initialized google.payments.api.PaymentsClient object or null if not yet set
 *
 * @see {@link getGooglePaymentsClient}
 */
let paymentsClient = null;

/**
 * Configure your site's support for payment methods supported by the Google Pay
 * API.
 *
 * Each member of allowedPaymentMethods should contain only the required fields,
 * allowing reuse of this base request when determining a viewer's ability
 * to pay and later requesting a supported payment method
 *
 * @returns {object} Google Pay API version, payment methods supported by the site
 */
function getGoogleIsReadyToPayRequest() {
  return Object.assign(
      {},
      baseRequest,
      {
        allowedPaymentMethods: [baseCardPaymentMethod]
      }
  );
}

/**
 * Configure support for the Google Pay API
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest|PaymentDataRequest}
 * @returns {object} PaymentDataRequest fields
 */
function getGooglePaymentDataRequest() {
  const paymentDataRequest = Object.assign({}, baseRequest);
  paymentDataRequest.allowedPaymentMethods = [cardPaymentMethod];
  paymentDataRequest.transactionInfo = getGoogleTransactionInfo();
  paymentDataRequest.merchantInfo = {
    // @todo a merchant ID is available for a production environment after approval by Google
    // See {@link https://developers.google.com/pay/api/web/guides/test-and-deploy/integration-checklist|Integration checklist}
    // merchantId: '12345678901234567890',
    merchantName: 'Example Merchant'
  };

  paymentDataRequest.callbackIntents = ['OFFER'];
  paymentDataRequest.shippingAddressRequired = false;
  paymentDataRequest.shippingAddressParameters = getGoogleShippingAddressParameters();

  return paymentDataRequest;
}

/**
 * Return an active PaymentsClient or initialize
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/client#PaymentsClient|PaymentsClient constructor}
 * @returns {google.payments.api.PaymentsClient} Google Pay API client
 */
function getGooglePaymentsClient() {
  if ( paymentsClient === null ) {
    paymentsClient = new google.payments.api.PaymentsClient({
      environment: 'TEST',
      merchantInfo: {
        merchantName: 'Example Merchant',
        merchantId: '01234567890123456789'
      },
      paymentDataCallbacks: {
        onPaymentDataChanged: onPaymentDataChanged
      }
    });
  }
  return paymentsClient;
}

/**
 * These functions handle adding valid promo codes to the payment sheet
 * as well as adjusting the display items to match.
 *
 * To add a new promo code, create a new function per this template
 * and define it as valid in the onPaymentDataChanged function.
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentDataRequestUpdate|PaymentDataRequestUpdate}
 * @param {string} redemptionCode string representing the promo code to apply
 * @param {string} description string representing the description to show
 * @param {int} discountPercentage int representing the percentage to discount.
 * Please note the discount value should be negative. Ex: -20 = 20% discount.
 * @param {object} PaymentDataRequestUpdate object representing
 * the current state of the payment data request.
 * @returns {object} PaymentDataRequestUpdate object to update the
 * payment sheet with new transaction info and offer data.
 */

function percentageDiscount(promoParameters, paymentDataRequestUpdate) {
  // set variables
  let originalTransactionInfo = getGoogleTransactionInfo();
  /* because this promo code calculates a % of original prices,
   * we need to get the original transaction info */
  let newTransactionInfo = paymentDataRequestUpdate.newTransactionInfo;
  let discount = 0;

    // update promo code and description
  paymentDataRequestUpdate.newOfferInfo.offers.push({
    redemptionCode: promoParameters['code'],
    description: promoParameters['description']
  });

  // calculate discount (from original transaction items only)
  originalTransactionInfo.displayItems.forEach(function(displayItem) {
    discount += parseFloat(displayItem.price) * promoParameters['value'] * 0.01;
  });

  // add displayItem with new discount
  newTransactionInfo.displayItems.push({
      label: promoParameters['code'],
      price: discount.toFixed(2),
      type: 'LINE_ITEM'
  });

  return paymentDataRequestUpdate;
}

function staticDiscount(promoParameters, paymentDataRequestUpdate) {
  // set variables
  let newTransactionInfo = paymentDataRequestUpdate.newTransactionInfo;

    // update promo code and description
  paymentDataRequestUpdate.newOfferInfo.offers.push({
    redemptionCode: promoParameters['code'],
    description: promoParameters['description']
  });

  // add displayItem with new discount
  newTransactionInfo.displayItems.push({
      label: promoParameters['code'],
      price: promoParameters['value'].toFixed(2),
      type: 'LINE_ITEM'
  });

  return paymentDataRequestUpdate;
}

/**
 * Handles offer callback intents.
 *
 * @param {object} itermediatePaymentData response from Google Pay API when a promo code is entered in the google pay payment sheet.
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#IntermediatePaymentData|IntermediatePaymentData object reference}
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentDataRequestUpdate|PaymentDataRequestUpdate}
 * @returns Promise<{object}> Promise of PaymentDataRequestUpdate object to update the payment sheet with new transaction info and offer data.
 */
function onPaymentDataChanged(intermediatePaymentData) {
  return new Promise(function(resolve, reject) {

    let redemptionCodes = new Set();
    let shippingOptionData = intermediatePaymentData.shippingOptionData;
    let paymentDataRequestUpdate = {};
    paymentDataRequestUpdate.newTransactionInfo = getGoogleTransactionInfo();

    // ensure that promo codes set is unique
    if(typeof intermediatePaymentData.offerData != 'undefined') {
      redemptionCodes = new Set(intermediatePaymentData.offerData.redemptionCodes);
    }

    // validate promo codes and add descriptions to payment sheet
    if (intermediatePaymentData.callbackTrigger === 'OFFER') {
      paymentDataRequestUpdate.newOfferInfo = {};
      paymentDataRequestUpdate.newOfferInfo.offers = [];
      for (redemptionCode of redemptionCodes) {
        if (validPromoCodes[redemptionCode]) {
          paymentDataRequestUpdate = validPromoCodes[redemptionCode].function(
            validPromoCodes[redemptionCode],
            paymentDataRequestUpdate
          );
        } else {
          paymentDataRequestUpdate.error = getGoogleOfferInvalidError(redemptionCode);
        }
      }
    }
    /**
     * Update item costs and total.
     *
     * In production, this final calculation should always be calculated
     * server-side to ensure it matches the price that the merchant sends to the
     * processor.
     */
    paymentDataRequestUpdate.newTransactionInfo = calculateNewTransactionInfo(
      paymentDataRequestUpdate.newTransactionInfo
    )

    resolve(paymentDataRequestUpdate);
  });
}

/**
 * Helper function to update the TransactionInfo object.
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo|TransactionInfo}
 * @param {object} transactionInfo respresenting the selected shipping option in the payment sheet.
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo|TransactionInfo}
 * @returns {object} transaction info, suitable for use as transactionInfo property of PaymentDataRequest
 */
function calculateNewTransactionInfo(newTransactionInfo) {
  // calculate the new totalPrice from display items
  let totalPrice = 0.00;
  newTransactionInfo.displayItems.forEach(
    function(displayItem) {
      totalPrice += parseFloat(displayItem.price);
    }
  );
  // Note: newTransactionInfo.totalPrice must be a string
  newTransactionInfo.totalPrice = totalPrice.toFixed(2);

  return newTransactionInfo;
}

/**
 * Initialize Google PaymentsClient after Google-hosted JavaScript has loaded
 *
 * Display a Google Pay payment button after confirmation of the viewer's
 * ability to pay.
 */
function onGooglePayLoaded() {
  const paymentsClient = getGooglePaymentsClient();
  paymentsClient.isReadyToPay(getGoogleIsReadyToPayRequest())
      .then(function(response) {
        if (response.result) {
          addGooglePayButton();
          // @todo prefetch payment data to improve performance after confirming site functionality
          // prefetchGooglePaymentData();
        }
      })
      .catch(function(err) {
        // show error in developer console for debugging
        console.error(err);
      });
}

/**
 * Add a Google Pay purchase button alongside an existing checkout button
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#ButtonOptions|Button options}
 * @see {@link https://developers.google.com/pay/api/web/guides/brand-guidelines|Google Pay brand guidelines}
 */
function addGooglePayButton() {
  const paymentsClient = getGooglePaymentsClient();
  const button =
      paymentsClient.createButton({
        onClick: onGooglePaymentButtonClicked,
        allowedPaymentMethods: [baseCardPaymentMethod]
      });
  document.getElementById('container').appendChild(button);
}

/**
 * Provide Google Pay API with a payment amount, currency, and amount status
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo|TransactionInfo}
 * @returns {object} transaction info, suitable for use as transactionInfo property of PaymentDataRequest
 */
function getGoogleTransactionInfo() {
  return {
        displayItems: [
        {
          label: 'Subtotal',
          type: 'SUBTOTAL',
          price: '11.00',
          status: 'FINAL'
        },
        {
          label: 'Tax',
          type: 'TAX',
          price: '1.00'
        }
    ],
    currencyCode: 'USD',
    totalPriceStatus: 'FINAL',
    totalPrice: '12.00',
    totalPriceLabel: 'Total'
  };
}

/**
 * Provide Google Pay API with shipping address parameters.
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#ShippingAddressParameters|ShippingAddressParameters}
 * @returns {object} shipping address details, suitable for use as shippingAddressParameters property of PaymentDataRequest
 */
function getGoogleShippingAddressParameters() {
        return  {
        allowedCountryCodes: ['US', 'UK', 'FR', 'CA', 'MX', 'GA'],
    phoneNumberRequired: false
  };
}

/**
 * Provide Google Pay API with an invalid offer error.
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentDataError|PaymentDataError}
 * @returns {object} payment data error, suitable for use as error property of PaymentDataRequestUpdate
 */
function getGoogleOfferInvalidError(redemptionCode) {
        return {
    reason: 'OFFER_INVALID',
    message: redemptionCode + ' is not a valid promo code.',
    intent: 'OFFER'
        };
}

/**
 * Prefetch payment data to improve performance
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/client#prefetchPaymentData|prefetchPaymentData()}
 */
function prefetchGooglePaymentData() {
  const paymentDataRequest = getGooglePaymentDataRequest();
  // transactionInfo must be set but does not affect cache
  paymentDataRequest.transactionInfo = {
    totalPriceStatus: 'NOT_CURRENTLY_KNOWN',
    currencyCode: 'USD'
  };
  const paymentsClient = getGooglePaymentsClient();
  paymentsClient.prefetchPaymentData(paymentDataRequest);
}


/**
 * Show Google Pay payment sheet when Google Pay payment button is clicked
 */
function onGooglePaymentButtonClicked() {
  const paymentDataRequest = getGooglePaymentDataRequest();
  paymentDataRequest.transactionInfo = getGoogleTransactionInfo();

  const paymentsClient = getGooglePaymentsClient();
  paymentsClient.loadPaymentData(paymentDataRequest)
      .then(function(paymentData) {
        // handle the response
        processPayment(paymentData);
      })
      .catch(function(err) {
        // show error in developer console for debugging
        console.error(err);
      });
}

/**
 * Process payment data returned by the Google Pay API
 * In a production environment, this function should always be implemented
 * server-side.
 *
 * @param {object} paymentData response from Google Pay API after user approves payment
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentData|PaymentData object reference}
 */
function processPayment(paymentData) {
  // show returned data in developer console for debugging
    console.log(paymentData);
  // @todo pass payment token to your gateway to process payment
  paymentToken = paymentData.paymentMethodData.tokenizationData.token;
}</script>
<script async
  src="https://pay.google.com/gp/p/js/pay.js"
  onload="onGooglePayLoaded()"></script>
המטרה: עוברים אל רשימת המשימות לשילוב כדי לאמת את השילוב ולבקש גישה לסביבת הייצור.