We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
this is my code
card_token always undefined what should i do to get back the paymentToken
showPaymentSheet = (succeed = true) => { const {amount} = this.props; const newStr = amount.replace(/,/, ''); console.log('Here is amount', amount, newStr); const paymentRequest = new PaymentRequest( [ { supportedMethods: ['apple-pay'], data: { merchantIdentifier: '****', //supportedNetworks: ['visa', 'mastercard', 'mada'], supportedNetworks: ['mada'], countryCode: 'SA', currencyCode: 'SAR', // // uncomment this block to activate automatic Stripe tokenization. // // try putting your key pk_test... in here and see how the token format changes. // paymentMethodTokenizationParameters: { // parameters: { // gateway: 'stripe', // 'stripe:publishableKey': Config.STRIPE_KEY, // }, // }, }, }, ], { id: 'basic-example', displayItems: [ { label: 'Deposit', amount: {currency: 'SAR', value: newStr}, }, ], total: { label: `${strings('global.appName')} ${strings('title.wallet')}`, amount: {currency: 'SAR', value: newStr}, }, }, ); paymentRequest .show() .then((paymentResponse) => { console.log('paymentResponse', paymentResponse.details) const card_token = paymentResponse.details.paymentToken; if (succeed) { paymentResponse.complete('success'); this.apiPostApplePay(); showToast(`Payment request completed with card token ${card_token}`); } else { paymentResponse.complete('failure'); showDangerToast('Payment request failed'); } }) .catch((error) => { console.log('error', error); if (error.message === 'AbortError') { showDangerToast('Payment request was dismissed'); // this.debug('Payment request was dismissed'); } }); };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
this is my code
card_token always undefined
what should i do to get back the paymentToken
The text was updated successfully, but these errors were encountered: