11 Integration Steps
Below is a diagram of the steps for a PaywayWS enabled Google Pay transaction.
11.1 Step 1: Queue Transaction
Before presenting the page with the Google Pay button, you will send PaywayWS a queueSale or queueAuthorize request. This request will return a paywayRequestToken that will be used to complete the request.
The purpose of this request is to avoid sending transaction information to the browser that can be manipulated by the user. The queued payment includes the payment amount, source id, and payment type. Once this step is completed, the Google Pay button can be displayed on your page. Note you should not send a paywaySessionToken to the web site, this can be accessed by the user and used for unauthorized transactions.
11.2 Step 2: Send Queued Transaction
11.3 Step 3: Hosted Payment Results
Using the paywayRequestToken from the previous steps, you may call hostedPaymentResults to get details on the completed transaction. The account information entered by the user on the Google Pay sheet will be returned, with the credit card number masked.
At this point you can store and/or present any of this information to the user for receipt purposes or other processing. This interaction is between your server and PaywayWS so none of this information is available to the browser during the transaction.
When this call is complete, the paywayRequestToken is invalidated on Payway. This call is optional. If you skip it, the paywayRequestToken will expire without further action.