cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

directResponse delimiter

I'm using the Java SDK with CIM and doing a CREATE_CUSTOMER_PROFILE_TRANSACTION, like this (partial code):
 
PaymentTransaction paymentTransaction = PaymentTransaction.createPaymentTransaction();
paymentTransaction.setOrder(order);
 
// Create an auth capture txn request
net.authorize.cim.Transaction transaction = merchant.createCIMTransaction(TransactionType.CREATE_CUSTOMER_PROFILE_TRANSACTION);
transaction.setRefId(Long.toString(System.currentTimeMillis()));
transaction.setCustomerProfileId(charge.getCustomerProfileID());
transaction.setCustomerPaymentProfileId(charge.getPaymentProfileID());
paymentTransaction.setTransactionType(net.authorize.TransactionType.AUTH_CAPTURE);
transaction.setPaymentTransaction(paymentTransaction);
Transaction.setTransactionFieldDelimiter("|");
 
Result<Transaction> result = (Result<Transaction>)merchant.postTransaction(transaction);
 
The directResponse I get back is comma delimited (even though I did Transaction.setTransactionFieldDelimiter("|"):
 
<directResponse>1,1,1,This transaction has been approved.,KISO31,Y,2178661128,1001,,20.00,CC,auth_capture,1351110796941,First,Last,Test Firm, Inc.,3010 Cherry Lane,Atlanta,GA,30066,United States,919-221-9999,,email@mm.com,,,,,,,,,,,,,,1223B36ED34750FAA1D2FC147719F173,,2,,,,,,,,,,,XXXX2222,Visa,,,,,,,,,,,,,,,,</directResponse>


Obviously, this fails when any field has commas embedded (like my "Test Firm, Inc."), since the parser gets off (it thinks "Test Firm" is one field and "Inc." is the next) and then shows all subsequent fields in the wrong location in the responseMap. 

 
There's a vague reference to setting the delimiter in the Merchant interface but I can't find it. I'm using a sandbox account - what am I doing wrong? Or where can I set this? 

 

gregberger
Member
1 ACCEPTED SOLUTION

Accepted Solutions

It under Account - settings - Transaction Format Settings - Direct Response

View solution in original post

RaynorC1emen7
Expert
3 REPLIES 3

It under Account - settings - Transaction Format Settings - Direct Response

RaynorC1emen7
Expert

I'm going to tag this for our documentation team to look at making the instructions more clear on how to access these settings in the Merchant Interface (sandbox).

 

Richard

Geez...why is it that you can look right at something and not see it, but the moment you write it up you find it? Thanks for the quick response anyway guys...before I could update my post you guys beat me to it. 

 

There is still an issue with this...in the Java SDK net.authorize.data.cim.DirectResponse class there is a hardcoded comma delimiter:

 

public static final String RESPONSE_DELIMITER = ",";

 

So, if you change it in merchant interface to anything other than comma it'll still use a comma to tokenize - fail.

 

Luckily (or maybe unluckily), I've had to fix multiple issues with the Java SDK code so I just fixed this one too. My advice to anyone using the Java SDK - you might as well just import the source for it cause you're probably gonna need it...