Reputation: 1949
How can I send a capture request to cybersource using hybris CIS payment. Below is the method I am using but it is giving me 102 as response code with reply message as
The following request field(s) is either invalid or missing: auth_request_id
I am able to see the capture request when I login to EBCtest but it does not have any details.
Below is the code which I am using, trying to capture the amount by hard coding the amount, transaction id and authorization ids
CisPaymentRequest cisPaymentRequest=new CisPaymentRequest();
//cisPaymentRequest.setParameters(new AnnotationHashMap(getAnnotationHashMap()));
cisPaymentRequest.setAmount(new BigDecimal(58.55));
cisPaymentRequest.setCurrency("USD");
final CisPaymentTransactionResult captureResult = getCisClientPaymentService().capture(CLIENT_REF, "single",new URI("https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor?auth_request_id=831000"),"D99OZS1FU15J", cisPaymentRequest);
Upvotes: 0
Views: 270
Reputation: 1949
Here is how it got resolved-
I changed the url and corrected the transaction id
Authorization ID
OLD - https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor?auth_request_id=831000
Correct- https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/831000
Transaction id
OLD - D99OZS1FU15J
Correct - 5512968196316020204007
CisPaymentRequest cisPaymentRequest=new CisPaymentRequest();
//cisPaymentRequest.setParameters(new AnnotationHashMap(getAnnotationHashMap()));
cisPaymentRequest.setAmount(new BigDecimal(58.55));
cisPaymentRequest.setCurrency("USD");
final CisPaymentTransactionResult captureResult = getCisClientPaymentService().capture(CLIENT_REF, "single",new URI("https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/831000"),"5512968196316020204007", cisPaymentRequest);
Upvotes: 0
Reputation: 404
The authorization request ID you are sending is invalid: auth_request_id=831000
Here is an example of a valid authorization request ID: 5499176942776634304004
The authorization request ID is returned by CyberSource in the response to an authorization request.
Upvotes: 1