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.
- Create a new react-native project.
- Render the <GooglePayButton
style={{
width: 180,
height: 100,
}}
onPress={() => {}}
allowedPaymentMethods={googlePayRequest.allowedPaymentMethods}
theme={GooglePayButtonConstants.Themes.Dark}
type={GooglePayButtonConstants.Types.Subscribe}
radius={4}
/>
- Observe rendered button text
Expected behavior
Different button text rendered based on type is expected.
Screenshots
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.
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.
style={{
width: 180,
height: 100,
}}
onPress={() => {}}
allowedPaymentMethods={googlePayRequest.allowedPaymentMethods}
theme={GooglePayButtonConstants.Themes.Dark}
type={GooglePayButtonConstants.Types.Subscribe}
radius={4}
/>
Expected behavior
Different button text rendered based on type is expected.
Screenshots
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.