Closed ghost closed 8 years ago
This is used using direct method like this:
return this.anet.sendTransactionRequest( body, function( transaction ) { return { authCode: transaction.authCode[ 0 ], _original: transaction, transactionId: transaction.transId[ 0 ], }; } ). catch( error => { console.log(error.message); throw new this.error( 'Error charging client', 'ESTR', error ); } );
How I solved that:
const body = { transactionType: 'authCaptureTransaction', amount: args.amount, profile: { customerProfileId: args.customerProfileId, paymentProfile: { paymentProfileId: args.customerPaymentProfileId }, shippingProfileId: args.customerShippingAddressId, }, transactionSettings: {setting: {settingName:'duplicateWindow', settingValue: 0} } };