Support for Crypto Plugins?

один месяц назад
Hi, all,

Is there any reason that Crypto payment plugins are no longer supported with NopCommerce?

Is the Crypto.com plugin still available for support, I downloaded a copy from GitHub, but there is an error starting the plugin.

Nop.Plugin.Payments.Crypto.Models.ApiException: Error when calling 'CreatePaymentAsync'. HTTP status code - 500. Unexpected character encountered while parsing value: {. Path 'error.param', line 1, position 113.
   at Nop.Plugin.Payments.Crypto.Services.BaseHttpClient.CallAsync[TResponse](Func`1 requestFunc, String callerName)
   at Nop.Plugin.Payments.Crypto.Services.DefaultPaymentInfoFactory.CreatePaymentInfoAsync()


This has been reported as an issue on GitHub.
один месяц назад
I can't comment on why " no longer supported " by the team, since the GitHub version if for 4.50.
Also, the issue you created indicates you're using 4.40.

The error seems to indicate a problem parsing the JSON.  I think you'll need to debug it in Visual Studio.
один месяц назад
many thanks, when I say no longer support, I mean the plugin is no longer on the marketplace for download. Will debug and take a look.
один месяц назад
I managed to get the plugin to work, the issue was that in the request object, the MetaData was null. I have no idea what this is for, but I created a dummy entry with the code below in the CreatePaymentAsync method.

 request.MetaData = new System.Collections.Generic.Dictionary<string, string>();
request.MetaData.Add("A", "B");


I am unfamiliar with plugin development, but the original error message is:

{"error":{"type":"invalid_request_error","code":"invalid_parameter","error_message":"invalid parameter","param":{"metadata":["must be a hash"]}}}


description
metadata
customer-id

I Will test in a sandbox, but I think these values are required, any pointers would be appreciated.

один месяц назад
The code needed to be updated for refunds also, hope it helps someone.,

 public Task<RefundResponse> CreateRefundAsync(CreateRefundRequest request)
        {
            if (request == null)
                throw new ArgumentNullException(nameof(request));

            request.Description = "Refunded by ClickAlgo.com as per customers request";

            return PostAsync<RefundResponse>(Defaults.Api.Endpoints.RefundPath, request);
        }