@stripe/stripe-react-native 0.22.0 → 0.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/android/src/main/java/com/reactnativestripesdk/CardFieldView.kt +0 -2
  3. package/android/src/main/java/com/reactnativestripesdk/CardFormView.kt +2 -3
  4. package/ios/Mappers.swift +26 -7
  5. package/lib/commonjs/NativeStripeSdk.js.map +1 -1
  6. package/lib/commonjs/components/AddToWalletButton.js.map +1 -1
  7. package/lib/commonjs/components/AddressSheet.js.map +1 -1
  8. package/lib/commonjs/components/ApplePayButton.js +1 -1
  9. package/lib/commonjs/components/ApplePayButton.js.map +1 -1
  10. package/lib/commonjs/components/ApplePayButtonNative.js +2 -0
  11. package/lib/commonjs/components/ApplePayButtonNative.js.map +1 -0
  12. package/lib/commonjs/components/AuBECSDebitForm.js.map +1 -1
  13. package/lib/commonjs/components/CardField.js.map +1 -1
  14. package/lib/commonjs/components/CardForm.js.map +1 -1
  15. package/lib/commonjs/components/GooglePayButton.js +1 -1
  16. package/lib/commonjs/components/GooglePayButton.js.map +1 -1
  17. package/lib/commonjs/components/GooglePayButtonNative.js +2 -0
  18. package/lib/commonjs/components/GooglePayButtonNative.js.map +1 -0
  19. package/lib/commonjs/components/PlatformPayButton.js +1 -1
  20. package/lib/commonjs/components/PlatformPayButton.js.map +1 -1
  21. package/lib/commonjs/components/StripeContainer.js.map +1 -1
  22. package/lib/commonjs/components/StripeProvider.js.map +1 -1
  23. package/lib/commonjs/functions.js.map +1 -1
  24. package/lib/commonjs/helpers.js.map +1 -1
  25. package/lib/commonjs/hooks/useApplePay.js.map +1 -1
  26. package/lib/commonjs/hooks/useConfirmPayment.js.map +1 -1
  27. package/lib/commonjs/hooks/useConfirmSetupIntent.js.map +1 -1
  28. package/lib/commonjs/hooks/useFinancialConnectionsSheet.js.map +1 -1
  29. package/lib/commonjs/hooks/useGooglePay.js.map +1 -1
  30. package/lib/commonjs/hooks/usePaymentSheet.js.map +1 -1
  31. package/lib/commonjs/hooks/usePlatformPay.js.map +1 -1
  32. package/lib/commonjs/hooks/useStripe.js.map +1 -1
  33. package/lib/commonjs/index.js.map +1 -1
  34. package/lib/commonjs/plugin/withStripe.js.map +1 -1
  35. package/lib/commonjs/types/ApplePay.js.map +1 -1
  36. package/lib/commonjs/types/Common.js.map +1 -1
  37. package/lib/commonjs/types/Errors.js.map +1 -1
  38. package/lib/commonjs/types/FinancialConnections.js.map +1 -1
  39. package/lib/commonjs/types/GooglePay.js.map +1 -1
  40. package/lib/commonjs/types/NextAction.js.map +1 -1
  41. package/lib/commonjs/types/PaymentIntent.js.map +1 -1
  42. package/lib/commonjs/types/PaymentMethod.js.map +1 -1
  43. package/lib/commonjs/types/PaymentSheet.js.map +1 -1
  44. package/lib/commonjs/types/PlatformPay.js.map +1 -1
  45. package/lib/commonjs/types/PushProvisioning.js.map +1 -1
  46. package/lib/commonjs/types/SetupIntent.js.map +1 -1
  47. package/lib/commonjs/types/ThreeDSecure.js.map +1 -1
  48. package/lib/commonjs/types/Token.js.map +1 -1
  49. package/lib/commonjs/types/components/ApplePayButtonComponent.js.map +1 -1
  50. package/lib/commonjs/types/components/AuBECSDebitFormComponent.js.map +1 -1
  51. package/lib/commonjs/types/components/CardFieldInput.js.map +1 -1
  52. package/lib/commonjs/types/components/CardFormView.js.map +1 -1
  53. package/lib/commonjs/types/components/GooglePayButtonComponent.js +2 -0
  54. package/lib/commonjs/types/components/GooglePayButtonComponent.js.map +1 -0
  55. package/lib/commonjs/types/index.js +1 -1
  56. package/lib/commonjs/types/index.js.map +1 -1
  57. package/lib/module/NativeStripeSdk.js.map +1 -1
  58. package/lib/module/components/AddToWalletButton.js.map +1 -1
  59. package/lib/module/components/AddressSheet.js.map +1 -1
  60. package/lib/module/components/ApplePayButton.js +1 -1
  61. package/lib/module/components/ApplePayButton.js.map +1 -1
  62. package/lib/module/components/ApplePayButtonNative.js +2 -0
  63. package/lib/module/components/ApplePayButtonNative.js.map +1 -0
  64. package/lib/module/components/AuBECSDebitForm.js.map +1 -1
  65. package/lib/module/components/CardField.js.map +1 -1
  66. package/lib/module/components/CardForm.js.map +1 -1
  67. package/lib/module/components/GooglePayButton.js +1 -1
  68. package/lib/module/components/GooglePayButton.js.map +1 -1
  69. package/lib/module/components/GooglePayButtonNative.js +2 -0
  70. package/lib/module/components/GooglePayButtonNative.js.map +1 -0
  71. package/lib/module/components/PlatformPayButton.js +1 -1
  72. package/lib/module/components/PlatformPayButton.js.map +1 -1
  73. package/lib/module/components/StripeContainer.js.map +1 -1
  74. package/lib/module/components/StripeProvider.js.map +1 -1
  75. package/lib/module/functions.js.map +1 -1
  76. package/lib/module/helpers.js.map +1 -1
  77. package/lib/module/hooks/useApplePay.js.map +1 -1
  78. package/lib/module/hooks/useConfirmPayment.js.map +1 -1
  79. package/lib/module/hooks/useConfirmSetupIntent.js.map +1 -1
  80. package/lib/module/hooks/useFinancialConnectionsSheet.js.map +1 -1
  81. package/lib/module/hooks/useGooglePay.js.map +1 -1
  82. package/lib/module/hooks/usePaymentSheet.js.map +1 -1
  83. package/lib/module/hooks/usePlatformPay.js.map +1 -1
  84. package/lib/module/hooks/useStripe.js.map +1 -1
  85. package/lib/module/index.js.map +1 -1
  86. package/lib/module/plugin/withStripe.js.map +1 -1
  87. package/lib/module/types/ApplePay.js.map +1 -1
  88. package/lib/module/types/Common.js.map +1 -1
  89. package/lib/module/types/Errors.js.map +1 -1
  90. package/lib/module/types/FinancialConnections.js.map +1 -1
  91. package/lib/module/types/GooglePay.js.map +1 -1
  92. package/lib/module/types/NextAction.js.map +1 -1
  93. package/lib/module/types/PaymentIntent.js.map +1 -1
  94. package/lib/module/types/PaymentMethod.js.map +1 -1
  95. package/lib/module/types/PaymentSheet.js.map +1 -1
  96. package/lib/module/types/PlatformPay.js.map +1 -1
  97. package/lib/module/types/PushProvisioning.js.map +1 -1
  98. package/lib/module/types/SetupIntent.js.map +1 -1
  99. package/lib/module/types/ThreeDSecure.js.map +1 -1
  100. package/lib/module/types/Token.js.map +1 -1
  101. package/lib/module/types/components/ApplePayButtonComponent.js.map +1 -1
  102. package/lib/module/types/components/AuBECSDebitFormComponent.js.map +1 -1
  103. package/lib/module/types/components/CardFieldInput.js.map +1 -1
  104. package/lib/module/types/components/CardFormView.js.map +1 -1
  105. package/lib/module/types/components/GooglePayButtonComponent.js +2 -0
  106. package/lib/module/types/components/GooglePayButtonComponent.js.map +1 -0
  107. package/lib/module/types/index.js +1 -1
  108. package/lib/module/types/index.js.map +1 -1
  109. package/lib/typescript/src/components/ApplePayButton.d.ts +1 -1
  110. package/lib/typescript/src/components/ApplePayButtonNative.d.ts +3 -0
  111. package/lib/typescript/src/components/GooglePayButtonNative.d.ts +3 -0
  112. package/lib/typescript/src/types/Token.d.ts +1 -0
  113. package/lib/typescript/src/types/components/ApplePayButtonComponent.d.ts +12 -1
  114. package/lib/typescript/src/types/components/GooglePayButtonComponent.d.ts +6 -0
  115. package/lib/typescript/src/types/index.d.ts +2 -1
  116. package/package.json +3 -3
  117. package/src/components/ApplePayButton.tsx +3 -10
  118. package/src/components/ApplePayButtonNative.tsx +5 -0
  119. package/src/components/GooglePayButton.tsx +1 -3
  120. package/src/components/GooglePayButtonNative.tsx +7 -0
  121. package/src/components/PlatformPayButton.tsx +2 -4
  122. package/src/types/Token.ts +1 -0
  123. package/src/types/components/ApplePayButtonComponent.ts +18 -2
  124. package/src/types/components/GooglePayButtonComponent.ts +6 -0
  125. package/src/types/index.ts +2 -0
  126. package/stripe-react-native.podspec +1 -1
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={ApplePay:true,PaymentIntent:true,PaymentMethod:true,PaymentSheet:true,SetupIntent:true,ThreeDSecure:true,GooglePay:true,ApplePayButtonComponent:true,AuBECSDebitFormComponent:true,CardFieldInput:true,CardFormView:true,Token:true,FinancialConnections:true,PlatformPay:true,Address:true,BillingDetails:true,AddressDetails:true};Object.defineProperty(exports,"Address",{enumerable:true,get:function get(){return _Common.Address;}});Object.defineProperty(exports,"AddressDetails",{enumerable:true,get:function get(){return _Common.AddressDetails;}});exports.AuBECSDebitFormComponent=exports.ApplePayButtonComponent=exports.ApplePay=void 0;Object.defineProperty(exports,"BillingDetails",{enumerable:true,get:function get(){return _Common.BillingDetails;}});exports.Token=exports.ThreeDSecure=exports.SetupIntent=exports.PlatformPay=exports.PaymentSheet=exports.PaymentMethod=exports.PaymentIntent=exports.GooglePay=exports.FinancialConnections=exports.CardFormView=exports.CardFieldInput=void 0;var ApplePay=_interopRequireWildcard(require("./ApplePay"));exports.ApplePay=ApplePay;var PaymentIntent=_interopRequireWildcard(require("./PaymentIntent"));exports.PaymentIntent=PaymentIntent;var PaymentMethod=_interopRequireWildcard(require("./PaymentMethod"));exports.PaymentMethod=PaymentMethod;var PaymentSheet=_interopRequireWildcard(require("./PaymentSheet"));exports.PaymentSheet=PaymentSheet;var SetupIntent=_interopRequireWildcard(require("./SetupIntent"));exports.SetupIntent=SetupIntent;var ThreeDSecure=_interopRequireWildcard(require("./ThreeDSecure"));exports.ThreeDSecure=ThreeDSecure;var GooglePay=_interopRequireWildcard(require("./GooglePay"));exports.GooglePay=GooglePay;var ApplePayButtonComponent=_interopRequireWildcard(require("./components/ApplePayButtonComponent"));exports.ApplePayButtonComponent=ApplePayButtonComponent;var AuBECSDebitFormComponent=_interopRequireWildcard(require("./components/AuBECSDebitFormComponent"));exports.AuBECSDebitFormComponent=AuBECSDebitFormComponent;var CardFieldInput=_interopRequireWildcard(require("./components/CardFieldInput"));exports.CardFieldInput=CardFieldInput;var CardFormView=_interopRequireWildcard(require("./components/CardFormView"));exports.CardFormView=CardFormView;var Token=_interopRequireWildcard(require("./Token"));exports.Token=Token;var FinancialConnections=_interopRequireWildcard(require("./FinancialConnections"));exports.FinancialConnections=FinancialConnections;var PlatformPay=_interopRequireWildcard(require("./PlatformPay"));exports.PlatformPay=PlatformPay;var _PushProvisioning=require("./PushProvisioning");Object.keys(_PushProvisioning).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_PushProvisioning[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _PushProvisioning[key];}});});var _Errors=require("./Errors");Object.keys(_Errors).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_Errors[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _Errors[key];}});});var _Common=require("./Common");function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||typeof obj!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}
1
+ Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={ApplePay:true,PaymentIntent:true,PaymentMethod:true,PaymentSheet:true,SetupIntent:true,ThreeDSecure:true,GooglePay:true,ApplePayButtonComponent:true,GooglePayButtonComponent:true,AuBECSDebitFormComponent:true,CardFieldInput:true,CardFormView:true,Token:true,FinancialConnections:true,PlatformPay:true,Address:true,BillingDetails:true,AddressDetails:true};Object.defineProperty(exports,"Address",{enumerable:true,get:function get(){return _Common.Address;}});Object.defineProperty(exports,"AddressDetails",{enumerable:true,get:function get(){return _Common.AddressDetails;}});exports.AuBECSDebitFormComponent=exports.ApplePayButtonComponent=exports.ApplePay=void 0;Object.defineProperty(exports,"BillingDetails",{enumerable:true,get:function get(){return _Common.BillingDetails;}});exports.Token=exports.ThreeDSecure=exports.SetupIntent=exports.PlatformPay=exports.PaymentSheet=exports.PaymentMethod=exports.PaymentIntent=exports.GooglePayButtonComponent=exports.GooglePay=exports.FinancialConnections=exports.CardFormView=exports.CardFieldInput=void 0;var ApplePay=_interopRequireWildcard(require("./ApplePay"));exports.ApplePay=ApplePay;var PaymentIntent=_interopRequireWildcard(require("./PaymentIntent"));exports.PaymentIntent=PaymentIntent;var PaymentMethod=_interopRequireWildcard(require("./PaymentMethod"));exports.PaymentMethod=PaymentMethod;var PaymentSheet=_interopRequireWildcard(require("./PaymentSheet"));exports.PaymentSheet=PaymentSheet;var SetupIntent=_interopRequireWildcard(require("./SetupIntent"));exports.SetupIntent=SetupIntent;var ThreeDSecure=_interopRequireWildcard(require("./ThreeDSecure"));exports.ThreeDSecure=ThreeDSecure;var GooglePay=_interopRequireWildcard(require("./GooglePay"));exports.GooglePay=GooglePay;var ApplePayButtonComponent=_interopRequireWildcard(require("./components/ApplePayButtonComponent"));exports.ApplePayButtonComponent=ApplePayButtonComponent;var GooglePayButtonComponent=_interopRequireWildcard(require("./components/GooglePayButtonComponent"));exports.GooglePayButtonComponent=GooglePayButtonComponent;var AuBECSDebitFormComponent=_interopRequireWildcard(require("./components/AuBECSDebitFormComponent"));exports.AuBECSDebitFormComponent=AuBECSDebitFormComponent;var CardFieldInput=_interopRequireWildcard(require("./components/CardFieldInput"));exports.CardFieldInput=CardFieldInput;var CardFormView=_interopRequireWildcard(require("./components/CardFormView"));exports.CardFormView=CardFormView;var Token=_interopRequireWildcard(require("./Token"));exports.Token=Token;var FinancialConnections=_interopRequireWildcard(require("./FinancialConnections"));exports.FinancialConnections=FinancialConnections;var PlatformPay=_interopRequireWildcard(require("./PlatformPay"));exports.PlatformPay=PlatformPay;var _PushProvisioning=require("./PushProvisioning");Object.keys(_PushProvisioning).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_PushProvisioning[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _PushProvisioning[key];}});});var _Errors=require("./Errors");Object.keys(_Errors).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_Errors[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _Errors[key];}});});var _Common=require("./Common");function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||typeof obj!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":"wiCAeA,4D,0BACA,sE,oCACA,sE,oCACA,oE,kCACA,kE,gCACA,oE,kCACA,8D,4BACA,qG,wDACA,uG,0DACA,mF,sCACA,+E,kCACA,sD,oBACA,oF,kDACA,kE,gCAmBA,mYACA,iVACA,gC","sourcesContent":["import type {\n ApplePayError,\n CardActionError,\n ConfirmPaymentError,\n ConfirmSetupIntentError,\n CreatePaymentMethodError,\n CreateTokenError,\n GooglePayError,\n PaymentSheetError,\n RetrievePaymentIntentError,\n RetrieveSetupIntentError,\n StripeError,\n VerifyMicrodepositsError,\n CollectBankAccountError,\n} from './Errors';\nimport * as ApplePay from './ApplePay';\nimport * as PaymentIntent from './PaymentIntent';\nimport * as PaymentMethod from './PaymentMethod';\nimport * as PaymentSheet from './PaymentSheet';\nimport * as SetupIntent from './SetupIntent';\nimport * as ThreeDSecure from './ThreeDSecure';\nimport * as GooglePay from './GooglePay';\nimport * as ApplePayButtonComponent from './components/ApplePayButtonComponent';\nimport * as AuBECSDebitFormComponent from './components/AuBECSDebitFormComponent';\nimport * as CardFieldInput from './components/CardFieldInput';\nimport * as CardFormView from './components/CardFormView';\nimport * as Token from './Token';\nimport * as FinancialConnections from './FinancialConnections';\nimport * as PlatformPay from './PlatformPay';\n\nexport {\n ApplePay,\n PaymentIntent,\n PaymentMethod,\n PaymentSheet,\n SetupIntent,\n ThreeDSecure,\n GooglePay,\n ApplePayButtonComponent,\n AuBECSDebitFormComponent,\n CardFieldInput,\n CardFormView,\n Token,\n FinancialConnections,\n PlatformPay,\n};\n\nexport * from './PushProvisioning';\nexport * from './Errors';\nexport { Address, BillingDetails, AddressDetails } from './Common';\n\n/**\n * @ignore\n */\nexport type Dictionary<T> = {\n [key: string]: T;\n};\n\nexport interface AppInfo {\n name?: string;\n partnerId?: string;\n url?: string;\n version?: string;\n}\n\nexport type CreatePaymentMethodResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<CreatePaymentMethodError>;\n };\n\nexport type RetrievePaymentIntentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<RetrievePaymentIntentError>;\n };\n\nexport type RetrieveSetupIntentResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<RetrieveSetupIntentError>;\n };\n\nexport type ConfirmPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<ConfirmPaymentError>;\n };\n\nexport type HandleNextActionResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<CardActionError>;\n };\n\nexport type ConfirmSetupIntentResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<ConfirmSetupIntentError>;\n };\n\nexport type CreateTokenForCVCUpdateResult =\n | {\n tokenId: string;\n error?: undefined;\n }\n | {\n tokenId?: undefined;\n error: StripeError<ConfirmSetupIntentError>;\n };\n\nexport type InitPaymentSheetResult =\n | {\n paymentOption?: PaymentSheet.PaymentOption;\n error?: undefined;\n }\n | {\n paymentOption?: undefined;\n error: StripeError<PaymentSheetError>;\n };\n\nexport type PresentPaymentSheetResult = {\n paymentOption?: PaymentSheet.PaymentOption | undefined;\n error?: StripeError<PaymentSheetError> | undefined;\n};\n\nexport type CreateTokenResult =\n | {\n token: Token.Result;\n error?: undefined;\n }\n | {\n token?: undefined;\n error: StripeError<CreateTokenError>;\n };\n\nexport type ConfirmPaymentSheetPaymentResult = {\n error?: StripeError<PaymentSheetError>;\n};\n\nexport type ApplePayResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<ApplePayError>;\n };\n\nexport interface InitStripeParams {\n publishableKey: string;\n stripeAccountId?: string;\n threeDSecureParams?: ThreeDSecure.ConfigurationParams;\n merchantIdentifier?: string;\n urlScheme?: string;\n setReturnUrlSchemeOnAndroid?: boolean;\n}\n\nexport interface InitialiseParams extends InitStripeParams {\n appInfo: AppInfo;\n}\n\nexport type GooglePayInitResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<GooglePayError>;\n };\n\nexport type PayWithGooglePayResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<GooglePayError>;\n };\n\nexport type CreateGooglePayPaymentMethodResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<GooglePayError>;\n };\n\nexport type OpenApplePaySetupResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<ApplePayError>;\n };\n\nexport type VerifyMicrodepositsParams =\n | {\n amounts: number[];\n descriptorCode?: undefined;\n }\n | {\n amounts?: undefined;\n descriptorCode: string;\n };\n\nexport type VerifyMicrodepositsForPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<VerifyMicrodepositsError>;\n };\n\nexport type VerifyMicrodepositsForSetupResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<VerifyMicrodepositsError>;\n };\n\nexport type CollectBankAccountForPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<CollectBankAccountError>;\n };\n\nexport type CollectBankAccountForSetupResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<CollectBankAccountError>;\n };\n"]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["import type {\n ApplePayError,\n CardActionError,\n ConfirmPaymentError,\n ConfirmSetupIntentError,\n CreatePaymentMethodError,\n CreateTokenError,\n GooglePayError,\n PaymentSheetError,\n RetrievePaymentIntentError,\n RetrieveSetupIntentError,\n StripeError,\n VerifyMicrodepositsError,\n CollectBankAccountError,\n} from './Errors';\nimport * as ApplePay from './ApplePay';\nimport * as PaymentIntent from './PaymentIntent';\nimport * as PaymentMethod from './PaymentMethod';\nimport * as PaymentSheet from './PaymentSheet';\nimport * as SetupIntent from './SetupIntent';\nimport * as ThreeDSecure from './ThreeDSecure';\nimport * as GooglePay from './GooglePay';\nimport * as ApplePayButtonComponent from './components/ApplePayButtonComponent';\nimport * as GooglePayButtonComponent from './components/GooglePayButtonComponent';\nimport * as AuBECSDebitFormComponent from './components/AuBECSDebitFormComponent';\nimport * as CardFieldInput from './components/CardFieldInput';\nimport * as CardFormView from './components/CardFormView';\nimport * as Token from './Token';\nimport * as FinancialConnections from './FinancialConnections';\nimport * as PlatformPay from './PlatformPay';\n\nexport {\n ApplePay,\n PaymentIntent,\n PaymentMethod,\n PaymentSheet,\n SetupIntent,\n ThreeDSecure,\n GooglePay,\n ApplePayButtonComponent,\n GooglePayButtonComponent,\n AuBECSDebitFormComponent,\n CardFieldInput,\n CardFormView,\n Token,\n FinancialConnections,\n PlatformPay,\n};\n\nexport * from './PushProvisioning';\nexport * from './Errors';\nexport { Address, BillingDetails, AddressDetails } from './Common';\n\n/**\n * @ignore\n */\nexport type Dictionary<T> = {\n [key: string]: T;\n};\n\nexport interface AppInfo {\n name?: string;\n partnerId?: string;\n url?: string;\n version?: string;\n}\n\nexport type CreatePaymentMethodResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<CreatePaymentMethodError>;\n };\n\nexport type RetrievePaymentIntentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<RetrievePaymentIntentError>;\n };\n\nexport type RetrieveSetupIntentResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<RetrieveSetupIntentError>;\n };\n\nexport type ConfirmPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<ConfirmPaymentError>;\n };\n\nexport type HandleNextActionResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<CardActionError>;\n };\n\nexport type ConfirmSetupIntentResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<ConfirmSetupIntentError>;\n };\n\nexport type CreateTokenForCVCUpdateResult =\n | {\n tokenId: string;\n error?: undefined;\n }\n | {\n tokenId?: undefined;\n error: StripeError<ConfirmSetupIntentError>;\n };\n\nexport type InitPaymentSheetResult =\n | {\n paymentOption?: PaymentSheet.PaymentOption;\n error?: undefined;\n }\n | {\n paymentOption?: undefined;\n error: StripeError<PaymentSheetError>;\n };\n\nexport type PresentPaymentSheetResult = {\n paymentOption?: PaymentSheet.PaymentOption | undefined;\n error?: StripeError<PaymentSheetError> | undefined;\n};\n\nexport type CreateTokenResult =\n | {\n token: Token.Result;\n error?: undefined;\n }\n | {\n token?: undefined;\n error: StripeError<CreateTokenError>;\n };\n\nexport type ConfirmPaymentSheetPaymentResult = {\n error?: StripeError<PaymentSheetError>;\n};\n\nexport type ApplePayResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<ApplePayError>;\n };\n\nexport interface InitStripeParams {\n publishableKey: string;\n stripeAccountId?: string;\n threeDSecureParams?: ThreeDSecure.ConfigurationParams;\n merchantIdentifier?: string;\n urlScheme?: string;\n setReturnUrlSchemeOnAndroid?: boolean;\n}\n\nexport interface InitialiseParams extends InitStripeParams {\n appInfo: AppInfo;\n}\n\nexport type GooglePayInitResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<GooglePayError>;\n };\n\nexport type PayWithGooglePayResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<GooglePayError>;\n };\n\nexport type CreateGooglePayPaymentMethodResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<GooglePayError>;\n };\n\nexport type OpenApplePaySetupResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<ApplePayError>;\n };\n\nexport type VerifyMicrodepositsParams =\n | {\n amounts: number[];\n descriptorCode?: undefined;\n }\n | {\n amounts?: undefined;\n descriptorCode: string;\n };\n\nexport type VerifyMicrodepositsForPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<VerifyMicrodepositsError>;\n };\n\nexport type VerifyMicrodepositsForSetupResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<VerifyMicrodepositsError>;\n };\n\nexport type CollectBankAccountForPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<CollectBankAccountError>;\n };\n\nexport type CollectBankAccountForSetupResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<CollectBankAccountError>;\n };\n"],"mappings":"umCAeA,4DAAuC,0BACvC,sEAAiD,oCACjD,sEAAiD,oCACjD,oEAA+C,kCAC/C,kEAA6C,gCAC7C,oEAA+C,kCAC/C,8DAAyC,4BACzC,qGAAgF,wDAChF,uGAAkF,0DAClF,uGAAkF,0DAClF,mFAA8D,sCAC9D,+EAA0D,kCAC1D,sDAAiC,oBACjC,oFAA+D,kDAC/D,kEAA6C,gCAoB7C,mYACA,iVACA,gCAAmE"}
@@ -1,5 +1,5 @@
1
+ import type { AccessibilityProps, StyleProp, ViewStyle } from 'react-native';
1
2
  import type { ApplePayButtonComponent } from '../types';
2
- import { AccessibilityProps, StyleProp, ViewStyle } from 'react-native';
3
3
  /**
4
4
  * Apple Pay Button Component Props
5
5
  */
@@ -0,0 +1,3 @@
1
+ import type { ApplePayButtonComponent } from '../types';
2
+ declare const ApplePayButtonNative: import("react-native").HostComponent<ApplePayButtonComponent.NativeProps>;
3
+ export default ApplePayButtonNative;
@@ -0,0 +1,3 @@
1
+ import type { GooglePayButtonComponent } from '../types';
2
+ declare const GooglePayButtonNative: import("react-native").HostComponent<GooglePayButtonComponent.NativeProps>;
3
+ export default GooglePayButtonNative;
@@ -31,6 +31,7 @@ export interface BankAccount {
31
31
  }
32
32
  export declare type BankAccountStatus = 'Errored' | 'New' | 'Validated' | 'VerificationFailed' | 'Verified';
33
33
  export interface Card {
34
+ id: string;
34
35
  country: string;
35
36
  brand: CardBrand;
36
37
  currency?: string;
@@ -1,10 +1,21 @@
1
- import type { StyleProp, ViewStyle } from 'react-native';
1
+ import type { StyleProp, ViewStyle, NativeSyntheticEvent } from 'react-native';
2
+ import type { ShippingMethod, ShippingContact } from '../PlatformPay';
2
3
  export interface NativeProps {
3
4
  style?: StyleProp<ViewStyle>;
5
+ disabled?: boolean;
4
6
  type?: number;
5
7
  buttonStyle?: number;
6
8
  borderRadius?: number;
7
9
  onPressAction?(): void;
10
+ onShippingMethodSelectedAction?: (value: NativeSyntheticEvent<{
11
+ shippingMethod: ShippingMethod;
12
+ }>) => void;
13
+ onShippingContactSelectedAction?: (value: NativeSyntheticEvent<{
14
+ shippingContact: ShippingContact;
15
+ }>) => void;
16
+ onCouponCodeEnteredAction?: (value: NativeSyntheticEvent<{
17
+ couponCode: string;
18
+ }>) => void;
8
19
  }
9
20
  export declare type Type = 'plain' | 'buy' | 'setUp' | 'inStore' | 'donate' | 'checkout' | 'book' | 'subscribe' | 'reload' | 'addMoney' | 'topUp' | 'order' | 'rent' | 'support' | 'contribute' | 'tip' | 'continue';
10
21
  export declare type Style = 'white' | 'whiteOutline' | 'black' | 'automatic';
@@ -0,0 +1,6 @@
1
+ import type { StyleProp, ViewStyle } from 'react-native';
2
+ export interface NativeProps {
3
+ style?: StyleProp<ViewStyle>;
4
+ type?: number;
5
+ buttonType?: string;
6
+ }
@@ -7,13 +7,14 @@ import * as SetupIntent from './SetupIntent';
7
7
  import * as ThreeDSecure from './ThreeDSecure';
8
8
  import * as GooglePay from './GooglePay';
9
9
  import * as ApplePayButtonComponent from './components/ApplePayButtonComponent';
10
+ import * as GooglePayButtonComponent from './components/GooglePayButtonComponent';
10
11
  import * as AuBECSDebitFormComponent from './components/AuBECSDebitFormComponent';
11
12
  import * as CardFieldInput from './components/CardFieldInput';
12
13
  import * as CardFormView from './components/CardFormView';
13
14
  import * as Token from './Token';
14
15
  import * as FinancialConnections from './FinancialConnections';
15
16
  import * as PlatformPay from './PlatformPay';
16
- export { ApplePay, PaymentIntent, PaymentMethod, PaymentSheet, SetupIntent, ThreeDSecure, GooglePay, ApplePayButtonComponent, AuBECSDebitFormComponent, CardFieldInput, CardFormView, Token, FinancialConnections, PlatformPay, };
17
+ export { ApplePay, PaymentIntent, PaymentMethod, PaymentSheet, SetupIntent, ThreeDSecure, GooglePay, ApplePayButtonComponent, GooglePayButtonComponent, AuBECSDebitFormComponent, CardFieldInput, CardFormView, Token, FinancialConnections, PlatformPay, };
17
18
  export * from './PushProvisioning';
18
19
  export * from './Errors';
19
20
  export { Address, BillingDetails, AddressDetails } from './Common';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stripe/stripe-react-native",
3
- "version": "0.22.0",
3
+ "version": "0.22.1",
4
4
  "author": "Stripe",
5
5
  "description": "Stripe SDK for React Native",
6
6
  "main": "lib/commonjs/index",
@@ -40,7 +40,7 @@
40
40
  "dependencies": {},
41
41
  "devDependencies": {
42
42
  "@babel/plugin-transform-typescript": "^7.13.0",
43
- "@expo/config-types": "^46.0.0",
43
+ "@expo/config-types": "^47.0.0",
44
44
  "@react-native-community/bob": "^0.16.2",
45
45
  "@react-native-community/eslint-config": "^3.0.0",
46
46
  "@types/jest": "^26.0.23",
@@ -58,7 +58,7 @@
58
58
  "eslint-config-prettier": "^6.11.0",
59
59
  "eslint-plugin-prettier": "^3.1.3",
60
60
  "expect-webdriverio": "^2.0.1",
61
- "expo": "^46.0.9",
61
+ "expo": "^47.0.8",
62
62
  "husky": "^8.0.0",
63
63
  "jest": "^26.6.3",
64
64
  "metro-react-native-babel-preset": "^0.70.3",
@@ -1,14 +1,7 @@
1
- import type { ApplePayButtonComponent } from '../types';
2
1
  import React, { useMemo } from 'react';
3
- import {
4
- AccessibilityProps,
5
- requireNativeComponent,
6
- StyleProp,
7
- ViewStyle,
8
- } from 'react-native';
9
-
10
- const ApplePayButtonNative =
11
- requireNativeComponent<ApplePayButtonComponent.NativeProps>('ApplePayButton');
2
+ import ApplePayButtonNative from './ApplePayButtonNative';
3
+ import type { AccessibilityProps, StyleProp, ViewStyle } from 'react-native';
4
+ import type { ApplePayButtonComponent } from '../types';
12
5
 
13
6
  /**
14
7
  * Apple Pay Button Component Props
@@ -0,0 +1,5 @@
1
+ import { requireNativeComponent } from 'react-native';
2
+ import type { ApplePayButtonComponent } from '../types';
3
+ const ApplePayButtonNative =
4
+ requireNativeComponent<ApplePayButtonComponent.NativeProps>('ApplePayButton');
5
+ export default ApplePayButtonNative;
@@ -3,12 +3,10 @@ import {
3
3
  AccessibilityProps,
4
4
  StyleProp,
5
5
  ViewStyle,
6
- requireNativeComponent,
7
6
  TouchableOpacity,
8
7
  StyleSheet,
9
8
  } from 'react-native';
10
-
11
- const GooglePayButtonNative = requireNativeComponent<any>('GooglePayButton');
9
+ import GooglePayButtonNative from './GooglePayButtonNative';
12
10
 
13
11
  /**
14
12
  * Google Pay Button Component Props
@@ -0,0 +1,7 @@
1
+ import { requireNativeComponent } from 'react-native';
2
+ import type { GooglePayButtonComponent } from '../types';
3
+ const GooglePayButtonNative =
4
+ requireNativeComponent<GooglePayButtonComponent.NativeProps>(
5
+ 'GooglePayButton'
6
+ );
7
+ export default GooglePayButtonNative;
@@ -3,7 +3,6 @@ import {
3
3
  AccessibilityProps,
4
4
  StyleProp,
5
5
  ViewStyle,
6
- requireNativeComponent,
7
6
  TouchableOpacity,
8
7
  StyleSheet,
9
8
  Platform,
@@ -15,9 +14,8 @@ import {
15
14
  ShippingMethod,
16
15
  ShippingContact,
17
16
  } from '../types/PlatformPay';
18
-
19
- const GooglePayButtonNative = requireNativeComponent<any>('GooglePayButton');
20
- const ApplePayButtonNative = requireNativeComponent<any>('ApplePayButton');
17
+ import GooglePayButtonNative from './GooglePayButtonNative';
18
+ import ApplePayButtonNative from './ApplePayButtonNative';
21
19
 
22
20
  /**
23
21
  * PlatformPayButton Component Props
@@ -56,6 +56,7 @@ export type BankAccountStatus =
56
56
  | 'Verified';
57
57
 
58
58
  export interface Card {
59
+ id: string;
59
60
  country: string;
60
61
  brand: CardBrand;
61
62
  currency?: string;
@@ -1,11 +1,27 @@
1
- import type { StyleProp, ViewStyle } from 'react-native';
2
-
1
+ import type { StyleProp, ViewStyle, NativeSyntheticEvent } from 'react-native';
2
+ import type { ShippingMethod, ShippingContact } from '../PlatformPay';
3
3
  export interface NativeProps {
4
4
  style?: StyleProp<ViewStyle>;
5
+ disabled?: boolean;
5
6
  type?: number;
6
7
  buttonStyle?: number;
7
8
  borderRadius?: number;
8
9
  onPressAction?(): void;
10
+ onShippingMethodSelectedAction?: (
11
+ value: NativeSyntheticEvent<{
12
+ shippingMethod: ShippingMethod;
13
+ }>
14
+ ) => void;
15
+ onShippingContactSelectedAction?: (
16
+ value: NativeSyntheticEvent<{
17
+ shippingContact: ShippingContact;
18
+ }>
19
+ ) => void;
20
+ onCouponCodeEnteredAction?: (
21
+ value: NativeSyntheticEvent<{
22
+ couponCode: string;
23
+ }>
24
+ ) => void;
9
25
  }
10
26
 
11
27
  export type Type =
@@ -0,0 +1,6 @@
1
+ import type { StyleProp, ViewStyle } from 'react-native';
2
+ export interface NativeProps {
3
+ style?: StyleProp<ViewStyle>;
4
+ type?: number;
5
+ buttonType?: string;
6
+ }
@@ -21,6 +21,7 @@ import * as SetupIntent from './SetupIntent';
21
21
  import * as ThreeDSecure from './ThreeDSecure';
22
22
  import * as GooglePay from './GooglePay';
23
23
  import * as ApplePayButtonComponent from './components/ApplePayButtonComponent';
24
+ import * as GooglePayButtonComponent from './components/GooglePayButtonComponent';
24
25
  import * as AuBECSDebitFormComponent from './components/AuBECSDebitFormComponent';
25
26
  import * as CardFieldInput from './components/CardFieldInput';
26
27
  import * as CardFormView from './components/CardFormView';
@@ -37,6 +38,7 @@ export {
37
38
  ThreeDSecure,
38
39
  GooglePay,
39
40
  ApplePayButtonComponent,
41
+ GooglePayButtonComponent,
40
42
  AuBECSDebitFormComponent,
41
43
  CardFieldInput,
42
44
  CardFormView,
@@ -1,7 +1,7 @@
1
1
  require 'json'
2
2
 
3
3
  package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
4
- stripe_version = '~> 23.2.0'
4
+ stripe_version = '~> 23.3.0'
5
5
 
6
6
  Pod::Spec.new do |s|
7
7
  s.name = 'stripe-react-native'