Closed sean-hill closed 9 years ago
This library defines transaction types as
this.transactionTypes = [ 'AuthOnly', 'AuthCapture', 'CaptureOnly', 'PriorAuthCapture', 'Refund', 'Void' ];
But in the createCustomerProfileTransaction this line of code prevents Refund or Void requests.
createCustomerProfileTransaction
Refund
Void
if (transactionType !== "AuthCapture" && transactionType !== "AuthOnly" && transactionType !== "CaptureOnly" && transactionType !== "PriorAuthCapture") { throw new Error('Invalid transactionType. Must be: AuthCapture, AuthOnly, CaptureOnly, or PriorAuthCapture'); }
This could be fixed by this code
if (this.transactionTypes.indexOf(transactionType) === -1) { throw new Error('Invalid transactionType. Must be: ' + this.transactionTypes.join(', ')); }
@durango if this could be fixed that'd be great!
Sorry for the delay! Things got in the way, thanks for the PR on this though. Really appreciate it.
This library defines transaction types as
But in the
createCustomerProfileTransaction
this line of code preventsRefund
orVoid
requests.This could be fixed by this code
@durango if this could be fixed that'd be great!