Skip to content

<GooglePayButton> is always rendered as 'plain' type #103

Description

@ssu-isoton

Describe the bug

The component always displayed as 'plain' type.

`
const googlePayRequest = {
apiVersion: 2,
apiVersionMinor: 0,
allowedPaymentMethods: [
{
type: 'CARD',
parameters: {
allowedAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS'],
allowedCardNetworks: [
'AMEX',
'DISCOVER',
'INTERAC',
'JCB',
'MASTERCARD',
'VISA',
],
},
tokenizationSpecification: {
type: 'PAYMENT_GATEWAY',
parameters: {
gateway: 'adyen',
gatewayMerchantId: '',
},
},
},
],
merchantInfo: {
merchantName: 'Example Merchant',
},
};

return (
<GooglePayButton
style={{
width: 180,
height: 100,
}}
onPress={() => {}}
allowedPaymentMethods={googlePayRequest.allowedPaymentMethods}
theme={GooglePayButtonConstants.Themes.Dark}
type={GooglePayButtonConstants.Types.Subscribe}
radius={4}
/>
);
`

To Reproduce
Steps to reproduce the behavior:
It should be really easy to reproduce.

  1. Create a new react-native project.
  2. Render the <GooglePayButton
    style={{
    width: 180,
    height: 100,
    }}
    onPress={() => {}}
    allowedPaymentMethods={googlePayRequest.allowedPaymentMethods}
    theme={GooglePayButtonConstants.Themes.Dark}
    type={GooglePayButtonConstants.Types.Subscribe}
    radius={4}
    />
  3. Observe rendered button text

Expected behavior
Different button text rendered based on type is expected.

Screenshots

Image

Desktop (please complete the following information):
none

Smartphone (please complete the following information):
Tested on Simulator and real android device (SAMSUNG S24)

Additional context
Add any other context about the problem here.

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