Skip to content

Callback to execute additional logic before opening the Payment Request UI #92

@socsieng

Description

@socsieng

Discussed in https://github.com/google-pay/google-pay-button/discussions/91

Originally posted by nielsengoncalves July 7, 2021
Hello,

We're using the React component and we have a requirement that we need to do some additional logic when user clicks the Google Pay button before opening the popup.

It would be nice if there was a possibility to use some of components callback to achieve that, something such as onSelect or any other naming that fits better.

<GooglePayButton
  environment="TEST"
  paymentRequest={{...}}
  onSelect={() => {
    // Additional logic that should happen before popup is open
  }}
/>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions