import Environment from '../common/environment' ; import Options from '../../common/options' ; import _Transaction from './transaction' ; import _MallTransaction from './mall_transaction' ; import IntegrationCommerceCodes from '../../common/integration_commerce_codes' ; import IntegrationApiKeys from '../../common/integration_api_keys' ; module WebpayPlus { /**
     * Contains methods used to create, commit, refund and capture Transactions.
     */ export const Transaction = _Transaction ; /**
     * Contains methods used to create, commit, refund and capture Mall Transactions.
     */ export const MallTransaction = _MallTransaction ; /**
     * Contains currently configured Commerce Code, Api Key and Environment
     */ export let options ; returns export const getDefaultOptions = ( ) => { return WebpayPlus . options ; } ; param _commerceCode param _apiKey export const configureForProduction = ( _commerceCode , _apiKey ) => { WebpayPlus . options = new Options ( _commerceCode , _apiKey , Environment . Production ) ; } ; param _commerceCode param _apiKey export const configureForIntegration = ( _commerceCode , _apiKey ) => { WebpayPlus . options = new Options ( _commerceCode , _apiKey , Environment . Integration ) ; } ; /**
     * This method configures the module to use Webpay Plus in the Integration environment.
     */ export const configureForTesting = ( ) => { WebpayPlus . options = new Options ( IntegrationCommerceCodes . WEBPAY_PLUS , IntegrationApiKeys . WEBPAY , Environment . Integration ) ; } ; /**
     * This method configures the module to use Webpay Plus Deferred in the Integration environment.
     */ export const configureForTestingDeferred = ( ) => { WebpayPlus . options = new Options ( IntegrationCommerceCodes . WEBPAY_PLUS_DEFERRED , IntegrationApiKeys . WEBPAY , Environment . Integration ) ; } ; /**
     * This method configures the module to use Webpay Plus Mall in the Integration environment.
     */ export const configureForTestingMall = ( ) => { WebpayPlus . options = new Options ( IntegrationCommerceCodes . WEBPAY_PLUS_MALL , IntegrationApiKeys . WEBPAY , Environment . Integration ) ; } ; /**
     * This method configures the module to use Webpay Plus Mall Deferred in the Integration environment.
     */ export const configureForTestingMallDeferred = ( ) => { WebpayPlus . options = new Options ( IntegrationCommerceCodes . WEBPAY_PLUS_MALL_DEFERRED , IntegrationApiKeys . WEBPAY , Environment . Integration ) ; } ; } export default WebpayPlus ;