I need to test google pay with fake card. But as I insert card details Your request failed. Use a different payment method, or contact us. Learn more [OR-CCSEH-21]
this error occurs. Here is my code in Angular. I am using these fake cards from following[link]https://developers.google.com/pay/api/android/guides/resources/sample-tokens
paymentRequest: google.payments.api.PaymentDataRequest = {
apiVersion: 2,
apiVersionMinor: 0,
allowedPaymentMethods: [
{
type: 'CARD',
parameters: {
allowedAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS'],
allowedCardNetworks: ['AMEX', 'VISA', 'MASTERCARD']
},
tokenizationSpecification: {
type: 'PAYMENT_GATEWAY',
parameters: {
gateway: 'moneris',
gatewayMerchantId: 'monca05217',
}
}
}
],
merchantInfo: {
merchantId: '12345678901234567890',
merchantName: 'Demo Merchant',
},
transactionInfo: {
totalPriceStatus: 'FINAL',
totalPriceLabel: 'Total',
totalPrice: '0.10',
currencyCode: 'EUR',
countryCode: 'BE'
},
callbackIntents: ['PAYMENT_AUTHORIZATION']
};
onLoadPaymentData = (
event: Event
): void => {
const eventDetail = event as CustomEvent<google.payments.api.PaymentData>;
console.log('load payment data', eventDetail.detail);
}
onPaymentDataAuthorized: google.payments.api.PaymentAuthorizedHandler = (
paymentData
) => {
console.log('payment authorized', paymentData);
return {
transactionState: 'SUCCESS'
};
}
onError = (event: ErrorEvent): void => {
console.error('error', event.error);
}
To test Google Pay in a sandbox mode. Please try the following
More details can be found here: https://developers.google.com/pay/api/android/guides/resources/test-card-suite
I am not very sure of your use case but I hope this helps.