React native 条纹&x2B;苹果支付:如果我有代币,我可以收取我想要的任何金额吗?

React native 条纹&x2B;苹果支付:如果我有代币,我可以收取我想要的任何金额吗?,react-native,stripe-payments,React Native,Stripe Payments,我正在查看React Native的stripe/apple pay库: 以下是一个例子: const items = [{ label: 'Whisky', amount: '50.00', }, { label: 'Tipsi, Inc' amount: '50.00', }] const shippingMethods = [{ id: 'fedex', label: 'FedEX', detail: 'Test @ 10', amount: '10.00

我正在查看React Native的stripe/apple pay库:

以下是一个例子:

const items = [{
  label: 'Whisky',
  amount: '50.00',
}, {
  label: 'Tipsi, Inc'
  amount: '50.00',
}]

const shippingMethods = [{
  id: 'fedex',
  label: 'FedEX',
  detail: 'Test @ 10',
  amount: '10.00',
}]

const options = {
  requiredBillingAddressFields: 'all',
  requiredShippingAddressFields: 'all',
  shippingMethods,
}

const token = await stripe.paymentRequestWithApplePay(items, options) // <-----------------

// Client specific code
// api.sendTokenToBackend(token)

// You should complete the operation by calling
stripe.completeApplePayRequest()

// Or cancel if an error occurred
// stripe.cancelApplePayRequest()
const项=[{
标签:“威士忌”,
金额:'50.00',
}, {
标签:“Tipsi公司”
金额:'50.00',
}]
常量shippingMethods=[{
id:'联邦快递',
标签:“联邦快递”,
细节:“测试@10”,
金额:'10.00',
}]
常量选项={
requiredBillingAddressFields:“全部”,
requiredShippingAddressFields:“全部”,
运输方法,
}

const token=wait stripe.paymentRequestWithApplePay(项目、选项)//令牌与您通过API收取的金额无关。您可以将该卡标记化,但不能准确表示您希望在后端向其收取的金额。你不应该那样做,但你可以。您不必提供金额来标记卡;由于充值和加密卡详细信息是两个断开连接的过程。令牌与您通过API充值的金额无关。您可以将该卡标记化,但不能准确表示您希望在后端向其收取的金额。你不应该那样做,但你可以。您不必提供金额来标记卡;由于充电和加密卡详细信息是两个断开连接的过程。