Closed speedDaemonAmber closed 1 year ago
Hi @speedDaemonAmber Would it be possible to create a reproducer?
I created a repo here that reproduces this issue.
@speedDaemonAmber could you try with:
const paymentRequest: google.payments.api.PaymentDataRequest = {
apiVersion: 2,
apiVersionMinor: 0,
allowedPaymentMethods: [
{
type: 'CARD',
parameters: {
allowedAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS'],
allowedCardNetworks: ['MASTERCARD', 'VISA']
},
tokenizationSpecification: {
type: 'PAYMENT_GATEWAY',
parameters: {
gateway: 'example',
gatewayMerchantId: 'exampleGatewayMerchantID',
}
}
}
],
merchantInfo: {
merchantId: '12345678901234567890',
merchantName: 'Demo Merchant'
},
transactionInfo: {
totalPriceStatus: 'FINAL',
totalPriceLabel: 'Total',
totalPrice: '100.00',
currencyCode: 'USD',
countryCode: 'US'
}
};
That worked. Thank you!
I am trying to integrate this into my existing React app, which uses Typescript. I am getting an incompatible types error: Type 'string' is not assignable to type 'PaymentMethodType'.
This is my payment request object where the payment method type is 'CARD', but it is not recognizing this as an acceptable value.
Is there a way to get around this?