Payment Form Path Error

J A asked on June 5, 2018 23:11

I have completed an upgrade to V11 and I have run into some issues with the Payment Gateway. I have this:

public override string GetPaymentDataFormPath() { return SettingsKeyInfoProvider.GetValue(SiteContext.CurrentSiteName + ".PaymentDataFormPath"); }

and I found https://devnet.kentico.com/documentation/api-changes/kentico-11/25753 but I am unsure how to implement this.

Recent Answers


Peter Mogilnitski answered on June 6, 2018 17:21 (last edited on June 6, 2018 17:25)

I suggest you take a look at Mapping gateway providers to forms

If we take look inside the shopping cart: CMSModules\Ecommerce\Controls\ShoppingCart\ShoppingCartPaymentGateway.ascx.cs

   // Add payment gateway custom data
        var provider = ShoppingCartControl.PaymentGatewayProvider;
        mPaymentDataForm = Service.Resolve<IPaymentGatewayFormFactory>().GetPaymentGatewayForm(provider, this);

You need to create your implementation of PaymentGatewayFormFactory and the service class will resolve it. Here is the example of Mapping the gateway provider to the form

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.