Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure on charging recurring payment with stored credit card. #59

Open
SysmeticGitHub opened this issue Mar 21, 2022 · 1 comment
Open

Comments

@SysmeticGitHub
Copy link

The function that is failing in the API is "MapResponse()". The transaction has been approved and a successful response has been issued. But the XML response document does not contain a paymentmethoddetails section. But following code snippet from the MapResponse() fails is there is not a "paymentmethoddetails" section in the XML response. root.Get() does not return null for paymentMethodDetails, therefore we get an exception because paymentMethodDetails.Element is null

      var paymentMethodDetails = root.Get("paymentmethoddetails");
        if (paymentMethodDetails != null) {

            AlternativePaymentResponse alternativePaymentResponse = new AlternativePaymentResponse
            {
                BankAccount = paymentMethodDetails?.GetValue<string>("bankaccount"),
                AccountHolderName = paymentMethodDetails?.GetValue<string>("accountholdername"),
                Country = paymentMethodDetails?.GetValue<string>("country"),
                RedirectUrl = paymentMethodDetails?.GetValue<string>("redirecturl"),
                PaymentPurpose = paymentMethodDetails?.GetValue<string>("paymentpurpose"),
                PaymentMethod = paymentMethodDetails?.GetValue<string>("paymentmethod"),
            };
@cristina-nechita
Copy link

This was fixed in version 3.0.0 .
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants