import { PaymentRequestParams } from './index' ; const details = { total : { label : 'Total due' , amount : { currency : 'USD' , value : '22.15' } , } , } ; const getConfig = ( onShowFail ? , removeOptions ? ) => ( { methodData : [ { supportedMethods : [ 'basic-card' ] , data : { supportedNetworks : [ 'visa' ] , } , } ] , details : details , options : removeOptions ? undefined : { requestShipping : true , } , onShowSuccess : ( result , resolve , reject ) : void => { resolve ( ) ; } , onShowFail , onShippingAddressChange : ( request , resolve , reject ) : void => { resolve ( details ) ; } , onShippingOptionChange : ( request , resolve , reject ) : void => { resolve ( details ) ; } , onMerchantValidation : ( event ) : void => { event . complete ( Promise . resolve ( event . validationURL ) ) ; } , } ) as PaymentRequestParams ; export default getConfig ;