Hi,
We are using this SDK, version 10.0.5, and we are facing an odd behavior. Let me describe our environment:
We have a worker that is a NServiceBus endpoint that handle our messages in the payment microservice.
We receive several messages/commands that are handled by the NServiceBus and start processing the payment using the GlobalPayments SDK.
For some reason, in very specific cases, the Idempotency Key is being changed but another.
Here is how we start a transaction:
// sample data start
var amount = 10.01M;
var transactionReference = 'some-unique-string';
var policyNumber = 'customer-id-in-our-end';
// sample data end
var transaction = card.Charge(amount)
.WithIdempotencyKey(transactionReference)
.WithClientTransactionId(transactionReference)
.WithDescription(transactionReference)
.WithCurrency("EUR")
.WithOrderId(policyNumber);
var chargeTransaction = transaction.Execute();
Assuming that the transactionReference is used as parameter to:
- WithIdempotencyKey
- WithClientTransactionId
- WithDescription
We expect that any case where we have that value in one of the 3 properties, it should be the same for all of them.
This is the behavior in most of cases (99.99%), but in a very few cases, when we have a HTTP error in a first attempt, the SDK is overriding the Idempotency Key with a different value (that is also valid, for another transaction).
This is causing us to charge the card twice, with same data, except by the Idempotency Key.
Here are two Order Ids that have the same Description and same Client Transaction ID but were issued using a different Idempotency Key:
TRN_kLEAeEaU48xDV4XeeIiExnxkuMwZTm_55-2-2-HME-2
TRN_jK0PpCVKqMFjr0Eei1XEDIVey1gFI6_55-2-2-HME-2
CC: @ivanl-out
Hi,
We are using this SDK, version 10.0.5, and we are facing an odd behavior. Let me describe our environment:
We have a worker that is a
NServiceBus endpointthat handle our messages in the payment microservice.We receive several messages/commands that are handled by the NServiceBus and start processing the payment using the GlobalPayments SDK.
For some reason, in very specific cases, the Idempotency Key is being changed but another.
Here is how we start a transaction:
Assuming that the
transactionReferenceis used as parameter to:We expect that any case where we have that value in one of the 3 properties, it should be the same for all of them.
This is the behavior in most of cases (99.99%), but in a very few cases, when we have a HTTP error in a first attempt, the SDK is overriding the Idempotency Key with a different value (that is also valid, for another transaction).
This is causing us to charge the card twice, with same data, except by the Idempotency Key.
Here are two Order Ids that have the same
Descriptionand sameClient Transaction IDbut were issued using a differentIdempotency Key:CC: @ivanl-out