A new version of the GPWebpayNet v1.3.3 has been released. It contains following changes regarding to version v1.2.0.:
Possibility to set X509KeyStorageFlags arguments to be able to change them while creating X509Certificate2 instance. The change is not a breaking one because arguments are optional. For more details check IClientService.PostRequestAsync. IClientService.GenerateGPWebPayRedirectUrl.
This version update data type of property PaymentRequest.Amount from decimal to int. This decision was make to because specification does not require a concrete type, just an amount in cents, i.e. value $4.99 will be converted to 499. The next reason is to prevent misunderstanding of users, which happened twice.
Properties PaymentRequest.Description and PaymentRequest.MD are validated to fulfill specification requirements – an ASCII string with maximal length 255 characters. If such conditions are not satisfied, an exception InvalidPaymentRequestDataException is raised in PaymentRequestTransformer.GetParametersForDigestCalculation during request object transformation.
To have better overview of validation errors on GP server returned in properties PaymentResponse.PRCode and PaymentResponse.SRCode, a better error description is provided, while a PaymentResponseException is raised in ClientService.ProcessGPWebPayResponse. Exception message contains returned codes with particular description from official documentation. This feature was added because of SDK users for easier debugging.
Install it from NuGet via
Install-Package GPWebpayNet.Sdk -Version 1.3.3
Clone it on GitHub here.