third_party/gpay/src/payjs_async.js
/**
   * Called when load payment data result is returned. This triggers the payment
   * response callback passed to the client.
   *
   * @private
   */
Called when load payment data result is returned. This triggers the payment
response callback passed to the client.

@private
Called when load payment data result is returned . This triggers the payment response callback passed to the client . @private
onResult_(response) {
    response
      .then((result) => {
        PayFrameHelper.postMessage({
          'eventType': PostMessageEventType.LOG_LOAD_PAYMENT_DATA_API,
          'clientLatencyStartMs': this.loadPaymentDataApiStartTimeMs_,
          'buyFlowMode': this.buyFlowMode_,
        });
      })
      .catch((result) => {
        if (result['errorCode']) {
          PayFrameHelper.postMessage({
            'eventType': PostMessageEventType.LOG_LOAD_PAYMENT_DATA_API,
            'error':  (result['errorCode']),
            'buyFlowMode': this.buyFlowMode_,
          });
        } else {
          PayFrameHelper.postMessage({
            'eventType': PostMessageEventType.LOG_LOAD_PAYMENT_DATA_API,
            'error': PublicErrorCode.BUYER_CANCEL,
            'buyFlowMode': this.buyFlowMode_,
          });
        }
      });
    this.onPaymentResponse_(response);
  }
onResult_ ( response ) { response . then ( ( result ) => { PayFrameHelper . postMessage ( { 'eventType' : PostMessageEventType . LOG_LOAD_PAYMENT_DATA_API , 'clientLatencyStartMs' : this . loadPaymentDataApiStartTimeMs_ , 'buyFlowMode' : this . buyFlowMode_ , } ) ; } ) . catch ( ( result ) => { if ( result [ 'errorCode' ] ) { PayFrameHelper . postMessage ( { 'eventType' : PostMessageEventType . LOG_LOAD_PAYMENT_DATA_API , 'error' : ( result [ 'errorCode' ] ) , 'buyFlowMode' : this . buyFlowMode_ , } ) ; } else { PayFrameHelper . postMessage ( { 'eventType' : PostMessageEventType . LOG_LOAD_PAYMENT_DATA_API , 'error' : PublicErrorCode . BUYER_CANCEL , 'buyFlowMode' : this . buyFlowMode_ , } ) ; } } ) ; this . onPaymentResponse_ ( response ) ; }
Called when load payment data result is returned.
Called when load payment data result is returned .
/** @type {!PublicErrorCode} */ // If user closes window we don't get a error code