Invalid transaction attempt for cybersource gives error

Im using the SOAP toolkit API for cyber resources to complete the transaction. Transaction capture works fine, but whenever I try to cancel a transaction, I get a response code 246: "you requested a void for a transaction type that cannot be canceled." Why is this happening? I have included all the parameters required for the 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); 
+4
source share
2 answers

I am facing the same problem. Basically, error 246 means that capture information has already been sent to the payment processor . According to the Cybersource server release notes :

A transaction can only be canceled if we have not yet sent information to your processor. Usually we present this type of information to your processor once a day, so your window for successfully executing the void is relatively small. We will refuse your canceled request if we have already sent transaction information to the processor.

If you test the void in the Cybersource sandbox (like me), I think that what happens is because the sandbox is a test environment and payments are not actually sent to the payment processor, Cybersource processes the captures as if they were sent to the payment processor immediately, therefore null capture will never work in a sandbox environment.

However, I make several assumptions, and I could not find documentation to confirm this.

+4
source

Are you trying to make a return request, if so, then try ccCreditService Work Perfect if RequestID correct. Try ccCreditService to cancel the payment order.

0
source

Source: https://habr.com/ru/post/1440476/


All Articles