Im using cybersource SOAP toolkit API to perform transaction. Transaction capture works fine, but whenever I attempt to void a transaction Im getting response code 246 :"you requested a void for a type of transaction that cannot be voided" . Why is this happening? I have included all parameters required to Void transaction
RequestMessage request = new RequestMessage();
request.voidService = new VoidService();
request.voidService.run = "true";
request.voidService.voidRequestID = "value";
request.voidService.voidRequestToken = "value";
request.merchantID = "value";
request.merchantReferenceCode = "value";
TransactionProcessorClient proc = new TransactionProcessorClient();
proc.ChannelFactory.Credentials.UserName.UserName
= "merchantID";
proc.ChannelFactory.Credentials.UserName.Password
= "password";
ReplyMessage reply = proc.runTransaction(request);
I'm encountering the same problem. Basically, error 246 means that the capture information has already been sent to the payment processor . According to the Cybersource server release notes :
A transaction can be voided only if we have not already submitted the information to your processor. Usually we submit that type of information to your processor once a day, so your window for successfully performing a void is relatively small. We will decline your void request if we have already sent the transaction information to the processor.
If you're testing void on the Cybersource sandbox (as I am), I think what is happening is that since the sandbox is a test environment and payments are not actually sent to a payment processor, Cybersource treats captures as if they are sent to the payment processor immediately, so voiding a capture will never work on the sandbox environment.
However, I'm making a few assumptions and I couldn't find any documentation to validate this for certain.
Are you trying to make refund request if yes then try ccCreditService
Work Perfect if the RequestID
is correct. Try ccCreditService
for cancelling a payment order.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.