Ingenico-ePayments / connect-sdk-dotnet

Ingenico Connect .NET Server SDK
https://docs.connect.worldline-solutions.com/documentation/sdk/server/dotnet/
MIT License
33 stars 16 forks source link

Error : unsupported_ogone_payment_platform_operation #4

Closed divanlinnow closed 4 years ago

divanlinnow commented 4 years ago

We are currently using version 2.34.0, but I can replicate both of these issues on the latest stable version 3.5.1 as well...

I get the same error when trying to update token and when trying to tokenize a payment request : UNSUPPORTED_OGONE_PAYMENT_PLATFORM_OPERATION

.NET Code :

var body = new TokenizePaymentRequest();
body.Alias = "SEPA";
var tokenResponse = await client.Merchant(merchantId).Payments().Tokenize(payment.Id, body);

Logs:

Error Id : UNSUPPORTED_OGONE_PAYMENT_PLATFORM_OPERATION
Category : CONNECT_PLATFORM_ERROR
Code : 1801
Message : The requested method is not available for the Ogone payment platform.
Ingenico.Connect.Sdk.ValidationException: the Ingenico ePayments platform returned an incorrect request error response
   at Ingenico.Connect.Sdk.Merchant.Payments.PaymentsClient.<Tokenize>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at PerSafe.PaymentProvider.PaymentManager.<UpdatePaymentDetails>d__19.MoveNext(); statusCode=BadRequest; responseBody='{
   "errorId" : "5ddba09d13ce6a29295f0912bdecc0c8",
   "errors" : [ {
      "code" : "1801",
      "id" : "UNSUPPORTED_OGONE_PAYMENT_PLATFORM_OPERATION",
      "category" : "CONNECT_PLATFORM_ERROR",
      "message" : "The requested method is not available for the Ogone payment platform.",
      "httpStatusCode" : 400
   } ]
}'

.NET Code :

UpdateTokenRequest body = new UpdateTokenRequest();
body.Card = card;
body.PaymentProductId = 3;
await client.Merchant(merchantId).Tokens().Update(token, body);

Logs:

Error Id : PARAMETER_NOT_FOUND_IN_REQUEST
Category : CONNECT_PLATFORM_ERROR
Code : 20000000
Message : PARAMETER_NOT_FOUND_IN_REQUEST
Ingenico.Connect.Sdk.ValidationException: the Ingenico ePayments platform returned an incorrect request error response
   at Ingenico.Connect.Sdk.Merchant.Tokens.TokensClient.<Update>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at PerSafe.PaymentProvider.PaymentManager.<UpdatePaymentDetails>d__19.MoveNext(); statusCode=BadRequest; responseBody='{
   "errorId" : "5ddb916f37d4435963208c7d7a07faf3",
   "errors" : [ {
      "code" : "20000000",
      "id" : "PARAMETER_NOT_FOUND_IN_REQUEST",
      "category" : "CONNECT_PLATFORM_ERROR",
      "propertyName" : "card.customer",
      "message" : "PARAMETER_NOT_FOUND_IN_REQUEST",
      "httpStatusCode" : 400
   } ]
}'
rob-spoor commented 4 years ago

Creating and updating tokens is currently not supported for the Ogone platform. If you open the API references and select OGONE in the "Documentation" dropdown, the available endpoints and request/response properties will only show what is available for Ogone. After selecting OGONE, you will notice that under Token, only "Get token" will remain.

The .NET SDK, as well as all other server-to-server SDKs, contains implementations for the full set of endpoints, that are available for the Ogone platform, the GlobalCollect platform, or both. Please use the API references as your main source of information, not the availability of methods.

divanlinnow commented 4 years ago

@rob-spoor OK, thanks, I will have a look at the Ogone documentation.