Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
handleApplePayPress = async () => {
try {
this.setState({
loading: true,
status: null,
token: null,
})
const token = await stripe.paymentRequestWithNativePay({
// requiredBillingAddressFields: ['all'],
// requiredShippingAddressFields: ['all'],
shippingMethods: [{
id: 'fedex',
label: 'FedEX',
detail: 'Test @ 10',
amount: '10.00',
}],
},
[{
label: 'Whisky',
amount: '50.00',
}, {
label: 'Vine',
amount: '60.00',
}, {
handleAndroidPayPress = async () => {
try {
this.setState({
loading: true,
token: null,
})
const token = await stripe.paymentRequestWithNativePay({
total_price: '100.00',
currency_code: 'USD',
shipping_address_required: true,
phone_number_required: true,
shipping_countries: ['US', 'CA'],
line_items: [{
currency_code: 'USD',
description: 'Whisky',
total_price: '50.00',
unit_price: '50.00',
quantity: '1',
}, {
currency_code: 'USD',
description: 'Vine',
total_price: '30.00',
unit_price: '30.00',