<GooglePayButton> is always rendered as 'plain' type
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
Research direction
Start by reproducing the issue in a new React Native project with the provided GooglePayButton example, then trace the GooglePayButton rendering entry point and its Android implementation. The fix is done when the displayed button text changes according to the supplied type, including Subscribe, on both the simulator and a real Android device.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Kotlin
- Stars
- 63
- Forks
- 23
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 5
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from google-pay/react-native-make-payment
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 48/100
google-pay/react-native-make-payment#50 · 1 comment · 1 reaction ·
All issues in google-pay/react-native-make-payment
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
mobile-dev-inc/Maestro#3646 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
GetStream/stream-chat-android#6762 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SimonHalvdansson/Harmonic-HN#363 ·