@stripe/stripe-react-native 0.30.0 → 0.31.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.
- package/CHANGELOG.md +11 -0
- package/android/gradle.properties +1 -1
- package/android/src/main/java/com/reactnativestripesdk/PaymentSheetAppearance.kt +41 -10
- package/android/src/main/java/com/reactnativestripesdk/PaymentSheetFragment.kt +10 -3
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +129 -82
- package/android/src/main/java/com/reactnativestripesdk/customersheet/CustomerSheetFragment.kt +329 -0
- package/android/src/main/java/com/reactnativestripesdk/customersheet/ReactNativeCustomerAdapter.kt +138 -0
- package/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt +8 -2
- package/ios/CustomerSheet/CustomerSheetUtils.swift +181 -0
- package/ios/CustomerSheet/ReactNativeCustomerAdapter.swift +173 -0
- package/ios/Mappers.swift +1 -1
- package/ios/StripeSdk+CustomerSheet.swift +166 -0
- package/ios/StripeSdk+PaymentSheet.swift +2 -2
- package/ios/StripeSdk.m +53 -0
- package/ios/StripeSdk.swift +14 -1
- package/jest/mock.js +0 -37
- package/lib/commonjs/NativeStripeSdk.js.map +1 -1
- package/lib/commonjs/components/CustomerSheet.js +2 -0
- package/lib/commonjs/components/CustomerSheet.js.map +1 -0
- package/lib/commonjs/functions.js +1 -1
- package/lib/commonjs/functions.js.map +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types/CustomerSheet.js +2 -0
- package/lib/commonjs/types/CustomerSheet.js.map +1 -0
- package/lib/commonjs/types/Errors.js +1 -1
- package/lib/commonjs/types/Errors.js.map +1 -1
- package/lib/commonjs/types/index.js +1 -1
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/module/NativeStripeSdk.js.map +1 -1
- package/lib/module/components/CustomerSheet.js +2 -0
- package/lib/module/components/CustomerSheet.js.map +1 -0
- package/lib/module/functions.js +1 -1
- package/lib/module/functions.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/types/CustomerSheet.js +2 -0
- package/lib/module/types/CustomerSheet.js.map +1 -0
- package/lib/module/types/Errors.js +1 -1
- package/lib/module/types/Errors.js.map +1 -1
- package/lib/module/types/index.js +1 -1
- package/lib/module/types/index.js.map +1 -1
- package/lib/typescript/src/NativeStripeSdk.d.ts +14 -1
- package/lib/typescript/src/components/CustomerSheet.d.ts +59 -0
- package/lib/typescript/src/index.d.ts +2 -0
- package/lib/typescript/src/types/CustomerSheet.d.ts +94 -0
- package/lib/typescript/src/types/Errors.d.ts +4 -0
- package/lib/typescript/src/types/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/NativeStripeSdk.tsx +31 -0
- package/src/components/CustomerSheet.tsx +327 -0
- package/src/functions.ts +5 -0
- package/src/index.tsx +3 -0
- package/src/types/CustomerSheet.ts +111 -0
- package/src/types/Errors.ts +5 -0
- package/src/types/index.ts +1 -0
- package/stripe-react-native.podspec +1 -1
- package/android/src/main/java/com/reactnativestripesdk/GooglePayFragment.kt +0 -211
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.verifyMicrodepositsForSetup=exports.verifyMicrodepositsForPayment=exports.updatePlatformPaySheet=exports.retrieveSetupIntent=exports.retrievePaymentIntent=exports.resetPaymentSheetCustomer=exports.presentPaymentSheet=exports.openPlatformPaySetup=exports.isPlatformPaySupported=exports.isCardInWallet=exports.initPaymentSheet=exports.handleURLCallback=exports.handleNextActionForSetup=exports.handleNextAction=exports.dismissPlatformPay=exports.createTokenForCVCUpdate=exports.createToken=exports.createPlatformPayToken=exports.createPlatformPayPaymentMethod=exports.createPaymentMethod=exports.confirmSetupIntent=exports.confirmPlatformPaySetupIntent=exports.confirmPlatformPayPayment=exports.confirmPaymentSheetPayment=exports.confirmPayment=exports.collectFinancialConnectionsAccounts=exports.collectBankAccountToken=exports.collectBankAccountForSetup=exports.collectBankAccountForPayment=exports.canAddCardToWallet=exports.Constants=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _helpers=require("./helpers");var _Errors=require("./types/Errors");var _NativeStripeSdk=_interopRequireDefault(require("./NativeStripeSdk"));var _reactNative=require("react-native");var createPaymentMethod=function(){var _ref=(0,_asyncToGenerator2.default)(function*(params){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};try{var _yield$NativeStripeSd=yield _NativeStripeSdk.default.createPaymentMethod(params,options),paymentMethod=_yield$NativeStripeSd.paymentMethod,error=_yield$NativeStripeSd.error;if(error){return{error:error};}return{paymentMethod:paymentMethod};}catch(error){return{error:error};}});return function createPaymentMethod(_x){return _ref.apply(this,arguments);};}();exports.createPaymentMethod=createPaymentMethod;var createToken=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(params){var _params$country;if(params.type==='BankAccount'&&((_params$country=params.country)==null?void 0:_params$country.toLowerCase())==='us'&&!params.routingNumber){return{error:_Errors.MissingRoutingNumber};}try{var _yield$NativeStripeSd2=yield _NativeStripeSdk.default.createToken(params),token=_yield$NativeStripeSd2.token,error=_yield$NativeStripeSd2.error;if(error){return{error:error};}return{token:token};}catch(error){return{error:error};}});return function createToken(_x2){return _ref2.apply(this,arguments);};}();exports.createToken=createToken;var retrievePaymentIntent=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd3=yield _NativeStripeSdk.default.retrievePaymentIntent(clientSecret),paymentIntent=_yield$NativeStripeSd3.paymentIntent,error=_yield$NativeStripeSd3.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:error};}});return function retrievePaymentIntent(_x3){return _ref3.apply(this,arguments);};}();exports.retrievePaymentIntent=retrievePaymentIntent;var retrieveSetupIntent=function(){var _ref4=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd4=yield _NativeStripeSdk.default.retrieveSetupIntent(clientSecret),setupIntent=_yield$NativeStripeSd4.setupIntent,error=_yield$NativeStripeSd4.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:error};}});return function retrieveSetupIntent(_x4){return _ref4.apply(this,arguments);};}();exports.retrieveSetupIntent=retrieveSetupIntent;var confirmPayment=function(){var _ref5=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,params){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};try{var _yield$NativeStripeSd5=yield _NativeStripeSdk.default.confirmPayment(paymentIntentClientSecret,params,options),paymentIntent=_yield$NativeStripeSd5.paymentIntent,error=_yield$NativeStripeSd5.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:error};}});return function confirmPayment(_x5,_x6){return _ref5.apply(this,arguments);};}();exports.confirmPayment=confirmPayment;var handleNextAction=function(){var _ref6=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,returnURL){try{var _ref7=_reactNative.Platform.OS==='ios'?yield _NativeStripeSdk.default.handleNextAction(paymentIntentClientSecret,returnURL!=null?returnURL:null):yield _NativeStripeSdk.default.handleNextAction(paymentIntentClientSecret),paymentIntent=_ref7.paymentIntent,error=_ref7.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function handleNextAction(_x7,_x8){return _ref6.apply(this,arguments);};}();exports.handleNextAction=handleNextAction;var handleNextActionForSetup=function(){var _ref8=(0,_asyncToGenerator2.default)(function*(setupIntentClientSecret,returnURL){try{var _ref9=_reactNative.Platform.OS==='ios'?yield _NativeStripeSdk.default.handleNextActionForSetup(setupIntentClientSecret,returnURL!=null?returnURL:null):yield _NativeStripeSdk.default.handleNextActionForSetup(setupIntentClientSecret),setupIntent=_ref9.setupIntent,error=_ref9.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function handleNextActionForSetup(_x9,_x10){return _ref8.apply(this,arguments);};}();exports.handleNextActionForSetup=handleNextActionForSetup;var confirmSetupIntent=function(){var _ref10=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,params){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};try{var _yield$NativeStripeSd6=yield _NativeStripeSdk.default.confirmSetupIntent(paymentIntentClientSecret,params,options),setupIntent=_yield$NativeStripeSd6.setupIntent,error=_yield$NativeStripeSd6.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:error};}});return function confirmSetupIntent(_x11,_x12){return _ref10.apply(this,arguments);};}();exports.confirmSetupIntent=confirmSetupIntent;var createTokenForCVCUpdate=function(){var _ref11=(0,_asyncToGenerator2.default)(function*(cvc){try{var _yield$NativeStripeSd7=yield _NativeStripeSdk.default.createTokenForCVCUpdate(cvc),tokenId=_yield$NativeStripeSd7.tokenId,error=_yield$NativeStripeSd7.error;if(error){return{error:error};}return{tokenId:tokenId};}catch(error){return{error:error};}});return function createTokenForCVCUpdate(_x13){return _ref11.apply(this,arguments);};}();exports.createTokenForCVCUpdate=createTokenForCVCUpdate;var handleURLCallback=function(){var _ref12=(0,_asyncToGenerator2.default)(function*(url){var stripeHandled=_reactNative.Platform.OS==='ios'?yield _NativeStripeSdk.default.handleURLCallback(url):false;return stripeHandled;});return function handleURLCallback(_x14){return _ref12.apply(this,arguments);};}();exports.handleURLCallback=handleURLCallback;var verifyMicrodepositsForPayment=function(){var _ref13=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref14=yield _NativeStripeSdk.default.verifyMicrodeposits(true,clientSecret,params),paymentIntent=_ref14.paymentIntent,error=_ref14.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function verifyMicrodepositsForPayment(_x15,_x16){return _ref13.apply(this,arguments);};}();exports.verifyMicrodepositsForPayment=verifyMicrodepositsForPayment;var verifyMicrodepositsForSetup=function(){var _ref15=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref16=yield _NativeStripeSdk.default.verifyMicrodeposits(false,clientSecret,params),setupIntent=_ref16.setupIntent,error=_ref16.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function verifyMicrodepositsForSetup(_x17,_x18){return _ref15.apply(this,arguments);};}();exports.verifyMicrodepositsForSetup=verifyMicrodepositsForSetup;var eventEmitter=new _reactNative.NativeEventEmitter(_reactNative.NativeModules.StripeSdk);var confirmHandlerCallback=null;var orderTrackingCallbackListener=null;var initPaymentSheet=function(){var _ref17=(0,_asyncToGenerator2.default)(function*(params){var _params$intentConfigu,_params$applePay;var result;var confirmHandler=params==null?void 0:(_params$intentConfigu=params.intentConfiguration)==null?void 0:_params$intentConfigu.confirmHandler;if(confirmHandler){var _confirmHandlerCallba;(_confirmHandlerCallba=confirmHandlerCallback)==null?void 0:_confirmHandlerCallba.remove();confirmHandlerCallback=eventEmitter.addListener('onConfirmHandlerCallback',function(_ref18){var paymentMethod=_ref18.paymentMethod,shouldSavePaymentMethod=_ref18.shouldSavePaymentMethod;confirmHandler(paymentMethod,shouldSavePaymentMethod,_NativeStripeSdk.default.intentCreationCallback);});}var orderTrackingCallback=params==null?void 0:(_params$applePay=params.applePay)==null?void 0:_params$applePay.setOrderTracking;if(orderTrackingCallback){var _orderTrackingCallbac;(_orderTrackingCallbac=orderTrackingCallbackListener)==null?void 0:_orderTrackingCallbac.remove();orderTrackingCallbackListener=eventEmitter.addListener('onOrderTrackingCallback',function(){orderTrackingCallback(_NativeStripeSdk.default.configureOrderTracking);});}try{result=yield _NativeStripeSdk.default.initPaymentSheet(params);if(result.error){return{error:result.error};}return{paymentOption:result.paymentOption};}catch(error){return{error:error};}});return function initPaymentSheet(_x19){return _ref17.apply(this,arguments);};}();exports.initPaymentSheet=initPaymentSheet;var presentPaymentSheet=function(){var _ref19=(0,_asyncToGenerator2.default)(function*(){var options=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};try{var _yield$NativeStripeSd8=yield _NativeStripeSdk.default.presentPaymentSheet(options),paymentOption=_yield$NativeStripeSd8.paymentOption,error=_yield$NativeStripeSd8.error;if(error){return{error:error};}return{paymentOption:paymentOption};}catch(error){return{error:error};}});return function presentPaymentSheet(){return _ref19.apply(this,arguments);};}();exports.presentPaymentSheet=presentPaymentSheet;var confirmPaymentSheetPayment=function(){var _ref20=(0,_asyncToGenerator2.default)(function*(){try{var _yield$NativeStripeSd9=yield _NativeStripeSdk.default.confirmPaymentSheetPayment(),error=_yield$NativeStripeSd9.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function confirmPaymentSheetPayment(){return _ref20.apply(this,arguments);};}();exports.confirmPaymentSheetPayment=confirmPaymentSheetPayment;var resetPaymentSheetCustomer=function(){var _ref21=(0,_asyncToGenerator2.default)(function*(){return yield _NativeStripeSdk.default.resetPaymentSheetCustomer();});return function resetPaymentSheetCustomer(){return _ref21.apply(this,arguments);};}();exports.resetPaymentSheetCustomer=resetPaymentSheetCustomer;var collectBankAccountForPayment=function(){var _ref22=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref23=yield _NativeStripeSdk.default.collectBankAccount(true,clientSecret,params),paymentIntent=_ref23.paymentIntent,error=_ref23.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function collectBankAccountForPayment(_x20,_x21){return _ref22.apply(this,arguments);};}();exports.collectBankAccountForPayment=collectBankAccountForPayment;var collectBankAccountForSetup=function(){var _ref24=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref25=yield _NativeStripeSdk.default.collectBankAccount(false,clientSecret,params),setupIntent=_ref25.setupIntent,error=_ref25.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function collectBankAccountForSetup(_x22,_x23){return _ref24.apply(this,arguments);};}();exports.collectBankAccountForSetup=collectBankAccountForSetup;var collectBankAccountToken=function(){var _ref26=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd10=yield _NativeStripeSdk.default.collectBankAccountToken(clientSecret),session=_yield$NativeStripeSd10.session,token=_yield$NativeStripeSd10.token,error=_yield$NativeStripeSd10.error;if(error){return{error:error};}return{session:session,token:token};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function collectBankAccountToken(_x24){return _ref26.apply(this,arguments);};}();exports.collectBankAccountToken=collectBankAccountToken;var collectFinancialConnectionsAccounts=function(){var _ref27=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd11=yield _NativeStripeSdk.default.collectFinancialConnectionsAccounts(clientSecret),session=_yield$NativeStripeSd11.session,error=_yield$NativeStripeSd11.error;if(error){return{error:error};}return{session:session};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function collectFinancialConnectionsAccounts(_x25){return _ref27.apply(this,arguments);};}();exports.collectFinancialConnectionsAccounts=collectFinancialConnectionsAccounts;var canAddCardToWallet=function(){var _ref28=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd12=yield _NativeStripeSdk.default.canAddCardToWallet(params),canAddCard=_yield$NativeStripeSd12.canAddCard,details=_yield$NativeStripeSd12.details,error=_yield$NativeStripeSd12.error;if(error){return{error:error};}return{canAddCard:canAddCard,details:details};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function canAddCardToWallet(_x26){return _ref28.apply(this,arguments);};}();exports.canAddCardToWallet=canAddCardToWallet;var isCardInWallet=function(){var _ref29=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd13=yield _NativeStripeSdk.default.isCardInWallet(params),isInWallet=_yield$NativeStripeSd13.isInWallet,token=_yield$NativeStripeSd13.token,error=_yield$NativeStripeSd13.error;if(error){return{error:error};}return{isInWallet:isInWallet,token:token};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function isCardInWallet(_x27){return _ref29.apply(this,arguments);};}();exports.isCardInWallet=isCardInWallet;var Constants=_NativeStripeSdk.default.getConstants();exports.Constants=Constants;var isPlatformPaySupported=function(){var _ref30=(0,_asyncToGenerator2.default)(function*(params){return yield _NativeStripeSdk.default.isPlatformPaySupported(params!=null?params:{});});return function isPlatformPaySupported(_x28){return _ref30.apply(this,arguments);};}();exports.isPlatformPaySupported=isPlatformPaySupported;var confirmPlatformPaySetupIntent=function(){var _ref31=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref32=yield _NativeStripeSdk.default.confirmPlatformPay(clientSecret,params,false),error=_ref32.error,setupIntent=_ref32.setupIntent;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:error};}});return function confirmPlatformPaySetupIntent(_x29,_x30){return _ref31.apply(this,arguments);};}();exports.confirmPlatformPaySetupIntent=confirmPlatformPaySetupIntent;var confirmPlatformPayPayment=function(){var _ref33=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref34=yield _NativeStripeSdk.default.confirmPlatformPay(clientSecret,params,true),error=_ref34.error,paymentIntent=_ref34.paymentIntent;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:error};}});return function confirmPlatformPayPayment(_x31,_x32){return _ref33.apply(this,arguments);};}();exports.confirmPlatformPayPayment=confirmPlatformPayPayment;var dismissPlatformPay=function(){var _ref35=(0,_asyncToGenerator2.default)(function*(){if(_reactNative.Platform.OS!=='ios'){return false;}try{var didDismiss=yield _NativeStripeSdk.default.dismissPlatformPay();return didDismiss;}catch(error){return false;}});return function dismissPlatformPay(){return _ref35.apply(this,arguments);};}();exports.dismissPlatformPay=dismissPlatformPay;var createPlatformPayPaymentMethod=function(){var _ref36=(0,_asyncToGenerator2.default)(function*(params){try{var _ref37=yield _NativeStripeSdk.default.createPlatformPayPaymentMethod(params,false),error=_ref37.error,paymentMethod=_ref37.paymentMethod;if(error){return{error:error};}return{paymentMethod:paymentMethod};}catch(error){return{error:error};}});return function createPlatformPayPaymentMethod(_x33){return _ref36.apply(this,arguments);};}();exports.createPlatformPayPaymentMethod=createPlatformPayPaymentMethod;var createPlatformPayToken=function(){var _ref38=(0,_asyncToGenerator2.default)(function*(params){try{var _ref39=yield _NativeStripeSdk.default.createPlatformPayPaymentMethod(params,true),error=_ref39.error,token=_ref39.token;if(error){return{error:error};}return{token:token};}catch(error){return{error:error};}});return function createPlatformPayToken(_x34){return _ref38.apply(this,arguments);};}();exports.createPlatformPayToken=createPlatformPayToken;var updatePlatformPaySheet=function(){var _ref40=(0,_asyncToGenerator2.default)(function*(params){if(_reactNative.Platform.OS!=='ios'){return{};}try{yield _NativeStripeSdk.default.updatePlatformPaySheet(params.applePay.cartItems,params.applePay.shippingMethods,params.applePay.errors);return{};}catch(error){return{error:error};}});return function updatePlatformPaySheet(_x35){return _ref40.apply(this,arguments);};}();exports.updatePlatformPaySheet=updatePlatformPaySheet;var openPlatformPaySetup=function(){var _ref41=(0,_asyncToGenerator2.default)(function*(){if(_reactNative.Platform.OS==='ios'){yield _NativeStripeSdk.default.openApplePaySetup();}});return function openPlatformPaySetup(){return _ref41.apply(this,arguments);};}();exports.openPlatformPaySetup=openPlatformPaySetup;
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.verifyMicrodepositsForSetup=exports.verifyMicrodepositsForPayment=exports.updatePlatformPaySheet=exports.retrieveSetupIntent=exports.retrievePaymentIntent=exports.resetPaymentSheetCustomer=exports.presentPaymentSheet=exports.openPlatformPaySetup=exports.isPlatformPaySupported=exports.isCardInWallet=exports.initPaymentSheet=exports.handleURLCallback=exports.handleNextActionForSetup=exports.handleNextAction=exports.dismissPlatformPay=exports.createTokenForCVCUpdate=exports.createToken=exports.createPlatformPayToken=exports.createPlatformPayPaymentMethod=exports.createPaymentMethod=exports.confirmSetupIntent=exports.confirmPlatformPaySetupIntent=exports.confirmPlatformPayPayment=exports.confirmPaymentSheetPayment=exports.confirmPayment=exports.collectFinancialConnectionsAccounts=exports.collectBankAccountToken=exports.collectBankAccountForSetup=exports.collectBankAccountForPayment=exports.canAddCardToWallet=exports.Constants=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _helpers=require("./helpers");var _Errors=require("./types/Errors");var _NativeStripeSdk=_interopRequireDefault(require("./NativeStripeSdk"));var _reactNative=require("react-native");var createPaymentMethod=function(){var _ref=(0,_asyncToGenerator2.default)(function*(params){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};try{var _yield$NativeStripeSd=yield _NativeStripeSdk.default.createPaymentMethod(params,options),paymentMethod=_yield$NativeStripeSd.paymentMethod,error=_yield$NativeStripeSd.error;if(error){return{error:error};}return{paymentMethod:paymentMethod};}catch(error){return{error:error};}});return function createPaymentMethod(_x){return _ref.apply(this,arguments);};}();exports.createPaymentMethod=createPaymentMethod;var createToken=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(params){var _params$country;if(params.type==='BankAccount'&&((_params$country=params.country)==null?void 0:_params$country.toLowerCase())==='us'&&!params.routingNumber){return{error:_Errors.MissingRoutingNumber};}try{var _yield$NativeStripeSd2=yield _NativeStripeSdk.default.createToken(params),token=_yield$NativeStripeSd2.token,error=_yield$NativeStripeSd2.error;if(error){return{error:error};}return{token:token};}catch(error){return{error:error};}});return function createToken(_x2){return _ref2.apply(this,arguments);};}();exports.createToken=createToken;var retrievePaymentIntent=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd3=yield _NativeStripeSdk.default.retrievePaymentIntent(clientSecret),paymentIntent=_yield$NativeStripeSd3.paymentIntent,error=_yield$NativeStripeSd3.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:error};}});return function retrievePaymentIntent(_x3){return _ref3.apply(this,arguments);};}();exports.retrievePaymentIntent=retrievePaymentIntent;var retrieveSetupIntent=function(){var _ref4=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd4=yield _NativeStripeSdk.default.retrieveSetupIntent(clientSecret),setupIntent=_yield$NativeStripeSd4.setupIntent,error=_yield$NativeStripeSd4.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:error};}});return function retrieveSetupIntent(_x4){return _ref4.apply(this,arguments);};}();exports.retrieveSetupIntent=retrieveSetupIntent;var confirmPayment=function(){var _ref5=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,params){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};try{var _yield$NativeStripeSd5=yield _NativeStripeSdk.default.confirmPayment(paymentIntentClientSecret,params,options),paymentIntent=_yield$NativeStripeSd5.paymentIntent,error=_yield$NativeStripeSd5.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:error};}});return function confirmPayment(_x5,_x6){return _ref5.apply(this,arguments);};}();exports.confirmPayment=confirmPayment;var handleNextAction=function(){var _ref6=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,returnURL){try{var _ref7=_reactNative.Platform.OS==='ios'?yield _NativeStripeSdk.default.handleNextAction(paymentIntentClientSecret,returnURL!=null?returnURL:null):yield _NativeStripeSdk.default.handleNextAction(paymentIntentClientSecret),paymentIntent=_ref7.paymentIntent,error=_ref7.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function handleNextAction(_x7,_x8){return _ref6.apply(this,arguments);};}();exports.handleNextAction=handleNextAction;var handleNextActionForSetup=function(){var _ref8=(0,_asyncToGenerator2.default)(function*(setupIntentClientSecret,returnURL){try{var _ref9=_reactNative.Platform.OS==='ios'?yield _NativeStripeSdk.default.handleNextActionForSetup(setupIntentClientSecret,returnURL!=null?returnURL:null):yield _NativeStripeSdk.default.handleNextActionForSetup(setupIntentClientSecret),setupIntent=_ref9.setupIntent,error=_ref9.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function handleNextActionForSetup(_x9,_x10){return _ref8.apply(this,arguments);};}();exports.handleNextActionForSetup=handleNextActionForSetup;var confirmSetupIntent=function(){var _ref10=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,params){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};try{var _yield$NativeStripeSd6=yield _NativeStripeSdk.default.confirmSetupIntent(paymentIntentClientSecret,params,options),setupIntent=_yield$NativeStripeSd6.setupIntent,error=_yield$NativeStripeSd6.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:error};}});return function confirmSetupIntent(_x11,_x12){return _ref10.apply(this,arguments);};}();exports.confirmSetupIntent=confirmSetupIntent;var createTokenForCVCUpdate=function(){var _ref11=(0,_asyncToGenerator2.default)(function*(cvc){try{var _yield$NativeStripeSd7=yield _NativeStripeSdk.default.createTokenForCVCUpdate(cvc),tokenId=_yield$NativeStripeSd7.tokenId,error=_yield$NativeStripeSd7.error;if(error){return{error:error};}return{tokenId:tokenId};}catch(error){return{error:error};}});return function createTokenForCVCUpdate(_x13){return _ref11.apply(this,arguments);};}();exports.createTokenForCVCUpdate=createTokenForCVCUpdate;var handleURLCallback=function(){var _ref12=(0,_asyncToGenerator2.default)(function*(url){var stripeHandled=_reactNative.Platform.OS==='ios'?yield _NativeStripeSdk.default.handleURLCallback(url):false;return stripeHandled;});return function handleURLCallback(_x14){return _ref12.apply(this,arguments);};}();exports.handleURLCallback=handleURLCallback;var verifyMicrodepositsForPayment=function(){var _ref13=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref14=yield _NativeStripeSdk.default.verifyMicrodeposits(true,clientSecret,params),paymentIntent=_ref14.paymentIntent,error=_ref14.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function verifyMicrodepositsForPayment(_x15,_x16){return _ref13.apply(this,arguments);};}();exports.verifyMicrodepositsForPayment=verifyMicrodepositsForPayment;var verifyMicrodepositsForSetup=function(){var _ref15=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref16=yield _NativeStripeSdk.default.verifyMicrodeposits(false,clientSecret,params),setupIntent=_ref16.setupIntent,error=_ref16.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function verifyMicrodepositsForSetup(_x17,_x18){return _ref15.apply(this,arguments);};}();exports.verifyMicrodepositsForSetup=verifyMicrodepositsForSetup;var eventEmitter=new _reactNative.NativeEventEmitter(_reactNative.NativeModules.StripeSdk);var confirmHandlerCallback=null;var orderTrackingCallbackListener=null;var initPaymentSheet=function(){var _ref17=(0,_asyncToGenerator2.default)(function*(params){var _params$intentConfigu,_params$applePay;var result;var confirmHandler=params==null?void 0:(_params$intentConfigu=params.intentConfiguration)==null?void 0:_params$intentConfigu.confirmHandler;if(confirmHandler){var _confirmHandlerCallba;(_confirmHandlerCallba=confirmHandlerCallback)==null?void 0:_confirmHandlerCallba.remove();confirmHandlerCallback=eventEmitter.addListener('onConfirmHandlerCallback',function(_ref18){var paymentMethod=_ref18.paymentMethod,shouldSavePaymentMethod=_ref18.shouldSavePaymentMethod;confirmHandler(paymentMethod,shouldSavePaymentMethod,_NativeStripeSdk.default.intentCreationCallback);});}var orderTrackingCallback=params==null?void 0:(_params$applePay=params.applePay)==null?void 0:_params$applePay.setOrderTracking;if(orderTrackingCallback){var _orderTrackingCallbac;(_orderTrackingCallbac=orderTrackingCallbackListener)==null?void 0:_orderTrackingCallbac.remove();orderTrackingCallbackListener=eventEmitter.addListener('onOrderTrackingCallback',function(){orderTrackingCallback(_NativeStripeSdk.default.configureOrderTracking);});}try{if(_reactNative.Platform.OS==='ios'&&!params.returnURL){console.warn("[@stripe/stripe-react-native] You have not provided the 'returnURL' field to 'initPaymentSheet', so payment methods that require redirects will not be shown in your iOS Payment Sheet. Visit https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=payment-sheet#react-native-set-up-return-url to learn more.");}result=yield _NativeStripeSdk.default.initPaymentSheet(params);if(result.error){return{error:result.error};}return{paymentOption:result.paymentOption};}catch(error){return{error:error};}});return function initPaymentSheet(_x19){return _ref17.apply(this,arguments);};}();exports.initPaymentSheet=initPaymentSheet;var presentPaymentSheet=function(){var _ref19=(0,_asyncToGenerator2.default)(function*(){var options=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};try{var _yield$NativeStripeSd8=yield _NativeStripeSdk.default.presentPaymentSheet(options),paymentOption=_yield$NativeStripeSd8.paymentOption,error=_yield$NativeStripeSd8.error;if(error){return{error:error};}return{paymentOption:paymentOption};}catch(error){return{error:error};}});return function presentPaymentSheet(){return _ref19.apply(this,arguments);};}();exports.presentPaymentSheet=presentPaymentSheet;var confirmPaymentSheetPayment=function(){var _ref20=(0,_asyncToGenerator2.default)(function*(){try{var _yield$NativeStripeSd9=yield _NativeStripeSdk.default.confirmPaymentSheetPayment(),error=_yield$NativeStripeSd9.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function confirmPaymentSheetPayment(){return _ref20.apply(this,arguments);};}();exports.confirmPaymentSheetPayment=confirmPaymentSheetPayment;var resetPaymentSheetCustomer=function(){var _ref21=(0,_asyncToGenerator2.default)(function*(){return yield _NativeStripeSdk.default.resetPaymentSheetCustomer();});return function resetPaymentSheetCustomer(){return _ref21.apply(this,arguments);};}();exports.resetPaymentSheetCustomer=resetPaymentSheetCustomer;var collectBankAccountForPayment=function(){var _ref22=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref23=yield _NativeStripeSdk.default.collectBankAccount(true,clientSecret,params),paymentIntent=_ref23.paymentIntent,error=_ref23.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function collectBankAccountForPayment(_x20,_x21){return _ref22.apply(this,arguments);};}();exports.collectBankAccountForPayment=collectBankAccountForPayment;var collectBankAccountForSetup=function(){var _ref24=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref25=yield _NativeStripeSdk.default.collectBankAccount(false,clientSecret,params),setupIntent=_ref25.setupIntent,error=_ref25.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function collectBankAccountForSetup(_x22,_x23){return _ref24.apply(this,arguments);};}();exports.collectBankAccountForSetup=collectBankAccountForSetup;var collectBankAccountToken=function(){var _ref26=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd10=yield _NativeStripeSdk.default.collectBankAccountToken(clientSecret),session=_yield$NativeStripeSd10.session,token=_yield$NativeStripeSd10.token,error=_yield$NativeStripeSd10.error;if(error){return{error:error};}return{session:session,token:token};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function collectBankAccountToken(_x24){return _ref26.apply(this,arguments);};}();exports.collectBankAccountToken=collectBankAccountToken;var collectFinancialConnectionsAccounts=function(){var _ref27=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd11=yield _NativeStripeSdk.default.collectFinancialConnectionsAccounts(clientSecret),session=_yield$NativeStripeSd11.session,error=_yield$NativeStripeSd11.error;if(error){return{error:error};}return{session:session};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function collectFinancialConnectionsAccounts(_x25){return _ref27.apply(this,arguments);};}();exports.collectFinancialConnectionsAccounts=collectFinancialConnectionsAccounts;var canAddCardToWallet=function(){var _ref28=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd12=yield _NativeStripeSdk.default.canAddCardToWallet(params),canAddCard=_yield$NativeStripeSd12.canAddCard,details=_yield$NativeStripeSd12.details,error=_yield$NativeStripeSd12.error;if(error){return{error:error};}return{canAddCard:canAddCard,details:details};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function canAddCardToWallet(_x26){return _ref28.apply(this,arguments);};}();exports.canAddCardToWallet=canAddCardToWallet;var isCardInWallet=function(){var _ref29=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd13=yield _NativeStripeSdk.default.isCardInWallet(params),isInWallet=_yield$NativeStripeSd13.isInWallet,token=_yield$NativeStripeSd13.token,error=_yield$NativeStripeSd13.error;if(error){return{error:error};}return{isInWallet:isInWallet,token:token};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function isCardInWallet(_x27){return _ref29.apply(this,arguments);};}();exports.isCardInWallet=isCardInWallet;var Constants=_NativeStripeSdk.default.getConstants();exports.Constants=Constants;var isPlatformPaySupported=function(){var _ref30=(0,_asyncToGenerator2.default)(function*(params){return yield _NativeStripeSdk.default.isPlatformPaySupported(params!=null?params:{});});return function isPlatformPaySupported(_x28){return _ref30.apply(this,arguments);};}();exports.isPlatformPaySupported=isPlatformPaySupported;var confirmPlatformPaySetupIntent=function(){var _ref31=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref32=yield _NativeStripeSdk.default.confirmPlatformPay(clientSecret,params,false),error=_ref32.error,setupIntent=_ref32.setupIntent;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:error};}});return function confirmPlatformPaySetupIntent(_x29,_x30){return _ref31.apply(this,arguments);};}();exports.confirmPlatformPaySetupIntent=confirmPlatformPaySetupIntent;var confirmPlatformPayPayment=function(){var _ref33=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref34=yield _NativeStripeSdk.default.confirmPlatformPay(clientSecret,params,true),error=_ref34.error,paymentIntent=_ref34.paymentIntent;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:error};}});return function confirmPlatformPayPayment(_x31,_x32){return _ref33.apply(this,arguments);};}();exports.confirmPlatformPayPayment=confirmPlatformPayPayment;var dismissPlatformPay=function(){var _ref35=(0,_asyncToGenerator2.default)(function*(){if(_reactNative.Platform.OS!=='ios'){return false;}try{var didDismiss=yield _NativeStripeSdk.default.dismissPlatformPay();return didDismiss;}catch(error){return false;}});return function dismissPlatformPay(){return _ref35.apply(this,arguments);};}();exports.dismissPlatformPay=dismissPlatformPay;var createPlatformPayPaymentMethod=function(){var _ref36=(0,_asyncToGenerator2.default)(function*(params){try{var _ref37=yield _NativeStripeSdk.default.createPlatformPayPaymentMethod(params,false),error=_ref37.error,paymentMethod=_ref37.paymentMethod;if(error){return{error:error};}return{paymentMethod:paymentMethod};}catch(error){return{error:error};}});return function createPlatformPayPaymentMethod(_x33){return _ref36.apply(this,arguments);};}();exports.createPlatformPayPaymentMethod=createPlatformPayPaymentMethod;var createPlatformPayToken=function(){var _ref38=(0,_asyncToGenerator2.default)(function*(params){try{var _ref39=yield _NativeStripeSdk.default.createPlatformPayPaymentMethod(params,true),error=_ref39.error,token=_ref39.token;if(error){return{error:error};}return{token:token};}catch(error){return{error:error};}});return function createPlatformPayToken(_x34){return _ref38.apply(this,arguments);};}();exports.createPlatformPayToken=createPlatformPayToken;var updatePlatformPaySheet=function(){var _ref40=(0,_asyncToGenerator2.default)(function*(params){if(_reactNative.Platform.OS!=='ios'){return{};}try{yield _NativeStripeSdk.default.updatePlatformPaySheet(params.applePay.cartItems,params.applePay.shippingMethods,params.applePay.errors);return{};}catch(error){return{error:error};}});return function updatePlatformPaySheet(_x35){return _ref40.apply(this,arguments);};}();exports.updatePlatformPaySheet=updatePlatformPaySheet;var openPlatformPaySetup=function(){var _ref41=(0,_asyncToGenerator2.default)(function*(){if(_reactNative.Platform.OS==='ios'){yield _NativeStripeSdk.default.openApplePaySetup();}});return function openPlatformPaySetup(){return _ref41.apply(this,arguments);};}();exports.openPlatformPaySetup=openPlatformPaySetup;
|
|
2
2
|
//# sourceMappingURL=functions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createPaymentMethod","params","options","NativeStripeSdk","paymentMethod","error","createToken","type","country","toLowerCase","routingNumber","MissingRoutingNumber","token","retrievePaymentIntent","clientSecret","paymentIntent","retrieveSetupIntent","setupIntent","confirmPayment","paymentIntentClientSecret","handleNextAction","returnURL","Platform","OS","createError","handleNextActionForSetup","setupIntentClientSecret","confirmSetupIntent","createTokenForCVCUpdate","cvc","tokenId","handleURLCallback","url","stripeHandled","verifyMicrodepositsForPayment","verifyMicrodeposits","verifyMicrodepositsForSetup","eventEmitter","NativeEventEmitter","NativeModules","StripeSdk","confirmHandlerCallback","orderTrackingCallbackListener","initPaymentSheet","result","confirmHandler","intentConfiguration","remove","addListener","shouldSavePaymentMethod","intentCreationCallback","orderTrackingCallback","applePay","setOrderTracking","configureOrderTracking","paymentOption","presentPaymentSheet","confirmPaymentSheetPayment","resetPaymentSheetCustomer","collectBankAccountForPayment","collectBankAccount","collectBankAccountForSetup","collectBankAccountToken","session","collectFinancialConnectionsAccounts","canAddCardToWallet","canAddCard","details","isCardInWallet","isInWallet","Constants","getConstants","isPlatformPaySupported","confirmPlatformPaySetupIntent","confirmPlatformPay","confirmPlatformPayPayment","dismissPlatformPay","didDismiss","createPlatformPayPaymentMethod","createPlatformPayToken","updatePlatformPaySheet","cartItems","shippingMethods","errors","openPlatformPaySetup","openApplePaySetup"],"sources":["functions.ts"],"sourcesContent":["import { createError } from './helpers';\nimport { MissingRoutingNumber } from './types/Errors';\nimport NativeStripeSdk from './NativeStripeSdk';\nimport type {\n PlatformPayError,\n ConfirmPaymentResult,\n ConfirmPaymentSheetPaymentResult,\n SetupIntent,\n PaymentIntent,\n ConfirmSetupIntentResult,\n CreatePaymentMethodResult,\n CreateTokenForCVCUpdateResult,\n CreateTokenResult,\n HandleNextActionResult,\n HandleNextActionForSetupResult,\n InitPaymentSheetResult,\n PaymentMethod,\n PaymentSheet,\n PresentPaymentSheetResult,\n RetrievePaymentIntentResult,\n RetrieveSetupIntentResult,\n StripeError,\n Token,\n VerifyMicrodepositsParams,\n VerifyMicrodepositsForPaymentResult,\n VerifyMicrodepositsForSetupResult,\n CollectBankAccountForPaymentResult,\n CollectBankAccountForSetupResult,\n IsCardInWalletResult,\n CanAddCardToWalletParams,\n CanAddCardToWalletResult,\n FinancialConnections,\n PlatformPay,\n} from './types';\nimport {\n Platform,\n NativeEventEmitter,\n NativeModules,\n EmitterSubscription,\n} from 'react-native';\n\nexport const createPaymentMethod = async (\n params: PaymentMethod.CreateParams,\n options: PaymentMethod.CreateOptions = {}\n): Promise<CreatePaymentMethodResult> => {\n try {\n const { paymentMethod, error } = await NativeStripeSdk.createPaymentMethod(\n params,\n options\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentMethod: paymentMethod!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const createToken = async (\n params: Token.CreateParams\n): Promise<CreateTokenResult> => {\n if (\n params.type === 'BankAccount' &&\n params.country?.toLowerCase() === 'us' &&\n !params.routingNumber\n ) {\n return {\n error: MissingRoutingNumber,\n };\n }\n\n try {\n const { token, error } = await NativeStripeSdk.createToken(params);\n\n if (error) {\n return {\n error,\n };\n }\n return {\n token: token!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const retrievePaymentIntent = async (\n clientSecret: string\n): Promise<RetrievePaymentIntentResult> => {\n try {\n const { paymentIntent, error } =\n await NativeStripeSdk.retrievePaymentIntent(clientSecret);\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const retrieveSetupIntent = async (\n clientSecret: string\n): Promise<RetrieveSetupIntentResult> => {\n try {\n const { setupIntent, error } = await NativeStripeSdk.retrieveSetupIntent(\n clientSecret\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * Confirm and, if necessary, authenticate a PaymentIntent.\n *\n * @param {string} paymentIntentClientSecret The client_secret of the associated [PaymentIntent](https://stripe.com/docs/api/payment_intents).\n * @param {object=} params An optional object that contains data related to the payment method used to confirm this payment. If no object is provided (undefined), then it is assumed that the payment method has already been [attached to the Payment Intent](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method).\n * @param {object=} options An optional object that contains options for this payment method.\n * @returns A promise that resolves to an object containing either a `paymentIntent` field, or an `error` field.\n */\nexport const confirmPayment = async (\n paymentIntentClientSecret: string,\n params?: PaymentIntent.ConfirmParams,\n options: PaymentIntent.ConfirmOptions = {}\n): Promise<ConfirmPaymentResult> => {\n try {\n const { paymentIntent, error } = await NativeStripeSdk.confirmPayment(\n paymentIntentClientSecret,\n params,\n options\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/** Handles any nextAction required to authenticate the PaymentIntent.\n * Call this method if you are using manual confirmation. See https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=custom\n *\n * @param {string} paymentIntentClientSecret The client secret associated with the PaymentIntent.\n * @param {string=} returnURL An optional return URL so the Stripe SDK can redirect back to your app after authentication. This should match the `return_url` you specified during PaymentIntent confirmation.\n * */\nexport const handleNextAction = async (\n paymentIntentClientSecret: string,\n returnURL?: string\n): Promise<HandleNextActionResult> => {\n try {\n const { paymentIntent, error } =\n Platform.OS === 'ios'\n ? await NativeStripeSdk.handleNextAction(\n paymentIntentClientSecret,\n returnURL ?? null\n )\n : await NativeStripeSdk.handleNextAction(paymentIntentClientSecret);\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\n/** Handles any nextAction required to authenticate the SetupIntent.\n * Call this method if you are confirming the SetupIntent on your backend and get a status of requires_action.\n *\n * @param {string} setupIntentClientSecret The client secret associated with the SetupIntent.\n * @param {string=} returnURL An optional return URL so the Stripe SDK can redirect back to your app after authentication. This should match the `return_url` you specified during PaymentIntent confirmation.\n * */\nexport const handleNextActionForSetup = async (\n setupIntentClientSecret: string,\n returnURL?: string\n): Promise<HandleNextActionForSetupResult> => {\n try {\n const { setupIntent, error } =\n Platform.OS === 'ios'\n ? await NativeStripeSdk.handleNextActionForSetup(\n setupIntentClientSecret,\n returnURL ?? null\n )\n : await NativeStripeSdk.handleNextActionForSetup(\n setupIntentClientSecret\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const confirmSetupIntent = async (\n paymentIntentClientSecret: string,\n params: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions = {}\n): Promise<ConfirmSetupIntentResult> => {\n try {\n const { setupIntent, error } = await NativeStripeSdk.confirmSetupIntent(\n paymentIntentClientSecret,\n params,\n options\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const createTokenForCVCUpdate = async (\n cvc: string\n): Promise<CreateTokenForCVCUpdateResult> => {\n try {\n const { tokenId, error } = await NativeStripeSdk.createTokenForCVCUpdate(\n cvc\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n tokenId: tokenId!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * Call this method in your app whenever you receive a URL for a Stripe callback.\n * For convenience, you can pass all URLs you receive to this method first, and\n * check the return value to easily determine whether it is a callback URL that Stripe will handle\n * or if your app should process it normally. This is iOS-only, and will always return false on Android.\n */\nexport const handleURLCallback = async (url: string): Promise<boolean> => {\n const stripeHandled =\n Platform.OS === 'ios'\n ? await NativeStripeSdk.handleURLCallback(url)\n : false;\n return stripeHandled;\n};\n\nexport const verifyMicrodepositsForPayment = async (\n clientSecret: string,\n params: VerifyMicrodepositsParams\n): Promise<VerifyMicrodepositsForPaymentResult> => {\n try {\n const { paymentIntent, error } = (await NativeStripeSdk.verifyMicrodeposits(\n true,\n clientSecret,\n params\n )) as VerifyMicrodepositsForPaymentResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const verifyMicrodepositsForSetup = async (\n clientSecret: string,\n params: VerifyMicrodepositsParams\n): Promise<VerifyMicrodepositsForSetupResult> => {\n try {\n const { setupIntent, error } = (await NativeStripeSdk.verifyMicrodeposits(\n false,\n clientSecret,\n params\n )) as VerifyMicrodepositsForSetupResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nconst eventEmitter = new NativeEventEmitter(NativeModules.StripeSdk);\nlet confirmHandlerCallback: EmitterSubscription | null = null;\nlet orderTrackingCallbackListener: EmitterSubscription | null = null;\n\nexport const initPaymentSheet = async (\n params: PaymentSheet.SetupParams\n): Promise<InitPaymentSheetResult> => {\n let result;\n const confirmHandler = params?.intentConfiguration?.confirmHandler;\n if (confirmHandler) {\n confirmHandlerCallback?.remove();\n confirmHandlerCallback = eventEmitter.addListener(\n 'onConfirmHandlerCallback',\n ({\n paymentMethod,\n shouldSavePaymentMethod,\n }: {\n paymentMethod: PaymentMethod.Result;\n shouldSavePaymentMethod: boolean;\n }) => {\n confirmHandler(\n paymentMethod,\n shouldSavePaymentMethod,\n NativeStripeSdk.intentCreationCallback\n );\n }\n );\n }\n\n const orderTrackingCallback = params?.applePay?.setOrderTracking;\n if (orderTrackingCallback) {\n orderTrackingCallbackListener?.remove();\n orderTrackingCallbackListener = eventEmitter.addListener(\n 'onOrderTrackingCallback',\n () => {\n orderTrackingCallback(NativeStripeSdk.configureOrderTracking);\n }\n );\n }\n\n try {\n result = await NativeStripeSdk.initPaymentSheet(params);\n\n if (result.error) {\n return {\n error: result.error,\n };\n }\n return {\n paymentOption: result.paymentOption,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const presentPaymentSheet = async (\n options: PaymentSheet.PresentOptions = {}\n): Promise<PresentPaymentSheetResult> => {\n try {\n const { paymentOption, error } = await NativeStripeSdk.presentPaymentSheet(\n options\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentOption: paymentOption!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const confirmPaymentSheetPayment =\n async (): Promise<ConfirmPaymentSheetPaymentResult> => {\n try {\n const { error } = await NativeStripeSdk.confirmPaymentSheetPayment();\n if (error) {\n return {\n error,\n };\n }\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n };\n\n/**\n * You must call this method when the user logs out from your app. This will ensure that\n * any persisted authentication state in the PaymentSheet, such as authentication cookies,\n * is also cleared during logout.\n */\nexport const resetPaymentSheetCustomer = async (): Promise<null> => {\n return await NativeStripeSdk.resetPaymentSheetCustomer();\n};\n\nexport const collectBankAccountForPayment = async (\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n): Promise<CollectBankAccountForPaymentResult> => {\n try {\n const { paymentIntent, error } = (await NativeStripeSdk.collectBankAccount(\n true,\n clientSecret,\n params\n )) as CollectBankAccountForPaymentResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const collectBankAccountForSetup = async (\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n): Promise<CollectBankAccountForSetupResult> => {\n try {\n const { setupIntent, error } = (await NativeStripeSdk.collectBankAccount(\n false,\n clientSecret,\n params\n )) as CollectBankAccountForSetupResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\n/**\n * Use collectBankAccountToken in the [Add a Financial Connections Account to a US Custom Connect](https://stripe.com/docs/financial-connections/connect-payouts) account flow.\n * When called, it will load the Authentication Flow, an on-page modal UI which allows your user to securely link their external financial account for payouts.\n * @param {string} clientSecret The client_secret of the [Financial Connections Session](https://stripe.com/docs/api/financial_connections/session).\n * @returns A promise that resolves to an object containing either `session` and `token` fields, or an error field.\n */\nexport const collectBankAccountToken = async (\n clientSecret: string\n): Promise<FinancialConnections.TokenResult> => {\n try {\n const { session, token, error } =\n await NativeStripeSdk.collectBankAccountToken(clientSecret);\n\n if (error) {\n return {\n error,\n };\n }\n return {\n session: session!,\n token: token!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\n/**\n * Use collectFinancialConnectionsAccounts in the [Collect an account to build data-powered products](https://stripe.com/docs/financial-connections/other-data-powered-products) flow.\n * When called, it will load the Authentication Flow, an on-page modal UI which allows your user to securely link their external financial account.\n * @param {string} clientSecret The client_secret of the [Financial Connections Session](https://stripe.com/docs/api/financial_connections/session).\n * @returns A promise that resolves to an object containing either a `session` field, or an error field.\n */\nexport const collectFinancialConnectionsAccounts = async (\n clientSecret: string\n): Promise<FinancialConnections.SessionResult> => {\n try {\n const { session, error } =\n await NativeStripeSdk.collectFinancialConnectionsAccounts(clientSecret);\n\n if (error) {\n return {\n error,\n };\n }\n return {\n session: session!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\n/**\n * Check if the app & device support adding this card to the native wallet.\n * @param params An object containing fields for `primaryAccountIdentifier`, `cardLastFour`, and `testEnv`.\n *\n * @returns A promise resolving to an object of type CanAddCardToWalletResult. Check the `canAddCard` field, if it's true, you should show the `<AddToWalletButton />`\n */\nexport const canAddCardToWallet = async (\n params: CanAddCardToWalletParams\n): Promise<CanAddCardToWalletResult> => {\n try {\n const { canAddCard, details, error } =\n await NativeStripeSdk.canAddCardToWallet(params);\n\n if (error) {\n return {\n error,\n };\n }\n return {\n canAddCard: canAddCard as boolean,\n details: details,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\n/** @deprecated Please use `canAddCardToWallet` instead. */\nexport const isCardInWallet = async (params: {\n cardLastFour: string;\n}): Promise<IsCardInWalletResult> => {\n try {\n const { isInWallet, token, error } = await NativeStripeSdk.isCardInWallet(\n params\n );\n\n if (error) {\n return {\n error,\n };\n }\n return {\n isInWallet: isInWallet as boolean,\n token: token,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const Constants = NativeStripeSdk.getConstants();\n\n/**\n * Check if the relevant native wallet (Apple Pay on iOS, Google Pay on Android) is supported.\n * @returns A boolean indicating whether or not the native wallet is supported.\n */\nexport const isPlatformPaySupported = async (params?: {\n googlePay?: PlatformPay.IsGooglePaySupportedParams;\n}): Promise<boolean> => {\n return await NativeStripeSdk.isPlatformPaySupported(params ?? {});\n};\n\n/**\n * Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to confirm a Stripe [SetupIntent](https://stripe.com/docs/api/setup_intents).\n * @param clientSecret The client secret of the SetupIntent.\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with both `setupIntent` and `paymentMethod` fields.\n */\nexport const confirmPlatformPaySetupIntent = async (\n clientSecret: string,\n params: PlatformPay.ConfirmParams\n): Promise<PlatformPay.ConfirmSetupIntentResult> => {\n try {\n const { error, setupIntent } = (await NativeStripeSdk.confirmPlatformPay(\n clientSecret,\n params,\n false\n )) as PlatformPay.ConfirmSetupIntentResult;\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to confirm a Stripe [PaymentIntent](https://stripe.com/docs/api/payment_intents).\n * @param clientSecret The client secret of the PaymentIntent.\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with both `paymentIntent` and `paymentMethod` fields.\n */\nexport const confirmPlatformPayPayment = async (\n clientSecret: string,\n params: PlatformPay.ConfirmParams\n): Promise<PlatformPay.ConfirmPaymentResult> => {\n try {\n const { error, paymentIntent } = (await NativeStripeSdk.confirmPlatformPay(\n clientSecret,\n params,\n true\n )) as PlatformPay.ConfirmPaymentResult;\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * iOS only, this will always return false on Android. Dismisses the Apple Pay sheet if it is open.\n * @returns A boolean indicating whether or not the sheet was successfully closed. Will return false if the Apple Pay sheet was not open.\n */\nexport const dismissPlatformPay = async (): Promise<boolean> => {\n if (Platform.OS !== 'ios') {\n return false;\n }\n try {\n const didDismiss = await NativeStripeSdk.dismissPlatformPay();\n return didDismiss;\n } catch (error: any) {\n return false;\n }\n};\n\n/**\n * Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to create a Stripe [PaymentMethod](https://stripe.com/docs/api/payment_methods).\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with a `paymentMethod` field.\n */\nexport const createPlatformPayPaymentMethod = async (\n params: PlatformPay.PaymentMethodParams\n): Promise<PlatformPay.PaymentMethodResult> => {\n try {\n const { error, paymentMethod } =\n (await NativeStripeSdk.createPlatformPayPaymentMethod(\n params,\n false\n )) as PlatformPay.PaymentMethodResult;\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentMethod: paymentMethod!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * @deprecated The Tokens API is deprecated, you should use Payment Methods and `createPlatformPayPaymentMethod` instead. Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to create a Stripe [token](https://stripe.com/docs/api/tokens).\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with a `token` field.\n */\nexport const createPlatformPayToken = async (\n params: PlatformPay.PaymentMethodParams\n): Promise<PlatformPay.TokenResult> => {\n try {\n const { error, token } =\n (await NativeStripeSdk.createPlatformPayPaymentMethod(\n params,\n true\n )) as PlatformPay.TokenResult;\n if (error) {\n return {\n error,\n };\n }\n return {\n token: token!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * iOS only. Update different items on the Apple Pay sheet, including the summary items, the shipping methods, and any errors shown. iOS only, this is a no-op on Android.\n * @param params an object describing the Apple Pay configuration, with the following fields:\n * - cartItems An array of payment summary items to display in the Apple Pay sheet.\n * - shippingMethods An array of shipping methods to display in the Apple Pay sheet.\n * - errors An array of errors associated with the user's input that must be corrected to proceed with payment. These errors will be shown in the Apple Pay sheet.\n *\n * @returns An object with an optional 'error' field, which is only populated if something went wrong.\n */\nexport const updatePlatformPaySheet = async (params: {\n applePay: {\n cartItems: Array<PlatformPay.CartSummaryItem>;\n shippingMethods: Array<PlatformPay.ShippingMethod>;\n errors: Array<PlatformPay.ApplePaySheetError>;\n };\n}): Promise<{\n error?: StripeError<PlatformPayError>;\n}> => {\n if (Platform.OS !== 'ios') {\n return {};\n }\n\n try {\n await NativeStripeSdk.updatePlatformPaySheet(\n params.applePay.cartItems,\n params.applePay.shippingMethods,\n params.applePay.errors\n );\n\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * iOS only, this is a no-op on Android. Use this method to move users to the interface for adding credit cards.\n * This method transfers control to the Wallet app on iPhone or to the Settings\n * app on iPad. For devices that don’t support Apple Pay, this method does nothing.\n */\nexport const openPlatformPaySetup = async (): Promise<void> => {\n if (Platform.OS === 'ios') {\n await NativeStripeSdk.openApplePaySetup();\n }\n};\n"],"mappings":"qqCAAA,kCACA,sCACA,0EAgCA,yCAOO,GAAMA,oBAAmB,oDAAG,UACjCC,MAAkC,CAEK,IADvCC,QAAoC,2DAAG,CAAC,CAAC,CAEzC,GAAI,CACF,+BAAuCC,yBAAe,CAACH,mBAAmB,CACxEC,MAAM,CACNC,OAAO,CACR,CAHOE,aAAa,uBAAbA,aAAa,CAAEC,KAAK,uBAALA,KAAK,CAI5B,GAAIA,KAAK,CAAE,CACT,MAAO,CACLA,KAAK,CAALA,KACF,CAAC,CACH,CACA,MAAO,CACLD,aAAa,CAAEA,aACjB,CAAC,CACH,CAAE,MAAOC,KAAU,CAAE,CACnB,MAAO,CACLA,KAAK,CAALA,KACF,CAAC,CACH,CACF,CAAC,iBAtBYL,oBAAmB,4CAsB/B,CAAC,gDAEK,GAAMM,YAAW,qDAAG,UACzBL,MAA0B,CACK,qBAC/B,GACEA,MAAM,CAACM,IAAI,GAAK,aAAa,EAC7B,kBAAAN,MAAM,CAACO,OAAO,eAAd,gBAAgBC,W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,UAAO/E,MAM5C,CAEK,CACJ,GAAIqB,qBAAQ,CAACC,EAAE,GAAK,KAAK,CAAE,CACzB,MAAO,CAAC,CAAC,CACX,CAEA,GAAI,CACF,KAAMpB,yBAAe,CAAC6E,sBAAsB,CAC1C/E,MAAM,CAACmD,QAAQ,CAAC6B,SAAS,CACzBhF,MAAM,CAACmD,QAAQ,CAAC8B,eAAe,CAC/BjF,MAAM,CAACmD,QAAQ,CAAC+B,MAAM,CACvB,CAED,MAAO,CAAC,CAAC,CACX,CAAE,MAAO9E,KAAU,CAAE,CACnB,MAAO,CACLA,KAAK,CAALA,KACF,CAAC,CACH,CACF,CAAC,iBA1BY2E,uBAAsB,gDA0BlC,CAAC,sDAOK,GAAMI,qBAAoB,sDAAG,WAA2B,CAC7D,GAAI9D,qBAAQ,CAACC,EAAE,GAAK,KAAK,CAAE,CACzB,KAAMpB,yBAAe,CAACkF,iBAAiB,EAAE,CAC3C,CACF,CAAC,iBAJYD,qBAAoB,4CAIhC,CAAC"}
|
|
1
|
+
{"version":3,"names":["createPaymentMethod","params","options","NativeStripeSdk","paymentMethod","error","createToken","type","country","toLowerCase","routingNumber","MissingRoutingNumber","token","retrievePaymentIntent","clientSecret","paymentIntent","retrieveSetupIntent","setupIntent","confirmPayment","paymentIntentClientSecret","handleNextAction","returnURL","Platform","OS","createError","handleNextActionForSetup","setupIntentClientSecret","confirmSetupIntent","createTokenForCVCUpdate","cvc","tokenId","handleURLCallback","url","stripeHandled","verifyMicrodepositsForPayment","verifyMicrodeposits","verifyMicrodepositsForSetup","eventEmitter","NativeEventEmitter","NativeModules","StripeSdk","confirmHandlerCallback","orderTrackingCallbackListener","initPaymentSheet","result","confirmHandler","intentConfiguration","remove","addListener","shouldSavePaymentMethod","intentCreationCallback","orderTrackingCallback","applePay","setOrderTracking","configureOrderTracking","console","warn","paymentOption","presentPaymentSheet","confirmPaymentSheetPayment","resetPaymentSheetCustomer","collectBankAccountForPayment","collectBankAccount","collectBankAccountForSetup","collectBankAccountToken","session","collectFinancialConnectionsAccounts","canAddCardToWallet","canAddCard","details","isCardInWallet","isInWallet","Constants","getConstants","isPlatformPaySupported","confirmPlatformPaySetupIntent","confirmPlatformPay","confirmPlatformPayPayment","dismissPlatformPay","didDismiss","createPlatformPayPaymentMethod","createPlatformPayToken","updatePlatformPaySheet","cartItems","shippingMethods","errors","openPlatformPaySetup","openApplePaySetup"],"sources":["functions.ts"],"sourcesContent":["import { createError } from './helpers';\nimport { MissingRoutingNumber } from './types/Errors';\nimport NativeStripeSdk from './NativeStripeSdk';\nimport type {\n PlatformPayError,\n ConfirmPaymentResult,\n ConfirmPaymentSheetPaymentResult,\n SetupIntent,\n PaymentIntent,\n ConfirmSetupIntentResult,\n CreatePaymentMethodResult,\n CreateTokenForCVCUpdateResult,\n CreateTokenResult,\n HandleNextActionResult,\n HandleNextActionForSetupResult,\n InitPaymentSheetResult,\n PaymentMethod,\n PaymentSheet,\n PresentPaymentSheetResult,\n RetrievePaymentIntentResult,\n RetrieveSetupIntentResult,\n StripeError,\n Token,\n VerifyMicrodepositsParams,\n VerifyMicrodepositsForPaymentResult,\n VerifyMicrodepositsForSetupResult,\n CollectBankAccountForPaymentResult,\n CollectBankAccountForSetupResult,\n IsCardInWalletResult,\n CanAddCardToWalletParams,\n CanAddCardToWalletResult,\n FinancialConnections,\n PlatformPay,\n} from './types';\nimport {\n Platform,\n NativeEventEmitter,\n NativeModules,\n EmitterSubscription,\n} from 'react-native';\n\nexport const createPaymentMethod = async (\n params: PaymentMethod.CreateParams,\n options: PaymentMethod.CreateOptions = {}\n): Promise<CreatePaymentMethodResult> => {\n try {\n const { paymentMethod, error } = await NativeStripeSdk.createPaymentMethod(\n params,\n options\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentMethod: paymentMethod!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const createToken = async (\n params: Token.CreateParams\n): Promise<CreateTokenResult> => {\n if (\n params.type === 'BankAccount' &&\n params.country?.toLowerCase() === 'us' &&\n !params.routingNumber\n ) {\n return {\n error: MissingRoutingNumber,\n };\n }\n\n try {\n const { token, error } = await NativeStripeSdk.createToken(params);\n\n if (error) {\n return {\n error,\n };\n }\n return {\n token: token!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const retrievePaymentIntent = async (\n clientSecret: string\n): Promise<RetrievePaymentIntentResult> => {\n try {\n const { paymentIntent, error } =\n await NativeStripeSdk.retrievePaymentIntent(clientSecret);\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const retrieveSetupIntent = async (\n clientSecret: string\n): Promise<RetrieveSetupIntentResult> => {\n try {\n const { setupIntent, error } = await NativeStripeSdk.retrieveSetupIntent(\n clientSecret\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * Confirm and, if necessary, authenticate a PaymentIntent.\n *\n * @param {string} paymentIntentClientSecret The client_secret of the associated [PaymentIntent](https://stripe.com/docs/api/payment_intents).\n * @param {object=} params An optional object that contains data related to the payment method used to confirm this payment. If no object is provided (undefined), then it is assumed that the payment method has already been [attached to the Payment Intent](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method).\n * @param {object=} options An optional object that contains options for this payment method.\n * @returns A promise that resolves to an object containing either a `paymentIntent` field, or an `error` field.\n */\nexport const confirmPayment = async (\n paymentIntentClientSecret: string,\n params?: PaymentIntent.ConfirmParams,\n options: PaymentIntent.ConfirmOptions = {}\n): Promise<ConfirmPaymentResult> => {\n try {\n const { paymentIntent, error } = await NativeStripeSdk.confirmPayment(\n paymentIntentClientSecret,\n params,\n options\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/** Handles any nextAction required to authenticate the PaymentIntent.\n * Call this method if you are using manual confirmation. See https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=custom\n *\n * @param {string} paymentIntentClientSecret The client secret associated with the PaymentIntent.\n * @param {string=} returnURL An optional return URL so the Stripe SDK can redirect back to your app after authentication. This should match the `return_url` you specified during PaymentIntent confirmation.\n * */\nexport const handleNextAction = async (\n paymentIntentClientSecret: string,\n returnURL?: string\n): Promise<HandleNextActionResult> => {\n try {\n const { paymentIntent, error } =\n Platform.OS === 'ios'\n ? await NativeStripeSdk.handleNextAction(\n paymentIntentClientSecret,\n returnURL ?? null\n )\n : await NativeStripeSdk.handleNextAction(paymentIntentClientSecret);\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\n/** Handles any nextAction required to authenticate the SetupIntent.\n * Call this method if you are confirming the SetupIntent on your backend and get a status of requires_action.\n *\n * @param {string} setupIntentClientSecret The client secret associated with the SetupIntent.\n * @param {string=} returnURL An optional return URL so the Stripe SDK can redirect back to your app after authentication. This should match the `return_url` you specified during PaymentIntent confirmation.\n * */\nexport const handleNextActionForSetup = async (\n setupIntentClientSecret: string,\n returnURL?: string\n): Promise<HandleNextActionForSetupResult> => {\n try {\n const { setupIntent, error } =\n Platform.OS === 'ios'\n ? await NativeStripeSdk.handleNextActionForSetup(\n setupIntentClientSecret,\n returnURL ?? null\n )\n : await NativeStripeSdk.handleNextActionForSetup(\n setupIntentClientSecret\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const confirmSetupIntent = async (\n paymentIntentClientSecret: string,\n params: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions = {}\n): Promise<ConfirmSetupIntentResult> => {\n try {\n const { setupIntent, error } = await NativeStripeSdk.confirmSetupIntent(\n paymentIntentClientSecret,\n params,\n options\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const createTokenForCVCUpdate = async (\n cvc: string\n): Promise<CreateTokenForCVCUpdateResult> => {\n try {\n const { tokenId, error } = await NativeStripeSdk.createTokenForCVCUpdate(\n cvc\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n tokenId: tokenId!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * Call this method in your app whenever you receive a URL for a Stripe callback.\n * For convenience, you can pass all URLs you receive to this method first, and\n * check the return value to easily determine whether it is a callback URL that Stripe will handle\n * or if your app should process it normally. This is iOS-only, and will always return false on Android.\n */\nexport const handleURLCallback = async (url: string): Promise<boolean> => {\n const stripeHandled =\n Platform.OS === 'ios'\n ? await NativeStripeSdk.handleURLCallback(url)\n : false;\n return stripeHandled;\n};\n\nexport const verifyMicrodepositsForPayment = async (\n clientSecret: string,\n params: VerifyMicrodepositsParams\n): Promise<VerifyMicrodepositsForPaymentResult> => {\n try {\n const { paymentIntent, error } = (await NativeStripeSdk.verifyMicrodeposits(\n true,\n clientSecret,\n params\n )) as VerifyMicrodepositsForPaymentResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const verifyMicrodepositsForSetup = async (\n clientSecret: string,\n params: VerifyMicrodepositsParams\n): Promise<VerifyMicrodepositsForSetupResult> => {\n try {\n const { setupIntent, error } = (await NativeStripeSdk.verifyMicrodeposits(\n false,\n clientSecret,\n params\n )) as VerifyMicrodepositsForSetupResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nconst eventEmitter = new NativeEventEmitter(NativeModules.StripeSdk);\nlet confirmHandlerCallback: EmitterSubscription | null = null;\nlet orderTrackingCallbackListener: EmitterSubscription | null = null;\n\nexport const initPaymentSheet = async (\n params: PaymentSheet.SetupParams\n): Promise<InitPaymentSheetResult> => {\n let result;\n const confirmHandler = params?.intentConfiguration?.confirmHandler;\n if (confirmHandler) {\n confirmHandlerCallback?.remove();\n confirmHandlerCallback = eventEmitter.addListener(\n 'onConfirmHandlerCallback',\n ({\n paymentMethod,\n shouldSavePaymentMethod,\n }: {\n paymentMethod: PaymentMethod.Result;\n shouldSavePaymentMethod: boolean;\n }) => {\n confirmHandler(\n paymentMethod,\n shouldSavePaymentMethod,\n NativeStripeSdk.intentCreationCallback\n );\n }\n );\n }\n\n const orderTrackingCallback = params?.applePay?.setOrderTracking;\n if (orderTrackingCallback) {\n orderTrackingCallbackListener?.remove();\n orderTrackingCallbackListener = eventEmitter.addListener(\n 'onOrderTrackingCallback',\n () => {\n orderTrackingCallback(NativeStripeSdk.configureOrderTracking);\n }\n );\n }\n\n try {\n if (Platform.OS === 'ios' && !params.returnURL) {\n console.warn(\n `[@stripe/stripe-react-native] You have not provided the 'returnURL' field to 'initPaymentSheet', so payment methods that require redirects will not be shown in your iOS Payment Sheet. Visit https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=payment-sheet#react-native-set-up-return-url to learn more.`\n );\n }\n result = await NativeStripeSdk.initPaymentSheet(params);\n\n if (result.error) {\n return {\n error: result.error,\n };\n }\n return {\n paymentOption: result.paymentOption,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const presentPaymentSheet = async (\n options: PaymentSheet.PresentOptions = {}\n): Promise<PresentPaymentSheetResult> => {\n try {\n const { paymentOption, error } = await NativeStripeSdk.presentPaymentSheet(\n options\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentOption: paymentOption!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const confirmPaymentSheetPayment =\n async (): Promise<ConfirmPaymentSheetPaymentResult> => {\n try {\n const { error } = await NativeStripeSdk.confirmPaymentSheetPayment();\n if (error) {\n return {\n error,\n };\n }\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n };\n\n/**\n * You must call this method when the user logs out from your app. This will ensure that\n * any persisted authentication state in the PaymentSheet, such as authentication cookies,\n * is also cleared during logout.\n */\nexport const resetPaymentSheetCustomer = async (): Promise<null> => {\n return await NativeStripeSdk.resetPaymentSheetCustomer();\n};\n\nexport const collectBankAccountForPayment = async (\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n): Promise<CollectBankAccountForPaymentResult> => {\n try {\n const { paymentIntent, error } = (await NativeStripeSdk.collectBankAccount(\n true,\n clientSecret,\n params\n )) as CollectBankAccountForPaymentResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const collectBankAccountForSetup = async (\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n): Promise<CollectBankAccountForSetupResult> => {\n try {\n const { setupIntent, error } = (await NativeStripeSdk.collectBankAccount(\n false,\n clientSecret,\n params\n )) as CollectBankAccountForSetupResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\n/**\n * Use collectBankAccountToken in the [Add a Financial Connections Account to a US Custom Connect](https://stripe.com/docs/financial-connections/connect-payouts) account flow.\n * When called, it will load the Authentication Flow, an on-page modal UI which allows your user to securely link their external financial account for payouts.\n * @param {string} clientSecret The client_secret of the [Financial Connections Session](https://stripe.com/docs/api/financial_connections/session).\n * @returns A promise that resolves to an object containing either `session` and `token` fields, or an error field.\n */\nexport const collectBankAccountToken = async (\n clientSecret: string\n): Promise<FinancialConnections.TokenResult> => {\n try {\n const { session, token, error } =\n await NativeStripeSdk.collectBankAccountToken(clientSecret);\n\n if (error) {\n return {\n error,\n };\n }\n return {\n session: session!,\n token: token!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\n/**\n * Use collectFinancialConnectionsAccounts in the [Collect an account to build data-powered products](https://stripe.com/docs/financial-connections/other-data-powered-products) flow.\n * When called, it will load the Authentication Flow, an on-page modal UI which allows your user to securely link their external financial account.\n * @param {string} clientSecret The client_secret of the [Financial Connections Session](https://stripe.com/docs/api/financial_connections/session).\n * @returns A promise that resolves to an object containing either a `session` field, or an error field.\n */\nexport const collectFinancialConnectionsAccounts = async (\n clientSecret: string\n): Promise<FinancialConnections.SessionResult> => {\n try {\n const { session, error } =\n await NativeStripeSdk.collectFinancialConnectionsAccounts(clientSecret);\n\n if (error) {\n return {\n error,\n };\n }\n return {\n session: session!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\n/**\n * Check if the app & device support adding this card to the native wallet.\n * @param params An object containing fields for `primaryAccountIdentifier`, `cardLastFour`, and `testEnv`.\n *\n * @returns A promise resolving to an object of type CanAddCardToWalletResult. Check the `canAddCard` field, if it's true, you should show the `<AddToWalletButton />`\n */\nexport const canAddCardToWallet = async (\n params: CanAddCardToWalletParams\n): Promise<CanAddCardToWalletResult> => {\n try {\n const { canAddCard, details, error } =\n await NativeStripeSdk.canAddCardToWallet(params);\n\n if (error) {\n return {\n error,\n };\n }\n return {\n canAddCard: canAddCard as boolean,\n details: details,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\n/** @deprecated Please use `canAddCardToWallet` instead. */\nexport const isCardInWallet = async (params: {\n cardLastFour: string;\n}): Promise<IsCardInWalletResult> => {\n try {\n const { isInWallet, token, error } = await NativeStripeSdk.isCardInWallet(\n params\n );\n\n if (error) {\n return {\n error,\n };\n }\n return {\n isInWallet: isInWallet as boolean,\n token: token,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const Constants = NativeStripeSdk.getConstants();\n\n/**\n * Check if the relevant native wallet (Apple Pay on iOS, Google Pay on Android) is supported.\n * @returns A boolean indicating whether or not the native wallet is supported.\n */\nexport const isPlatformPaySupported = async (params?: {\n googlePay?: PlatformPay.IsGooglePaySupportedParams;\n}): Promise<boolean> => {\n return await NativeStripeSdk.isPlatformPaySupported(params ?? {});\n};\n\n/**\n * Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to confirm a Stripe [SetupIntent](https://stripe.com/docs/api/setup_intents).\n * @param clientSecret The client secret of the SetupIntent.\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with both `setupIntent` and `paymentMethod` fields.\n */\nexport const confirmPlatformPaySetupIntent = async (\n clientSecret: string,\n params: PlatformPay.ConfirmParams\n): Promise<PlatformPay.ConfirmSetupIntentResult> => {\n try {\n const { error, setupIntent } = (await NativeStripeSdk.confirmPlatformPay(\n clientSecret,\n params,\n false\n )) as PlatformPay.ConfirmSetupIntentResult;\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to confirm a Stripe [PaymentIntent](https://stripe.com/docs/api/payment_intents).\n * @param clientSecret The client secret of the PaymentIntent.\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with both `paymentIntent` and `paymentMethod` fields.\n */\nexport const confirmPlatformPayPayment = async (\n clientSecret: string,\n params: PlatformPay.ConfirmParams\n): Promise<PlatformPay.ConfirmPaymentResult> => {\n try {\n const { error, paymentIntent } = (await NativeStripeSdk.confirmPlatformPay(\n clientSecret,\n params,\n true\n )) as PlatformPay.ConfirmPaymentResult;\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * iOS only, this will always return false on Android. Dismisses the Apple Pay sheet if it is open.\n * @returns A boolean indicating whether or not the sheet was successfully closed. Will return false if the Apple Pay sheet was not open.\n */\nexport const dismissPlatformPay = async (): Promise<boolean> => {\n if (Platform.OS !== 'ios') {\n return false;\n }\n try {\n const didDismiss = await NativeStripeSdk.dismissPlatformPay();\n return didDismiss;\n } catch (error: any) {\n return false;\n }\n};\n\n/**\n * Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to create a Stripe [PaymentMethod](https://stripe.com/docs/api/payment_methods).\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with a `paymentMethod` field.\n */\nexport const createPlatformPayPaymentMethod = async (\n params: PlatformPay.PaymentMethodParams\n): Promise<PlatformPay.PaymentMethodResult> => {\n try {\n const { error, paymentMethod } =\n (await NativeStripeSdk.createPlatformPayPaymentMethod(\n params,\n false\n )) as PlatformPay.PaymentMethodResult;\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentMethod: paymentMethod!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * @deprecated The Tokens API is deprecated, you should use Payment Methods and `createPlatformPayPaymentMethod` instead. Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to create a Stripe [token](https://stripe.com/docs/api/tokens).\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with a `token` field.\n */\nexport const createPlatformPayToken = async (\n params: PlatformPay.PaymentMethodParams\n): Promise<PlatformPay.TokenResult> => {\n try {\n const { error, token } =\n (await NativeStripeSdk.createPlatformPayPaymentMethod(\n params,\n true\n )) as PlatformPay.TokenResult;\n if (error) {\n return {\n error,\n };\n }\n return {\n token: token!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * iOS only. Update different items on the Apple Pay sheet, including the summary items, the shipping methods, and any errors shown. iOS only, this is a no-op on Android.\n * @param params an object describing the Apple Pay configuration, with the following fields:\n * - cartItems An array of payment summary items to display in the Apple Pay sheet.\n * - shippingMethods An array of shipping methods to display in the Apple Pay sheet.\n * - errors An array of errors associated with the user's input that must be corrected to proceed with payment. These errors will be shown in the Apple Pay sheet.\n *\n * @returns An object with an optional 'error' field, which is only populated if something went wrong.\n */\nexport const updatePlatformPaySheet = async (params: {\n applePay: {\n cartItems: Array<PlatformPay.CartSummaryItem>;\n shippingMethods: Array<PlatformPay.ShippingMethod>;\n errors: Array<PlatformPay.ApplePaySheetError>;\n };\n}): Promise<{\n error?: StripeError<PlatformPayError>;\n}> => {\n if (Platform.OS !== 'ios') {\n return {};\n }\n\n try {\n await NativeStripeSdk.updatePlatformPaySheet(\n params.applePay.cartItems,\n params.applePay.shippingMethods,\n params.applePay.errors\n );\n\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * iOS only, this is a no-op on Android. Use this method to move users to the interface for adding credit cards.\n * This method transfers control to the Wallet app on iPhone or to the Settings\n * app on iPad. For devices that don’t support Apple Pay, this method does nothing.\n */\nexport const openPlatformPaySetup = async (): Promise<void> => {\n if (Platform.OS === 'ios') {\n await NativeStripeSdk.openApplePaySetup();\n }\n};\n"],"mappings":"qqCAAA,kCACA,sCACA,0EAgCA,yCAOO,GAAMA,oBAAmB,oDAAG,UACjCC,MAAkC,CAEK,IADvCC,QAAoC,2DAAG,CAAC,CAAC,CAEzC,GAAI,CACF,+BAAuCC,yBAAe,CAACH,mBAAmB,CACxEC,MAAM,CACNC,OAAO,CACR,CAHOE,aAAa,uBAAbA,aAAa,CAAEC,KAAK,uBAALA,KAAK,CAI5B,GAAIA,KAAK,CAAE,CACT,MAAO,CACLA,KAAK,CAALA,KACF,CAAC,CACH,CACA,MAAO,CACLD,aAAa,CAAEA,aACjB,CAAC,CACH,CAAE,MAAOC,KAAU,CAAE,CACnB,MAAO,CACLA,KAAK,CAALA,KACF,CAAC,CACH,CACF,CAAC,iBAtBYL,oBAAmB,4CAsB/B,CAAC,gDAEK,GAAMM,YAAW,qDAAG,UACzBL,MAA0B,CACK,qBAC/B,GACEA,MAAM,CAACM,IAAI,GAAK,aAAa,EAC7B,kBAAAN,MAAM,CAACO,OAAO,eAAd,gBAAgBC,WAAW,EAAE,IAAK,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CACLA,KAAK,CAALA,KACF,CAAC,CACH,CACF,CAAC,iBAtBY4E,uBAAsB,gDAsBlC,CAAC,sDAWK,GAAMC,uBAAsB,sDAAG,UAAOjF,MAM5C,CAEK,CACJ,GAAIqB,qBAAQ,CAACC,EAAE,GAAK,KAAK,CAAE,CACzB,MAAO,CAAC,CAAC,CACX,CAEA,GAAI,CACF,KAAMpB,yBAAe,CAAC+E,sBAAsB,CAC1CjF,MAAM,CAACmD,QAAQ,CAAC+B,SAAS,CACzBlF,MAAM,CAACmD,QAAQ,CAACgC,eAAe,CAC/BnF,MAAM,CAACmD,QAAQ,CAACiC,MAAM,CACvB,CAED,MAAO,CAAC,CAAC,CACX,CAAE,MAAOhF,KAAU,CAAE,CACnB,MAAO,CACLA,KAAK,CAALA,KACF,CAAC,CACH,CACF,CAAC,iBA1BY6E,uBAAsB,gDA0BlC,CAAC,sDAOK,GAAMI,qBAAoB,sDAAG,WAA2B,CAC7D,GAAIhE,qBAAQ,CAACC,EAAE,GAAK,KAAK,CAAE,CACzB,KAAMpB,yBAAe,CAACoF,iBAAiB,EAAE,CAC3C,CACF,CAAC,iBAJYD,qBAAoB,4CAIhC,CAAC"}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={useConfirmPayment:true,useConfirmSetupIntent:true,useStripe:true,usePlatformPay:true,usePaymentSheet:true,useFinancialConnectionsSheet:true,initStripe:true,StripeProvider:true,CardField:true,CardForm:true,AuBECSDebitForm:true,StripeContainer:true,AddToWalletButton:true,AddressSheet:true,PlatformPayButton:true};Object.defineProperty(exports,"AddToWalletButton",{enumerable:true,get:function get(){return _AddToWalletButton.AddToWalletButton;}});Object.defineProperty(exports,"AddressSheet",{enumerable:true,get:function get(){return _AddressSheet.AddressSheet;}});Object.defineProperty(exports,"AuBECSDebitForm",{enumerable:true,get:function get(){return _AuBECSDebitForm.AuBECSDebitForm;}});Object.defineProperty(exports,"CardField",{enumerable:true,get:function get(){return _CardField.CardField;}});Object.defineProperty(exports,"CardForm",{enumerable:true,get:function get(){return _CardForm.CardForm;}});Object.defineProperty(exports,"PlatformPayButton",{enumerable:true,get:function get(){return _PlatformPayButton.PlatformPayButton;}});Object.defineProperty(exports,"StripeContainer",{enumerable:true,get:function get(){return _StripeContainer.StripeContainer;}});Object.defineProperty(exports,"StripeProvider",{enumerable:true,get:function get(){return _StripeProvider.StripeProvider;}});Object.defineProperty(exports,"initStripe",{enumerable:true,get:function get(){return _StripeProvider.initStripe;}});Object.defineProperty(exports,"useConfirmPayment",{enumerable:true,get:function get(){return _useConfirmPayment.useConfirmPayment;}});Object.defineProperty(exports,"useConfirmSetupIntent",{enumerable:true,get:function get(){return _useConfirmSetupIntent.useConfirmSetupIntent;}});Object.defineProperty(exports,"useFinancialConnectionsSheet",{enumerable:true,get:function get(){return _useFinancialConnectionsSheet.useFinancialConnectionsSheet;}});Object.defineProperty(exports,"usePaymentSheet",{enumerable:true,get:function get(){return _usePaymentSheet.usePaymentSheet;}});Object.defineProperty(exports,"usePlatformPay",{enumerable:true,get:function get(){return _usePlatformPay.usePlatformPay;}});Object.defineProperty(exports,"useStripe",{enumerable:true,get:function get(){return _useStripe.useStripe;}});var _useConfirmPayment=require("./hooks/useConfirmPayment");var _useConfirmSetupIntent=require("./hooks/useConfirmSetupIntent");var _useStripe=require("./hooks/useStripe");var _usePlatformPay=require("./hooks/usePlatformPay");var _usePaymentSheet=require("./hooks/usePaymentSheet");var _useFinancialConnectionsSheet=require("./hooks/useFinancialConnectionsSheet");var _StripeProvider=require("./components/StripeProvider");var _CardField=require("./components/CardField");var _CardForm=require("./components/CardForm");var _AuBECSDebitForm=require("./components/AuBECSDebitForm");var _StripeContainer=require("./components/StripeContainer");var _AddToWalletButton=require("./components/AddToWalletButton");var _AddressSheet=require("./components/AddressSheet");var _PlatformPayButton=require("./components/PlatformPayButton");var _functions=require("./functions");Object.keys(_functions).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_functions[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _functions[key];}});});var _index=require("./types/index");Object.keys(_index).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_index[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _index[key];}});});
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={useConfirmPayment:true,useConfirmSetupIntent:true,useStripe:true,usePlatformPay:true,usePaymentSheet:true,useFinancialConnectionsSheet:true,initStripe:true,StripeProvider:true,CardField:true,CardForm:true,AuBECSDebitForm:true,StripeContainer:true,AddToWalletButton:true,AddressSheet:true,PlatformPayButton:true};Object.defineProperty(exports,"AddToWalletButton",{enumerable:true,get:function get(){return _AddToWalletButton.AddToWalletButton;}});Object.defineProperty(exports,"AddressSheet",{enumerable:true,get:function get(){return _AddressSheet.AddressSheet;}});Object.defineProperty(exports,"AuBECSDebitForm",{enumerable:true,get:function get(){return _AuBECSDebitForm.AuBECSDebitForm;}});Object.defineProperty(exports,"CardField",{enumerable:true,get:function get(){return _CardField.CardField;}});Object.defineProperty(exports,"CardForm",{enumerable:true,get:function get(){return _CardForm.CardForm;}});Object.defineProperty(exports,"PlatformPayButton",{enumerable:true,get:function get(){return _PlatformPayButton.PlatformPayButton;}});Object.defineProperty(exports,"StripeContainer",{enumerable:true,get:function get(){return _StripeContainer.StripeContainer;}});Object.defineProperty(exports,"StripeProvider",{enumerable:true,get:function get(){return _StripeProvider.StripeProvider;}});Object.defineProperty(exports,"initStripe",{enumerable:true,get:function get(){return _StripeProvider.initStripe;}});Object.defineProperty(exports,"useConfirmPayment",{enumerable:true,get:function get(){return _useConfirmPayment.useConfirmPayment;}});Object.defineProperty(exports,"useConfirmSetupIntent",{enumerable:true,get:function get(){return _useConfirmSetupIntent.useConfirmSetupIntent;}});Object.defineProperty(exports,"useFinancialConnectionsSheet",{enumerable:true,get:function get(){return _useFinancialConnectionsSheet.useFinancialConnectionsSheet;}});Object.defineProperty(exports,"usePaymentSheet",{enumerable:true,get:function get(){return _usePaymentSheet.usePaymentSheet;}});Object.defineProperty(exports,"usePlatformPay",{enumerable:true,get:function get(){return _usePlatformPay.usePlatformPay;}});Object.defineProperty(exports,"useStripe",{enumerable:true,get:function get(){return _useStripe.useStripe;}});var _useConfirmPayment=require("./hooks/useConfirmPayment");var _useConfirmSetupIntent=require("./hooks/useConfirmSetupIntent");var _useStripe=require("./hooks/useStripe");var _usePlatformPay=require("./hooks/usePlatformPay");var _usePaymentSheet=require("./hooks/usePaymentSheet");var _useFinancialConnectionsSheet=require("./hooks/useFinancialConnectionsSheet");var _StripeProvider=require("./components/StripeProvider");var _CardField=require("./components/CardField");var _CardForm=require("./components/CardForm");var _AuBECSDebitForm=require("./components/AuBECSDebitForm");var _StripeContainer=require("./components/StripeContainer");var _AddToWalletButton=require("./components/AddToWalletButton");var _AddressSheet=require("./components/AddressSheet");var _PlatformPayButton=require("./components/PlatformPayButton");var _functions=require("./functions");Object.keys(_functions).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_functions[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _functions[key];}});});var _index=require("./types/index");Object.keys(_index).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_index[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _index[key];}});});var _CustomerSheet=require("./components/CustomerSheet");Object.keys(_CustomerSheet).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_CustomerSheet[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _CustomerSheet[key];}});});
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.tsx"],"sourcesContent":["// hooks\nexport { useConfirmPayment } from './hooks/useConfirmPayment';\nexport { useConfirmSetupIntent } from './hooks/useConfirmSetupIntent';\nexport { useStripe } from './hooks/useStripe';\nexport { usePlatformPay } from './hooks/usePlatformPay';\nexport { usePaymentSheet } from './hooks/usePaymentSheet';\nexport { useFinancialConnectionsSheet } from './hooks/useFinancialConnectionsSheet';\n\n//components\nexport { initStripe, StripeProvider } from './components/StripeProvider';\nexport type { Props as StripeProviderProps } from './components/StripeProvider';\nexport { CardField } from './components/CardField';\nexport type { Props as CardFieldProps } from './components/CardField';\nexport { CardForm } from './components/CardForm';\nexport type { Props as CardFormProps } from './components/CardForm';\nexport { AuBECSDebitForm } from './components/AuBECSDebitForm';\nexport type { Props as AuBECSDebitFormProps } from './components/AuBECSDebitForm';\nexport { StripeContainer } from './components/StripeContainer';\nexport type { Props as StripeContainerProps } from './components/StripeContainer';\nexport { AddToWalletButton } from './components/AddToWalletButton';\nexport type { Props as AddToWalletButtonProps } from './components/AddToWalletButton';\nexport { AddressSheet } from './components/AddressSheet';\nexport type { Props as AddressSheetProps } from './components/AddressSheet';\nexport { PlatformPayButton } from './components/PlatformPayButton';\nexport type { Props as PlatformPayButtonProps } from './components/PlatformPayButton';\n\nexport * from './functions';\n\nexport * from './types/index';\n"],"mappings":"2vEACA,4DACA,oEACA,4CACA,sDACA,wDACA,kFAGA,2DAEA,iDAEA,+CAEA,6DAEA,6DAEA,iEAEA,uDAEA,iEAGA,gWAEA"}
|
|
1
|
+
{"version":3,"names":[],"sources":["index.tsx"],"sourcesContent":["// hooks\nexport { useConfirmPayment } from './hooks/useConfirmPayment';\nexport { useConfirmSetupIntent } from './hooks/useConfirmSetupIntent';\nexport { useStripe } from './hooks/useStripe';\nexport { usePlatformPay } from './hooks/usePlatformPay';\nexport { usePaymentSheet } from './hooks/usePaymentSheet';\nexport { useFinancialConnectionsSheet } from './hooks/useFinancialConnectionsSheet';\n\n//components\nexport { initStripe, StripeProvider } from './components/StripeProvider';\nexport type { Props as StripeProviderProps } from './components/StripeProvider';\nexport { CardField } from './components/CardField';\nexport type { Props as CardFieldProps } from './components/CardField';\nexport { CardForm } from './components/CardForm';\nexport type { Props as CardFormProps } from './components/CardForm';\nexport { AuBECSDebitForm } from './components/AuBECSDebitForm';\nexport type { Props as AuBECSDebitFormProps } from './components/AuBECSDebitForm';\nexport { StripeContainer } from './components/StripeContainer';\nexport type { Props as StripeContainerProps } from './components/StripeContainer';\nexport { AddToWalletButton } from './components/AddToWalletButton';\nexport type { Props as AddToWalletButtonProps } from './components/AddToWalletButton';\nexport { AddressSheet } from './components/AddressSheet';\nexport type { Props as AddressSheetProps } from './components/AddressSheet';\nexport { PlatformPayButton } from './components/PlatformPayButton';\nexport type { Props as PlatformPayButtonProps } from './components/PlatformPayButton';\n\nexport * from './functions';\n\nexport * from './types/index';\n\nexport * from './components/CustomerSheet';\nexport type { Props as CustomerSheetProps } from './components/CustomerSheet';\n"],"mappings":"2vEACA,4DACA,oEACA,4CACA,sDACA,wDACA,kFAGA,2DAEA,iDAEA,+CAEA,6DAEA,6DAEA,iEAEA,uDAEA,iEAGA,gWAEA,kVAEA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["CustomerSheet.ts"],"sourcesContent":["import type {\n PaymentSheet,\n StripeError,\n CustomerSheetError,\n BillingDetails,\n PaymentMethod,\n} from '../types';\n\nexport type CustomerSheetInitParams = {\n /** The color styling to use for PaymentSheet UI. Defaults to 'automatic'. iOS only. */\n style?: 'alwaysLight' | 'alwaysDark' | 'automatic';\n /** Configuration for the look and feel of the UI. */\n appearance?: PaymentSheet.AppearanceParams;\n /** Optional but recommended for cards, required for other payment methods. The SetupIntent client secret that will be used to confirm a new payment method. If this is missing, you will only be able to add cards without authentication steps. */\n setupIntentClientSecret?: string;\n /** The identifier of the Stripe Customer object. See https://stripe.com/docs/api/customers/object#customer_object-id */\n customerId: string;\n /** A short-lived token that allows the SDK to access a Customer's payment methods. */\n customerEphemeralKeySecret: string;\n /** Your customer-facing business name. The default value is the name of your app. */\n merchantDisplayName?: string;\n /** Optional configuration for setting the header text of the Payment Method selection screen */\n headerTextForSelectionScreen?: string;\n /** CustomerSheet pre-populates fields with the values provided. If `billingDetailsCollectionConfiguration.attachDefaultsToPaymentMethod` is `true`, these values will be attached to the payment method even if they are not collected by the CustomerSheet UI. */\n defaultBillingDetails?: BillingDetails;\n /** Describes how billing details should be collected. All values default to `AUTOMATIC`. If `NEVER` is used for a required field for the Payment Method, you must provide an appropriate value as part of `defaultBillingDetails`. */\n billingDetailsCollectionConfiguration?: PaymentSheet.BillingDetailsCollectionConfiguration;\n /** A URL that redirects back to your app that CustomerSheet can use to auto-dismiss web views used for additional authentication, e.g. 3DS2 */\n returnURL?: string;\n /** Optional configuration to display a custom message when a saved payment method is removed. iOS only. */\n removeSavedPaymentMethodMessage?: string;\n /** Whether to show Apple Pay as an option. Defaults to false. */\n applePayEnabled?: boolean;\n /** Whether to show Google Pay as an option. Defaults to false. */\n googlePayEnabled?: boolean;\n /** Optional override. It is generally recommended to rely on the default behavior, but- provide a CustomerAdapter here if\n * you would prefer retrieving and updating your Stripe customer object via your own backend instead.\n * WARNING: When implementing your own CustomerAdapter, ensure your application complies with all applicable laws and regulations, including data privacy and consumer protection.\n */\n customerAdapter?: CustomerAdapter;\n};\n\nexport type CustomerSheetPresentParams = {\n /** Controls how the modal is presented (after animation). iOS only. Defaults to `popover`. */\n presentationStyle?: 'fullscreen' | 'popover';\n /** Controls how the modal animates. iOS only. */\n animationStyle?: 'flip' | 'curl' | 'slide' | 'dissolve';\n /** Time (in milliseconds) before the Customer Sheet will automatically dismiss. */\n timeout?: number;\n};\n\nexport type CustomerSheetResult = {\n /** The users selected payment option, if one exists. */\n paymentOption?: PaymentSheet.PaymentOption;\n /** The Stripe PaymentMethod associated with the paymentOption, if it exists. */\n paymentMethod?: PaymentMethod.Result;\n /** The error that occurred. */\n error?: StripeError<CustomerSheetError>;\n};\n\nexport interface CustomerAdapter {\n /** Retrieves a list of Payment Methods attached to a customer.\n * If you are implementing your own CustomerAdapter:\n * Call the list method ( https://stripe.com/docs/api/payment_methods/list )\n * with the Stripe customer. Return the list of payment methods in JSON format.\n */\n fetchPaymentMethods?(): Promise<Array<object>>;\n /** Adds a Payment Method to a customer.\n * If you are implementing your own CustomerAdapter:\n * On your backend, retrieve the Stripe customer associated with your logged-in user.\n * Then, call the Attach method on the Payment Method with that customer's ID\n * ( https://stripe.com/docs/api/payment_methods/attach ).\n * - Parameters:\n * - paymentMethod: A valid Stripe Payment Method ID\n * Return the payment method in JSON format.\n */\n attachPaymentMethod?(paymentMethodId: string): Promise<object>;\n /** Deletes the given Payment Method from the customer.\n * If you are implementing your own CustomerAdapter:\n * Call the Detach method ( https://stripe.com/docs/api/payment_methods/detach )\n * on the Payment Method.\n * - Parameters:\n * - paymentMethod: The Stripe Payment Method ID to delete from the customer\n * Return the payment method in JSON format.\n */\n detachPaymentMethod?(paymentMethodId: String): Promise<object>;\n /** Set the last selected payment method for the customer.\n * To unset the default payment method, `null` is passed as the `paymentOption`.\n * If you are implementing your own CustomerAdapter:\n * Save a representation of the passed `paymentOption` as the customer's default payment method.\n */\n setSelectedPaymentOption?(\n paymentOption: CustomerPaymentOption | null\n ): Promise<void>;\n /** Retrieve the last selected payment method for the customer.\n * If you are implementing your own CustomerAdapter:\n * Return a CustomerPaymentOption for the customer's default selected payment method.\n * If no default payment method is selected, return null.\n */\n fetchSelectedPaymentOption?(): Promise<CustomerPaymentOption | null>;\n /** Creates a SetupIntent configured to attach a new payment method to a customer,\n * then returns the client secret for the created SetupIntent.\n */\n setupIntentClientSecretForCustomerAttach?(): Promise<String>;\n}\n\nexport type CustomerPaymentOption =\n | 'apple_pay'\n | 'google_pay'\n | 'link'\n | string;\n"],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});exports.VerifyMicrodepositsError=exports.RetrieveSetupIntentError=exports.RetrievePaymentIntentError=exports.PlatformPayError=exports.PaymentSheetError=exports.MissingRoutingNumber=exports.GooglePayError=exports.CreateTokenError=exports.CreatePaymentMethodError=exports.ConfirmSetupIntentError=exports.ConfirmPaymentError=exports.CollectBankAccountError=exports.CardActionError=exports.ApplePayError=exports.AddressSheetError=void 0;var ConfirmPaymentError;exports.ConfirmPaymentError=ConfirmPaymentError;(function(ConfirmPaymentError){ConfirmPaymentError["Canceled"]="Canceled";ConfirmPaymentError["Failed"]="Failed";ConfirmPaymentError["Unknown"]="Unknown";})(ConfirmPaymentError||(exports.ConfirmPaymentError=ConfirmPaymentError={}));var CardActionError;exports.CardActionError=CardActionError;(function(CardActionError){CardActionError["Canceled"]="Canceled";CardActionError["Failed"]="Failed";CardActionError["Unknown"]="Unknown";})(CardActionError||(exports.CardActionError=CardActionError={}));var ConfirmSetupIntentError;exports.ConfirmSetupIntentError=ConfirmSetupIntentError;(function(ConfirmSetupIntentError){ConfirmSetupIntentError["Canceled"]="Canceled";ConfirmSetupIntentError["Failed"]="Failed";ConfirmSetupIntentError["Unknown"]="Unknown";})(ConfirmSetupIntentError||(exports.ConfirmSetupIntentError=ConfirmSetupIntentError={}));var CreatePaymentMethodError;exports.CreatePaymentMethodError=CreatePaymentMethodError;(function(CreatePaymentMethodError){CreatePaymentMethodError["Failed"]="Failed";})(CreatePaymentMethodError||(exports.CreatePaymentMethodError=CreatePaymentMethodError={}));var CreateTokenError;exports.CreateTokenError=CreateTokenError;(function(CreateTokenError){CreateTokenError["Failed"]="Failed";})(CreateTokenError||(exports.CreateTokenError=CreateTokenError={}));var RetrievePaymentIntentError;exports.RetrievePaymentIntentError=RetrievePaymentIntentError;(function(RetrievePaymentIntentError){RetrievePaymentIntentError["Unknown"]="Unknown";})(RetrievePaymentIntentError||(exports.RetrievePaymentIntentError=RetrievePaymentIntentError={}));var RetrieveSetupIntentError;exports.RetrieveSetupIntentError=RetrieveSetupIntentError;(function(RetrieveSetupIntentError){RetrieveSetupIntentError["Unknown"]="Unknown";})(RetrieveSetupIntentError||(exports.RetrieveSetupIntentError=RetrieveSetupIntentError={}));var ApplePayError;exports.ApplePayError=ApplePayError;(function(ApplePayError){ApplePayError["Canceled"]="Canceled";ApplePayError["Failed"]="Failed";ApplePayError["Unknown"]="Unknown";})(ApplePayError||(exports.ApplePayError=ApplePayError={}));var PaymentSheetError;exports.PaymentSheetError=PaymentSheetError;(function(PaymentSheetError){PaymentSheetError["Failed"]="Failed";PaymentSheetError["Canceled"]="Canceled";PaymentSheetError["Timeout"]="Timeout";})(PaymentSheetError||(exports.PaymentSheetError=PaymentSheetError={}));var GooglePayError;exports.GooglePayError=GooglePayError;(function(GooglePayError){GooglePayError["Failed"]="Failed";GooglePayError["Canceled"]="Canceled";GooglePayError["Unknown"]="Unknown";})(GooglePayError||(exports.GooglePayError=GooglePayError={}));var MissingRoutingNumber={code:CreateTokenError.Failed,message:'You must provide a routing number for US bank accounts. This should be the ACH routing number.'};exports.MissingRoutingNumber=MissingRoutingNumber;var VerifyMicrodepositsError;exports.VerifyMicrodepositsError=VerifyMicrodepositsError;(function(VerifyMicrodepositsError){VerifyMicrodepositsError["Canceled"]="Canceled";VerifyMicrodepositsError["Failed"]="Failed";VerifyMicrodepositsError["Unknown"]="Unknown";})(VerifyMicrodepositsError||(exports.VerifyMicrodepositsError=VerifyMicrodepositsError={}));var CollectBankAccountError;exports.CollectBankAccountError=CollectBankAccountError;(function(CollectBankAccountError){CollectBankAccountError["Canceled"]="Canceled";CollectBankAccountError["Failed"]="Failed";CollectBankAccountError["Unknown"]="Unknown";})(CollectBankAccountError||(exports.CollectBankAccountError=CollectBankAccountError={}));var AddressSheetError;exports.AddressSheetError=AddressSheetError;(function(AddressSheetError){AddressSheetError["Failed"]="Failed";AddressSheetError["Canceled"]="Canceled";})(AddressSheetError||(exports.AddressSheetError=AddressSheetError={}));var PlatformPayError;exports.PlatformPayError=PlatformPayError;(function(PlatformPayError){PlatformPayError["Canceled"]="Canceled";PlatformPayError["Failed"]="Failed";PlatformPayError["Unknown"]="Unknown";})(PlatformPayError||(exports.PlatformPayError=PlatformPayError={}));
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.VerifyMicrodepositsError=exports.RetrieveSetupIntentError=exports.RetrievePaymentIntentError=exports.PlatformPayError=exports.PaymentSheetError=exports.MissingRoutingNumber=exports.GooglePayError=exports.CustomerSheetError=exports.CreateTokenError=exports.CreatePaymentMethodError=exports.ConfirmSetupIntentError=exports.ConfirmPaymentError=exports.CollectBankAccountError=exports.CardActionError=exports.ApplePayError=exports.AddressSheetError=void 0;var ConfirmPaymentError;exports.ConfirmPaymentError=ConfirmPaymentError;(function(ConfirmPaymentError){ConfirmPaymentError["Canceled"]="Canceled";ConfirmPaymentError["Failed"]="Failed";ConfirmPaymentError["Unknown"]="Unknown";})(ConfirmPaymentError||(exports.ConfirmPaymentError=ConfirmPaymentError={}));var CardActionError;exports.CardActionError=CardActionError;(function(CardActionError){CardActionError["Canceled"]="Canceled";CardActionError["Failed"]="Failed";CardActionError["Unknown"]="Unknown";})(CardActionError||(exports.CardActionError=CardActionError={}));var ConfirmSetupIntentError;exports.ConfirmSetupIntentError=ConfirmSetupIntentError;(function(ConfirmSetupIntentError){ConfirmSetupIntentError["Canceled"]="Canceled";ConfirmSetupIntentError["Failed"]="Failed";ConfirmSetupIntentError["Unknown"]="Unknown";})(ConfirmSetupIntentError||(exports.ConfirmSetupIntentError=ConfirmSetupIntentError={}));var CreatePaymentMethodError;exports.CreatePaymentMethodError=CreatePaymentMethodError;(function(CreatePaymentMethodError){CreatePaymentMethodError["Failed"]="Failed";})(CreatePaymentMethodError||(exports.CreatePaymentMethodError=CreatePaymentMethodError={}));var CreateTokenError;exports.CreateTokenError=CreateTokenError;(function(CreateTokenError){CreateTokenError["Failed"]="Failed";})(CreateTokenError||(exports.CreateTokenError=CreateTokenError={}));var RetrievePaymentIntentError;exports.RetrievePaymentIntentError=RetrievePaymentIntentError;(function(RetrievePaymentIntentError){RetrievePaymentIntentError["Unknown"]="Unknown";})(RetrievePaymentIntentError||(exports.RetrievePaymentIntentError=RetrievePaymentIntentError={}));var RetrieveSetupIntentError;exports.RetrieveSetupIntentError=RetrieveSetupIntentError;(function(RetrieveSetupIntentError){RetrieveSetupIntentError["Unknown"]="Unknown";})(RetrieveSetupIntentError||(exports.RetrieveSetupIntentError=RetrieveSetupIntentError={}));var ApplePayError;exports.ApplePayError=ApplePayError;(function(ApplePayError){ApplePayError["Canceled"]="Canceled";ApplePayError["Failed"]="Failed";ApplePayError["Unknown"]="Unknown";})(ApplePayError||(exports.ApplePayError=ApplePayError={}));var PaymentSheetError;exports.PaymentSheetError=PaymentSheetError;(function(PaymentSheetError){PaymentSheetError["Failed"]="Failed";PaymentSheetError["Canceled"]="Canceled";PaymentSheetError["Timeout"]="Timeout";})(PaymentSheetError||(exports.PaymentSheetError=PaymentSheetError={}));var GooglePayError;exports.GooglePayError=GooglePayError;(function(GooglePayError){GooglePayError["Failed"]="Failed";GooglePayError["Canceled"]="Canceled";GooglePayError["Unknown"]="Unknown";})(GooglePayError||(exports.GooglePayError=GooglePayError={}));var MissingRoutingNumber={code:CreateTokenError.Failed,message:'You must provide a routing number for US bank accounts. This should be the ACH routing number.'};exports.MissingRoutingNumber=MissingRoutingNumber;var VerifyMicrodepositsError;exports.VerifyMicrodepositsError=VerifyMicrodepositsError;(function(VerifyMicrodepositsError){VerifyMicrodepositsError["Canceled"]="Canceled";VerifyMicrodepositsError["Failed"]="Failed";VerifyMicrodepositsError["Unknown"]="Unknown";})(VerifyMicrodepositsError||(exports.VerifyMicrodepositsError=VerifyMicrodepositsError={}));var CollectBankAccountError;exports.CollectBankAccountError=CollectBankAccountError;(function(CollectBankAccountError){CollectBankAccountError["Canceled"]="Canceled";CollectBankAccountError["Failed"]="Failed";CollectBankAccountError["Unknown"]="Unknown";})(CollectBankAccountError||(exports.CollectBankAccountError=CollectBankAccountError={}));var AddressSheetError;exports.AddressSheetError=AddressSheetError;(function(AddressSheetError){AddressSheetError["Failed"]="Failed";AddressSheetError["Canceled"]="Canceled";})(AddressSheetError||(exports.AddressSheetError=AddressSheetError={}));var CustomerSheetError;exports.CustomerSheetError=CustomerSheetError;(function(CustomerSheetError){CustomerSheetError["Failed"]="Failed";CustomerSheetError["Canceled"]="Canceled";})(CustomerSheetError||(exports.CustomerSheetError=CustomerSheetError={}));var PlatformPayError;exports.PlatformPayError=PlatformPayError;(function(PlatformPayError){PlatformPayError["Canceled"]="Canceled";PlatformPayError["Failed"]="Failed";PlatformPayError["Unknown"]="Unknown";})(PlatformPayError||(exports.PlatformPayError=PlatformPayError={}));
|
|
2
2
|
//# sourceMappingURL=Errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ConfirmPaymentError","CardActionError","ConfirmSetupIntentError","CreatePaymentMethodError","CreateTokenError","RetrievePaymentIntentError","RetrieveSetupIntentError","ApplePayError","PaymentSheetError","GooglePayError","MissingRoutingNumber","code","Failed","message","VerifyMicrodepositsError","CollectBankAccountError","AddressSheetError","PlatformPayError"],"sources":["Errors.ts"],"sourcesContent":["export enum ConfirmPaymentError {\n Canceled = 'Canceled',\n Failed = 'Failed',\n Unknown = 'Unknown',\n}\n\nexport enum CardActionError {\n Canceled = 'Canceled',\n Failed = 'Failed',\n Unknown = 'Unknown',\n}\n\nexport enum ConfirmSetupIntentError {\n Canceled = 'Canceled',\n Failed = 'Failed',\n Unknown = 'Unknown',\n}\n\nexport enum CreatePaymentMethodError {\n Failed = 'Failed',\n}\n\nexport enum CreateTokenError {\n Failed = 'Failed',\n}\n\nexport enum RetrievePaymentIntentError {\n Unknown = 'Unknown',\n}\n\nexport enum RetrieveSetupIntentError {\n Unknown = 'Unknown',\n}\n\nexport enum ApplePayError {\n Canceled = 'Canceled',\n Failed = 'Failed',\n Unknown = 'Unknown',\n}\n\nexport enum PaymentSheetError {\n Failed = 'Failed',\n Canceled = 'Canceled',\n Timeout = 'Timeout',\n}\n\nexport type ErrorType =\n | 'api_connection_error'\n | 'api_error'\n | 'authentication_error'\n | 'card_error'\n | 'idempotency_error'\n | 'invalid_request_error'\n | 'rate_limit_error';\n\nexport interface StripeError<T> {\n code: T;\n message: string;\n localizedMessage?: string;\n declineCode?: string;\n stripeErrorCode?: string;\n type?: ErrorType;\n}\n\nexport enum GooglePayError {\n Failed = 'Failed',\n Canceled = 'Canceled',\n Unknown = 'Unknown',\n}\n\nexport const MissingRoutingNumber = {\n code: CreateTokenError.Failed,\n message:\n 'You must provide a routing number for US bank accounts. This should be the ACH routing number.',\n};\n\nexport enum VerifyMicrodepositsError {\n Canceled = 'Canceled',\n Failed = 'Failed',\n Unknown = 'Unknown',\n}\n\nexport enum CollectBankAccountError {\n Canceled = 'Canceled',\n Failed = 'Failed',\n Unknown = 'Unknown',\n}\n\nexport enum AddressSheetError {\n Failed = 'Failed',\n Canceled = 'Canceled',\n}\n\nexport enum PlatformPayError {\n Canceled = 'Canceled',\n Failed = 'Failed',\n Unknown = 'Unknown',\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["ConfirmPaymentError","CardActionError","ConfirmSetupIntentError","CreatePaymentMethodError","CreateTokenError","RetrievePaymentIntentError","RetrieveSetupIntentError","ApplePayError","PaymentSheetError","GooglePayError","MissingRoutingNumber","code","Failed","message","VerifyMicrodepositsError","CollectBankAccountError","AddressSheetError","CustomerSheetError","PlatformPayError"],"sources":["Errors.ts"],"sourcesContent":["export enum ConfirmPaymentError {\n Canceled = 'Canceled',\n Failed = 'Failed',\n Unknown = 'Unknown',\n}\n\nexport enum CardActionError {\n Canceled = 'Canceled',\n Failed = 'Failed',\n Unknown = 'Unknown',\n}\n\nexport enum ConfirmSetupIntentError {\n Canceled = 'Canceled',\n Failed = 'Failed',\n Unknown = 'Unknown',\n}\n\nexport enum CreatePaymentMethodError {\n Failed = 'Failed',\n}\n\nexport enum CreateTokenError {\n Failed = 'Failed',\n}\n\nexport enum RetrievePaymentIntentError {\n Unknown = 'Unknown',\n}\n\nexport enum RetrieveSetupIntentError {\n Unknown = 'Unknown',\n}\n\nexport enum ApplePayError {\n Canceled = 'Canceled',\n Failed = 'Failed',\n Unknown = 'Unknown',\n}\n\nexport enum PaymentSheetError {\n Failed = 'Failed',\n Canceled = 'Canceled',\n Timeout = 'Timeout',\n}\n\nexport type ErrorType =\n | 'api_connection_error'\n | 'api_error'\n | 'authentication_error'\n | 'card_error'\n | 'idempotency_error'\n | 'invalid_request_error'\n | 'rate_limit_error';\n\nexport interface StripeError<T> {\n code: T;\n message: string;\n localizedMessage?: string;\n declineCode?: string;\n stripeErrorCode?: string;\n type?: ErrorType;\n}\n\nexport enum GooglePayError {\n Failed = 'Failed',\n Canceled = 'Canceled',\n Unknown = 'Unknown',\n}\n\nexport const MissingRoutingNumber = {\n code: CreateTokenError.Failed,\n message:\n 'You must provide a routing number for US bank accounts. This should be the ACH routing number.',\n};\n\nexport enum VerifyMicrodepositsError {\n Canceled = 'Canceled',\n Failed = 'Failed',\n Unknown = 'Unknown',\n}\n\nexport enum CollectBankAccountError {\n Canceled = 'Canceled',\n Failed = 'Failed',\n Unknown = 'Unknown',\n}\n\nexport enum AddressSheetError {\n Failed = 'Failed',\n Canceled = 'Canceled',\n}\n\nexport enum CustomerSheetError {\n Failed = 'Failed',\n Canceled = 'Canceled',\n}\n\nexport enum PlatformPayError {\n Canceled = 'Canceled',\n Failed = 'Failed',\n Unknown = 'Unknown',\n}\n"],"mappings":"wgBAAYA,oBAAmB,2DAAnBA,mBAAmB,EAAnBA,mBAAmB,wBAAnBA,mBAAmB,oBAAnBA,mBAAmB,yBAAnBA,mBAAmB,+BAAnBA,mBAAmB,SAMnBC,gBAAe,mDAAfA,eAAe,EAAfA,eAAe,wBAAfA,eAAe,oBAAfA,eAAe,yBAAfA,eAAe,2BAAfA,eAAe,SAMfC,wBAAuB,mEAAvBA,uBAAuB,EAAvBA,uBAAuB,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lBA,kBAAkB,EAAlBA,kBAAkB,oBAAlBA,kBAAkB,2BAAlBA,kBAAkB,8BAAlBA,kBAAkB,SAKlBC,iBAAgB,qDAAhBA,gBAAgB,EAAhBA,gBAAgB,wBAAhBA,gBAAgB,oBAAhBA,gBAAgB,yBAAhBA,gBAAgB,4BAAhBA,gBAAgB"}
|
|
@@ -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,AuBECSDebitFormComponent:true,CardFieldInput:true,CardFormView:true,Token:true,FinancialConnections:true,PlatformPay:true};exports.Token=exports.ThreeDSecure=exports.SetupIntent=exports.PlatformPay=exports.PaymentSheet=exports.PaymentMethod=exports.PaymentIntent=exports.FinancialConnections=exports.CardFormView=exports.CardFieldInput=exports.AuBECSDebitFormComponent=exports.ApplePay=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 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];}});});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,AuBECSDebitFormComponent:true,CardFieldInput:true,CardFormView:true,Token:true,FinancialConnections:true,PlatformPay:true};exports.Token=exports.ThreeDSecure=exports.SetupIntent=exports.PlatformPay=exports.PaymentSheet=exports.PaymentMethod=exports.PaymentIntent=exports.FinancialConnections=exports.CardFormView=exports.CardFieldInput=exports.AuBECSDebitFormComponent=exports.ApplePay=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 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 _CustomerSheet=require("./CustomerSheet");Object.keys(_CustomerSheet).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_CustomerSheet[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _CustomerSheet[key];}});});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,"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 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 AuBECSDebitFormComponent,\n CardFieldInput,\n CardFormView,\n Token,\n FinancialConnections,\n PlatformPay,\n};\n\nexport * from './PushProvisioning';\nexport * from './Errors';\nexport type { 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 HandleNextActionForSetupResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: 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":"6jBAeA,4DAAuC,0BACvC,sEAAiD,oCACjD,sEAAiD,oCACjD,oEAA+C,kCAC/C,kEAA6C,gCAC7C,oEAA+C,kCAC/C,uGAAkF,0DAClF,mFAA8D,sCAC9D,+EAA0D,kCAC1D,sDAAiC,oBACjC,oFAA+D,kDAC/D,kEAA6C,gCAiB7C,mYACA,
|
|
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 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 AuBECSDebitFormComponent,\n CardFieldInput,\n CardFormView,\n Token,\n FinancialConnections,\n PlatformPay,\n};\n\nexport * from './PushProvisioning';\nexport * from './Errors';\nexport * from './CustomerSheet';\nexport type { 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 HandleNextActionForSetupResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: 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":"6jBAeA,4DAAuC,0BACvC,sEAAiD,oCACjD,sEAAiD,oCACjD,oEAA+C,kCAC/C,kEAA6C,gCAC7C,oEAA+C,kCAC/C,uGAAkF,0DAClF,mFAA8D,sCAC9D,+EAA0D,kCAC1D,sDAAiC,oBACjC,oFAA+D,kDAC/D,kEAA6C,gCAiB7C,mYACA,iVACA,oXAAgC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StripeSdk","NativeModules"],"sources":["NativeStripeSdk.tsx"],"sourcesContent":["import { NativeModules } from 'react-native';\nimport type {\n PaymentMethod,\n PaymentIntent,\n PlatformPay,\n PaymentSheet,\n SetupIntent,\n InitialiseParams,\n CreatePaymentMethodResult,\n RetrievePaymentIntentResult,\n RetrieveSetupIntentResult,\n ConfirmPaymentResult,\n HandleNextActionResult,\n HandleNextActionForSetupResult,\n ConfirmSetupIntentResult,\n CreateTokenForCVCUpdateResult,\n InitPaymentSheetResult,\n PresentPaymentSheetResult,\n ConfirmPaymentSheetPaymentResult,\n CreateTokenResult,\n OpenApplePaySetupResult,\n Token,\n VerifyMicrodepositsParams,\n IsCardInWalletResult,\n CanAddCardToWalletParams,\n CanAddCardToWalletResult,\n FinancialConnections,\n} from './types';\n\ntype NativeStripeSdkType = {\n initialise(params: InitialiseParams): Promise<void>;\n createPaymentMethod(\n params: PaymentMethod.CreateParams,\n options: PaymentMethod.CreateOptions\n ): Promise<CreatePaymentMethodResult>;\n handleNextAction(\n paymentIntentClientSecret: string,\n returnURL?: string | null\n ): Promise<HandleNextActionResult>;\n handleNextActionForSetup(\n setupIntentClientSecret: string,\n returnURL?: string | null\n ): Promise<HandleNextActionForSetupResult>;\n confirmPayment(\n paymentIntentClientSecret: string,\n params?: PaymentIntent.ConfirmParams,\n options?: PaymentIntent.ConfirmOptions\n ): Promise<ConfirmPaymentResult>;\n confirmSetupIntent(\n paymentIntentClientSecret: string,\n params: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions\n ): Promise<ConfirmSetupIntentResult>;\n retrievePaymentIntent(\n clientSecret: string\n ): Promise<RetrievePaymentIntentResult>;\n retrieveSetupIntent(clientSecret: string): Promise<RetrieveSetupIntentResult>;\n initPaymentSheet(\n params: PaymentSheet.SetupParams\n ): Promise<InitPaymentSheetResult>;\n intentCreationCallback(\n result: PaymentSheet.IntentCreationCallbackParams\n ): void;\n presentPaymentSheet(\n options: PaymentSheet.PresentOptions\n ): Promise<PresentPaymentSheetResult>;\n confirmPaymentSheetPayment(): Promise<ConfirmPaymentSheetPaymentResult>;\n createTokenForCVCUpdate(cvc: string): Promise<CreateTokenForCVCUpdateResult>;\n handleURLCallback(url: string): Promise<boolean>;\n createToken(params: Token.CreateParams): Promise<CreateTokenResult>;\n openApplePaySetup(): Promise<OpenApplePaySetupResult>;\n verifyMicrodeposits(\n isPaymentIntent: boolean,\n clientSecret: string,\n params: VerifyMicrodepositsParams\n ): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;\n collectBankAccount(\n isPaymentIntent: boolean,\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n ): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;\n getConstants(): { API_VERSIONS: { CORE: string; ISSUING: string } };\n canAddCardToWallet(\n params: CanAddCardToWalletParams\n ): Promise<CanAddCardToWalletResult>;\n isCardInWallet(params: {\n cardLastFour: string;\n }): Promise<IsCardInWalletResult>;\n collectBankAccountToken(\n clientSecret: string\n ): Promise<FinancialConnections.TokenResult>;\n collectFinancialConnectionsAccounts(\n clientSecret: string\n ): Promise<FinancialConnections.SessionResult>;\n resetPaymentSheetCustomer(): Promise<null>;\n isPlatformPaySupported(params: {\n googlePay?: PlatformPay.IsGooglePaySupportedParams;\n }): Promise<boolean>;\n createPlatformPayPaymentMethod(\n params: PlatformPay.PaymentMethodParams,\n usesDeprecatedTokenFlow: boolean\n ): Promise<PlatformPay.PaymentMethodResult | PlatformPay.TokenResult>;\n dismissPlatformPay(): Promise<boolean>;\n updatePlatformPaySheet(\n summaryItems: Array<PlatformPay.CartSummaryItem>,\n shippingMethods: Array<PlatformPay.ShippingMethod>,\n errors: Array<PlatformPay.ApplePaySheetError>\n ): Promise<void>;\n confirmPlatformPay(\n clientSecret: string,\n params: PlatformPay.ConfirmParams,\n isPaymentIntent: boolean\n ): Promise<\n PlatformPay.ConfirmPaymentResult | PlatformPay.ConfirmSetupIntentResult\n >;\n configureOrderTracking(\n orderTypeIdentifier: string,\n orderIdentifier: string,\n webServiceUrl: string,\n authenticationToken: string\n ): Promise<void>;\n};\n\nconst { StripeSdk } = NativeModules;\n\nexport default StripeSdk as NativeStripeSdkType;\n"],"mappings":"gFAAA,
|
|
1
|
+
{"version":3,"names":["StripeSdk","NativeModules"],"sources":["NativeStripeSdk.tsx"],"sourcesContent":["import { NativeModules } from 'react-native';\nimport type {\n PaymentMethod,\n PaymentIntent,\n PlatformPay,\n PaymentSheet,\n SetupIntent,\n InitialiseParams,\n CreatePaymentMethodResult,\n RetrievePaymentIntentResult,\n RetrieveSetupIntentResult,\n ConfirmPaymentResult,\n HandleNextActionResult,\n HandleNextActionForSetupResult,\n ConfirmSetupIntentResult,\n CreateTokenForCVCUpdateResult,\n InitPaymentSheetResult,\n PresentPaymentSheetResult,\n ConfirmPaymentSheetPaymentResult,\n CreateTokenResult,\n OpenApplePaySetupResult,\n Token,\n VerifyMicrodepositsParams,\n IsCardInWalletResult,\n CanAddCardToWalletParams,\n CanAddCardToWalletResult,\n FinancialConnections,\n CustomerSheetInitParams,\n CustomerSheetPresentParams,\n CustomerSheetResult,\n CustomerSheetError,\n StripeError,\n CustomerPaymentOption,\n CustomerAdapter,\n} from './types';\n\ntype NativeStripeSdkType = {\n initialise(params: InitialiseParams): Promise<void>;\n createPaymentMethod(\n params: PaymentMethod.CreateParams,\n options: PaymentMethod.CreateOptions\n ): Promise<CreatePaymentMethodResult>;\n handleNextAction(\n paymentIntentClientSecret: string,\n returnURL?: string | null\n ): Promise<HandleNextActionResult>;\n handleNextActionForSetup(\n setupIntentClientSecret: string,\n returnURL?: string | null\n ): Promise<HandleNextActionForSetupResult>;\n confirmPayment(\n paymentIntentClientSecret: string,\n params?: PaymentIntent.ConfirmParams,\n options?: PaymentIntent.ConfirmOptions\n ): Promise<ConfirmPaymentResult>;\n confirmSetupIntent(\n paymentIntentClientSecret: string,\n params: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions\n ): Promise<ConfirmSetupIntentResult>;\n retrievePaymentIntent(\n clientSecret: string\n ): Promise<RetrievePaymentIntentResult>;\n retrieveSetupIntent(clientSecret: string): Promise<RetrieveSetupIntentResult>;\n initPaymentSheet(\n params: PaymentSheet.SetupParams\n ): Promise<InitPaymentSheetResult>;\n intentCreationCallback(\n result: PaymentSheet.IntentCreationCallbackParams\n ): void;\n presentPaymentSheet(\n options: PaymentSheet.PresentOptions\n ): Promise<PresentPaymentSheetResult>;\n confirmPaymentSheetPayment(): Promise<ConfirmPaymentSheetPaymentResult>;\n createTokenForCVCUpdate(cvc: string): Promise<CreateTokenForCVCUpdateResult>;\n handleURLCallback(url: string): Promise<boolean>;\n createToken(params: Token.CreateParams): Promise<CreateTokenResult>;\n openApplePaySetup(): Promise<OpenApplePaySetupResult>;\n verifyMicrodeposits(\n isPaymentIntent: boolean,\n clientSecret: string,\n params: VerifyMicrodepositsParams\n ): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;\n collectBankAccount(\n isPaymentIntent: boolean,\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n ): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;\n getConstants(): { API_VERSIONS: { CORE: string; ISSUING: string } };\n canAddCardToWallet(\n params: CanAddCardToWalletParams\n ): Promise<CanAddCardToWalletResult>;\n isCardInWallet(params: {\n cardLastFour: string;\n }): Promise<IsCardInWalletResult>;\n collectBankAccountToken(\n clientSecret: string\n ): Promise<FinancialConnections.TokenResult>;\n collectFinancialConnectionsAccounts(\n clientSecret: string\n ): Promise<FinancialConnections.SessionResult>;\n resetPaymentSheetCustomer(): Promise<null>;\n isPlatformPaySupported(params: {\n googlePay?: PlatformPay.IsGooglePaySupportedParams;\n }): Promise<boolean>;\n createPlatformPayPaymentMethod(\n params: PlatformPay.PaymentMethodParams,\n usesDeprecatedTokenFlow: boolean\n ): Promise<PlatformPay.PaymentMethodResult | PlatformPay.TokenResult>;\n dismissPlatformPay(): Promise<boolean>;\n updatePlatformPaySheet(\n summaryItems: Array<PlatformPay.CartSummaryItem>,\n shippingMethods: Array<PlatformPay.ShippingMethod>,\n errors: Array<PlatformPay.ApplePaySheetError>\n ): Promise<void>;\n confirmPlatformPay(\n clientSecret: string,\n params: PlatformPay.ConfirmParams,\n isPaymentIntent: boolean\n ): Promise<\n PlatformPay.ConfirmPaymentResult | PlatformPay.ConfirmSetupIntentResult\n >;\n configureOrderTracking(\n orderTypeIdentifier: string,\n orderIdentifier: string,\n webServiceUrl: string,\n authenticationToken: string\n ): Promise<void>;\n initCustomerSheet(\n params: CustomerSheetInitParams,\n customerAdapterOverrides: { [Property in keyof CustomerAdapter]: boolean }\n ): Promise<{ error?: StripeError<CustomerSheetError> }>;\n presentCustomerSheet(\n params: CustomerSheetPresentParams\n ): Promise<CustomerSheetResult>;\n retrieveCustomerSheetPaymentOptionSelection(): Promise<CustomerSheetResult>;\n customerAdapterFetchPaymentMethodsCallback(\n paymentMethods: Array<object>\n ): Promise<void>;\n customerAdapterAttachPaymentMethodCallback(\n paymentMethod: object\n ): Promise<void>;\n customerAdapterDetachPaymentMethodCallback(\n paymentMethod: object\n ): Promise<void>;\n customerAdapterSetSelectedPaymentOptionCallback(): Promise<void>;\n customerAdapterFetchSelectedPaymentOptionCallback(\n paymentOption: CustomerPaymentOption | null\n ): Promise<void>;\n customerAdapterSetupIntentClientSecretForCustomerAttachCallback(\n clientSecret: String\n ): Promise<void>;\n};\n\nconst { StripeSdk } = NativeModules;\n\nexport default StripeSdk as NativeStripeSdkType;\n"],"mappings":"gFAAA,yCA0JA,GAAQA,UAAS,CAAKC,0BAAa,CAA3BD,SAAS,CAAmB,aAErBA,SAAS"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CustomerSheetBeta=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _NativeStripeSdk=_interopRequireDefault(require("../NativeStripeSdk"));var eventEmitter=new _reactNative.NativeEventEmitter(_reactNative.NativeModules.StripeSdk);var fetchPaymentMethodsCallback=null;var attachPaymentMethodCallback=null;var detachPaymentMethodCallback=null;var setSelectedPaymentOptionCallback=null;var fetchSelectedPaymentOptionCallback=null;var setupIntentClientSecretForCustomerAttachCallback=null;var initialize=function(){var _ref=(0,_asyncToGenerator2.default)(function*(params){var customerAdapterOverrides={};if(params.customerAdapter){customerAdapterOverrides=configureCustomerAdapterEventListeners(params.customerAdapter);}try{var _yield$NativeStripeSd=yield _NativeStripeSdk.default.initCustomerSheet(params,customerAdapterOverrides),error=_yield$NativeStripeSd.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function initialize(_x){return _ref.apply(this,arguments);};}();var configureCustomerAdapterEventListeners=function configureCustomerAdapterEventListeners(customerAdapter){if(customerAdapter.fetchPaymentMethods){var _fetchPaymentMethodsC;(_fetchPaymentMethodsC=fetchPaymentMethodsCallback)==null?void 0:_fetchPaymentMethodsC.remove();fetchPaymentMethodsCallback=eventEmitter.addListener('onCustomerAdapterFetchPaymentMethodsCallback',(0,_asyncToGenerator2.default)(function*(){if(customerAdapter.fetchPaymentMethods){var paymentMethods=yield customerAdapter.fetchPaymentMethods();yield _NativeStripeSdk.default.customerAdapterFetchPaymentMethodsCallback(paymentMethods);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `fetchPaymentMethods` on your CustomerAdapter, but no matching method was found.');}}));}if(customerAdapter.attachPaymentMethod){var _attachPaymentMethodC;(_attachPaymentMethodC=attachPaymentMethodCallback)==null?void 0:_attachPaymentMethodC.remove();attachPaymentMethodCallback=eventEmitter.addListener('onCustomerAdapterAttachPaymentMethodCallback',function(){var _ref4=(0,_asyncToGenerator2.default)(function*(_ref3){var paymentMethodId=_ref3.paymentMethodId;if(customerAdapter.attachPaymentMethod){var paymentMethod=yield customerAdapter.attachPaymentMethod(paymentMethodId);yield _NativeStripeSdk.default.customerAdapterAttachPaymentMethodCallback(paymentMethod);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `attachPaymentMethod` on your CustomerAdapter, but no matching method was found.');}});return function(_x2){return _ref4.apply(this,arguments);};}());}if(customerAdapter.detachPaymentMethod){var _detachPaymentMethodC;(_detachPaymentMethodC=detachPaymentMethodCallback)==null?void 0:_detachPaymentMethodC.remove();detachPaymentMethodCallback=eventEmitter.addListener('onCustomerAdapterDetachPaymentMethodCallback',function(){var _ref6=(0,_asyncToGenerator2.default)(function*(_ref5){var paymentMethodId=_ref5.paymentMethodId;if(customerAdapter.detachPaymentMethod){var paymentMethod=yield customerAdapter.detachPaymentMethod(paymentMethodId);yield _NativeStripeSdk.default.customerAdapterDetachPaymentMethodCallback(paymentMethod);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `detachPaymentMethod` on your CustomerAdapter, but no matching method was found.');}});return function(_x3){return _ref6.apply(this,arguments);};}());}if(customerAdapter.setSelectedPaymentOption){var _setSelectedPaymentOp;(_setSelectedPaymentOp=setSelectedPaymentOptionCallback)==null?void 0:_setSelectedPaymentOp.remove();setSelectedPaymentOptionCallback=eventEmitter.addListener('onCustomerAdapterSetSelectedPaymentOptionCallback',function(){var _ref8=(0,_asyncToGenerator2.default)(function*(_ref7){var paymentOption=_ref7.paymentOption;if(customerAdapter.setSelectedPaymentOption){yield customerAdapter.setSelectedPaymentOption(paymentOption);yield _NativeStripeSdk.default.customerAdapterSetSelectedPaymentOptionCallback();}else{throw new Error('[@stripe/stripe-react-native] Tried to call `setSelectedPaymentOption` on your CustomerAdapter, but no matching method was found.');}});return function(_x4){return _ref8.apply(this,arguments);};}());}if(customerAdapter.fetchSelectedPaymentOption){var _fetchSelectedPayment;(_fetchSelectedPayment=fetchSelectedPaymentOptionCallback)==null?void 0:_fetchSelectedPayment.remove();fetchSelectedPaymentOptionCallback=eventEmitter.addListener('onCustomerAdapterFetchSelectedPaymentOptionCallback',(0,_asyncToGenerator2.default)(function*(){if(customerAdapter.fetchSelectedPaymentOption){var paymentOption=yield customerAdapter.fetchSelectedPaymentOption();yield _NativeStripeSdk.default.customerAdapterFetchSelectedPaymentOptionCallback(paymentOption);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `fetchSelectedPaymentOption` on your CustomerAdapter, but no matching method was found.');}}));}if(customerAdapter.setupIntentClientSecretForCustomerAttach){var _setupIntentClientSec;(_setupIntentClientSec=setupIntentClientSecretForCustomerAttachCallback)==null?void 0:_setupIntentClientSec.remove();setupIntentClientSecretForCustomerAttachCallback=eventEmitter.addListener('onCustomerAdapterSetupIntentClientSecretForCustomerAttachCallback',(0,_asyncToGenerator2.default)(function*(){if(customerAdapter.setupIntentClientSecretForCustomerAttach){var clientSecret=yield customerAdapter.setupIntentClientSecretForCustomerAttach();yield _NativeStripeSdk.default.customerAdapterSetupIntentClientSecretForCustomerAttachCallback(clientSecret);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `setupIntentClientSecretForCustomerAttach` on your CustomerAdapter, but no matching method was found.');}}));}return{fetchPaymentMethods:!!customerAdapter.fetchPaymentMethods,attachPaymentMethod:!!customerAdapter.attachPaymentMethod,detachPaymentMethod:!!customerAdapter.detachPaymentMethod,setSelectedPaymentOption:!!customerAdapter.setSelectedPaymentOption,fetchSelectedPaymentOption:!!customerAdapter.fetchSelectedPaymentOption,setupIntentClientSecretForCustomerAttach:!!customerAdapter.setupIntentClientSecretForCustomerAttach};};var present=function(){var _ref11=(0,_asyncToGenerator2.default)(function*(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};try{return yield _NativeStripeSdk.default.presentCustomerSheet(params);}catch(error){return{error:error};}});return function present(){return _ref11.apply(this,arguments);};}();var retrievePaymentOptionSelection=function(){var _ref12=(0,_asyncToGenerator2.default)(function*(){try{return yield _NativeStripeSdk.default.retrieveCustomerSheetPaymentOptionSelection();}catch(error){return{error:error};}});return function retrievePaymentOptionSelection(){return _ref12.apply(this,arguments);};}();function CustomerSheet(_ref13){var visible=_ref13.visible,presentationStyle=_ref13.presentationStyle,animationStyle=_ref13.animationStyle,style=_ref13.style,appearance=_ref13.appearance,setupIntentClientSecret=_ref13.setupIntentClientSecret,customerId=_ref13.customerId,customerEphemeralKeySecret=_ref13.customerEphemeralKeySecret,merchantDisplayName=_ref13.merchantDisplayName,headerTextForSelectionScreen=_ref13.headerTextForSelectionScreen,defaultBillingDetails=_ref13.defaultBillingDetails,billingDetailsCollectionConfiguration=_ref13.billingDetailsCollectionConfiguration,returnURL=_ref13.returnURL,removeSavedPaymentMethodMessage=_ref13.removeSavedPaymentMethodMessage,applePayEnabled=_ref13.applePayEnabled,googlePayEnabled=_ref13.googlePayEnabled,timeout=_ref13.timeout,onResult=_ref13.onResult,customerAdapter=_ref13.customerAdapter;_react.default.useEffect(function(){if(visible){initialize({style:style,appearance:appearance,setupIntentClientSecret:setupIntentClientSecret,customerId:customerId,customerEphemeralKeySecret:customerEphemeralKeySecret,merchantDisplayName:merchantDisplayName,headerTextForSelectionScreen:headerTextForSelectionScreen,defaultBillingDetails:defaultBillingDetails,billingDetailsCollectionConfiguration:billingDetailsCollectionConfiguration,returnURL:returnURL,removeSavedPaymentMethodMessage:removeSavedPaymentMethodMessage,applePayEnabled:applePayEnabled,googlePayEnabled:googlePayEnabled,customerAdapter:customerAdapter}).then(function(initResult){if(initResult.error){onResult(initResult);}else{present({timeout:timeout,presentationStyle:presentationStyle,animationStyle:animationStyle}).then(function(presentResult){onResult(presentResult);});}});}},[visible]);return null;}var CustomerSheetBeta={CustomerSheet:CustomerSheet,initialize:initialize,present:present,retrievePaymentOptionSelection:retrievePaymentOptionSelection};exports.CustomerSheetBeta=CustomerSheetBeta;
|
|
2
|
+
//# sourceMappingURL=CustomerSheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["eventEmitter","NativeEventEmitter","NativeModules","StripeSdk","fetchPaymentMethodsCallback","attachPaymentMethodCallback","detachPaymentMethodCallback","setSelectedPaymentOptionCallback","fetchSelectedPaymentOptionCallback","setupIntentClientSecretForCustomerAttachCallback","initialize","params","customerAdapterOverrides","customerAdapter","configureCustomerAdapterEventListeners","NativeStripeSdk","initCustomerSheet","error","fetchPaymentMethods","remove","addListener","paymentMethods","customerAdapterFetchPaymentMethodsCallback","Error","attachPaymentMethod","paymentMethodId","paymentMethod","customerAdapterAttachPaymentMethodCallback","detachPaymentMethod","customerAdapterDetachPaymentMethodCallback","setSelectedPaymentOption","paymentOption","customerAdapterSetSelectedPaymentOptionCallback","fetchSelectedPaymentOption","customerAdapterFetchSelectedPaymentOptionCallback","setupIntentClientSecretForCustomerAttach","clientSecret","customerAdapterSetupIntentClientSecretForCustomerAttachCallback","present","presentCustomerSheet","retrievePaymentOptionSelection","retrieveCustomerSheetPaymentOptionSelection","CustomerSheet","visible","presentationStyle","animationStyle","style","appearance","setupIntentClientSecret","customerId","customerEphemeralKeySecret","merchantDisplayName","headerTextForSelectionScreen","defaultBillingDetails","billingDetailsCollectionConfiguration","returnURL","removeSavedPaymentMethodMessage","applePayEnabled","googlePayEnabled","timeout","onResult","React","useEffect","then","initResult","presentResult","CustomerSheetBeta"],"sources":["CustomerSheet.tsx"],"sourcesContent":["import React from 'react';\nimport {\n NativeEventEmitter,\n NativeModules,\n EmitterSubscription,\n} from 'react-native';\nimport NativeStripeSdk from '../NativeStripeSdk';\nimport type {\n CustomerSheetInitParams,\n CustomerSheetPresentParams,\n CustomerSheetResult,\n CustomerSheetError,\n StripeError,\n CustomerAdapter,\n} from '../types';\n\nconst eventEmitter = new NativeEventEmitter(NativeModules.StripeSdk);\nlet fetchPaymentMethodsCallback: EmitterSubscription | null = null;\nlet attachPaymentMethodCallback: EmitterSubscription | null = null;\nlet detachPaymentMethodCallback: EmitterSubscription | null = null;\nlet setSelectedPaymentOptionCallback: EmitterSubscription | null = null;\nlet fetchSelectedPaymentOptionCallback: EmitterSubscription | null = null;\nlet setupIntentClientSecretForCustomerAttachCallback: EmitterSubscription | null =\n null;\n\n/** Initialize an instance of Customer Sheet with your desired configuration. */\nconst initialize = async (\n params: CustomerSheetInitParams\n): Promise<{ error?: StripeError<CustomerSheetError> }> => {\n let customerAdapterOverrides = {};\n if (params.customerAdapter) {\n customerAdapterOverrides = configureCustomerAdapterEventListeners(\n params.customerAdapter\n );\n }\n\n try {\n const { error } = await NativeStripeSdk.initCustomerSheet(\n params,\n customerAdapterOverrides\n );\n if (error) {\n return { error };\n }\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nconst configureCustomerAdapterEventListeners = (\n customerAdapter: CustomerAdapter\n): { [Property in keyof CustomerAdapter]: boolean } => {\n if (customerAdapter.fetchPaymentMethods) {\n fetchPaymentMethodsCallback?.remove();\n fetchPaymentMethodsCallback = eventEmitter.addListener(\n 'onCustomerAdapterFetchPaymentMethodsCallback',\n async () => {\n if (customerAdapter.fetchPaymentMethods) {\n const paymentMethods = await customerAdapter.fetchPaymentMethods();\n await NativeStripeSdk.customerAdapterFetchPaymentMethodsCallback(\n paymentMethods\n );\n } else {\n throw new Error(\n '[@stripe/stripe-react-native] Tried to call `fetchPaymentMethods` on your CustomerAdapter, but no matching method was found.'\n );\n }\n }\n );\n }\n\n if (customerAdapter.attachPaymentMethod) {\n attachPaymentMethodCallback?.remove();\n attachPaymentMethodCallback = eventEmitter.addListener(\n 'onCustomerAdapterAttachPaymentMethodCallback',\n async ({ paymentMethodId }: { paymentMethodId: string }) => {\n if (customerAdapter.attachPaymentMethod) {\n const paymentMethod = await customerAdapter.attachPaymentMethod(\n paymentMethodId\n );\n await NativeStripeSdk.customerAdapterAttachPaymentMethodCallback(\n paymentMethod\n );\n } else {\n throw new Error(\n '[@stripe/stripe-react-native] Tried to call `attachPaymentMethod` on your CustomerAdapter, but no matching method was found.'\n );\n }\n }\n );\n }\n\n if (customerAdapter.detachPaymentMethod) {\n detachPaymentMethodCallback?.remove();\n detachPaymentMethodCallback = eventEmitter.addListener(\n 'onCustomerAdapterDetachPaymentMethodCallback',\n async ({ paymentMethodId }: { paymentMethodId: string }) => {\n if (customerAdapter.detachPaymentMethod) {\n const paymentMethod = await customerAdapter.detachPaymentMethod(\n paymentMethodId\n );\n await NativeStripeSdk.customerAdapterDetachPaymentMethodCallback(\n paymentMethod\n );\n } else {\n throw new Error(\n '[@stripe/stripe-react-native] Tried to call `detachPaymentMethod` on your CustomerAdapter, but no matching method was found.'\n );\n }\n }\n );\n }\n\n if (customerAdapter.setSelectedPaymentOption) {\n setSelectedPaymentOptionCallback?.remove();\n setSelectedPaymentOptionCallback = eventEmitter.addListener(\n 'onCustomerAdapterSetSelectedPaymentOptionCallback',\n async ({ paymentOption }: { paymentOption: string }) => {\n if (customerAdapter.setSelectedPaymentOption) {\n await customerAdapter.setSelectedPaymentOption(paymentOption);\n await NativeStripeSdk.customerAdapterSetSelectedPaymentOptionCallback();\n } else {\n throw new Error(\n '[@stripe/stripe-react-native] Tried to call `setSelectedPaymentOption` on your CustomerAdapter, but no matching method was found.'\n );\n }\n }\n );\n }\n\n if (customerAdapter.fetchSelectedPaymentOption) {\n fetchSelectedPaymentOptionCallback?.remove();\n fetchSelectedPaymentOptionCallback = eventEmitter.addListener(\n 'onCustomerAdapterFetchSelectedPaymentOptionCallback',\n async () => {\n if (customerAdapter.fetchSelectedPaymentOption) {\n const paymentOption =\n await customerAdapter.fetchSelectedPaymentOption();\n await NativeStripeSdk.customerAdapterFetchSelectedPaymentOptionCallback(\n paymentOption\n );\n } else {\n throw new Error(\n '[@stripe/stripe-react-native] Tried to call `fetchSelectedPaymentOption` on your CustomerAdapter, but no matching method was found.'\n );\n }\n }\n );\n }\n\n if (customerAdapter.setupIntentClientSecretForCustomerAttach) {\n setupIntentClientSecretForCustomerAttachCallback?.remove();\n setupIntentClientSecretForCustomerAttachCallback = eventEmitter.addListener(\n 'onCustomerAdapterSetupIntentClientSecretForCustomerAttachCallback',\n async () => {\n if (customerAdapter.setupIntentClientSecretForCustomerAttach) {\n const clientSecret =\n await customerAdapter.setupIntentClientSecretForCustomerAttach();\n await NativeStripeSdk.customerAdapterSetupIntentClientSecretForCustomerAttachCallback(\n clientSecret\n );\n } else {\n throw new Error(\n '[@stripe/stripe-react-native] Tried to call `setupIntentClientSecretForCustomerAttach` on your CustomerAdapter, but no matching method was found.'\n );\n }\n }\n );\n }\n\n return {\n fetchPaymentMethods: !!customerAdapter.fetchPaymentMethods,\n attachPaymentMethod: !!customerAdapter.attachPaymentMethod,\n detachPaymentMethod: !!customerAdapter.detachPaymentMethod,\n setSelectedPaymentOption: !!customerAdapter.setSelectedPaymentOption,\n fetchSelectedPaymentOption: !!customerAdapter.fetchSelectedPaymentOption,\n setupIntentClientSecretForCustomerAttach:\n !!customerAdapter.setupIntentClientSecretForCustomerAttach,\n };\n};\n\n/** Launches the Customer Sheet UI. */\nconst present = async (\n params: CustomerSheetPresentParams = {}\n): Promise<CustomerSheetResult> => {\n try {\n return await NativeStripeSdk.presentCustomerSheet(params);\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * You can use this to obtain the selected payment method without presenting the CustomerSheet.\n * This will return an error if you have not called `.initialize`\n */\nconst retrievePaymentOptionSelection =\n async (): Promise<CustomerSheetResult> => {\n try {\n return await NativeStripeSdk.retrieveCustomerSheetPaymentOptionSelection();\n } catch (error: any) {\n return {\n error,\n };\n }\n };\n\n/**\n * Props\n */\nexport type Props = {\n /** Whether the sheet is visible. Defaults to false. */\n visible: boolean;\n /** Called when the user submits, dismisses, or cancels the sheet, or when an error occurs. */\n onResult: (result: CustomerSheetResult) => void;\n} & CustomerSheetInitParams &\n CustomerSheetPresentParams;\n\n/**\n * A component wrapper around the Customer Sheet functions. Upon passing `true` to the `visible` prop,\n * Customer Sheet will call `initialize` and `present`, and the result(s) will be passed through to the\n * onResult callback.\n *\n * @example\n * ```ts\n * const [selectedPaymentOption, setSelectedPaymentOption] = React.useState(null);\n * const [customerSheetVisible, setCustomerSheetVisible] = React.useState(false);\n *\n * return (\n * <CustomerSheet\n * visible={customerSheetVisible}\n * customerEphemeralKeySecret={ephemeralKeySecret}\n * customerId={customer}\n * returnURL={'stripe-example://stripe-redirect'}\n * onResult={({ error, paymentOption, paymentMethod }) => {\n * setCustomerSheetVisible(false);\n * if (error) {\n * Alert.alert(error.code, error.localizedMessage);\n * }\n * if (paymentOption) {\n * setSelectedPaymentOption(paymentOption);\n * console.log(JSON.stringify(paymentOption, null, 2));\n * }\n * if (paymentMethod) {\n * console.log(JSON.stringify(paymentMethod, null, 2));\n * }\n * }}\n * />\n * );\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nfunction CustomerSheet({\n visible,\n presentationStyle,\n animationStyle,\n style,\n appearance,\n setupIntentClientSecret,\n customerId,\n customerEphemeralKeySecret,\n merchantDisplayName,\n headerTextForSelectionScreen,\n defaultBillingDetails,\n billingDetailsCollectionConfiguration,\n returnURL,\n removeSavedPaymentMethodMessage,\n applePayEnabled,\n googlePayEnabled,\n timeout,\n onResult,\n customerAdapter,\n}: Props) {\n React.useEffect(() => {\n if (visible) {\n initialize({\n style,\n appearance,\n setupIntentClientSecret,\n customerId,\n customerEphemeralKeySecret,\n merchantDisplayName,\n headerTextForSelectionScreen,\n defaultBillingDetails,\n billingDetailsCollectionConfiguration,\n returnURL,\n removeSavedPaymentMethodMessage,\n applePayEnabled,\n googlePayEnabled,\n customerAdapter,\n }).then((initResult) => {\n if (initResult.error) {\n onResult(initResult);\n } else {\n present({\n timeout,\n presentationStyle,\n animationStyle,\n }).then((presentResult) => {\n onResult(presentResult);\n });\n }\n });\n }\n // Only run this hook when visible prop changes\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [visible]);\n\n return null;\n}\n\n/**\n * The Customer Sheet is a prebuilt UI component that lets your customers manage their saved payment methods.\n */\nexport const CustomerSheetBeta = {\n CustomerSheet,\n initialize,\n present,\n retrievePaymentOptionSelection,\n};\n"],"mappings":"+QAAA,oDACA,yCAKA,2EAUA,GAAMA,aAAY,CAAG,GAAIC,gCAAkB,CAACC,0BAAa,CAACC,SAAS,CAAC,CACpE,GAAIC,4BAAuD,CAAG,IAAI,CAClE,GAAIC,4BAAuD,CAAG,IAAI,CAClE,GAAIC,4BAAuD,CAAG,IAAI,CAClE,GAAIC,iCAA4D,CAAG,IAAI,CACvE,GAAIC,mCAA8D,CAAG,IAAI,CACzE,GAAIC,iDAA4E,CAC9E,IAAI,CAGN,GAAMC,WAAU,oDAAG,UACjBC,MAA+B,CAC0B,CACzD,GAAIC,yBAAwB,CAAG,CAAC,CAAC,CACjC,GAAID,MAAM,CAACE,eAAe,CAAE,CAC1BD,wBAAwB,CAAGE,sCAAsC,CAC/DH,MAAM,CAACE,eAAe,CACvB,CACH,CAEA,GAAI,CACF,+BAAwBE,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