I'm currently in the process of building a custom payment provider for Realex Payments and I was just wondering how to tell TC to use a custom partial for the form, as it does for some of the built-in payment provider's (stripe etc.)?
Ultimately it comes down to the Payment Providers GenerateHtmlForm method. In there, you set the forms action to sent it to a page on your site, rather than to some third party provider. For example, this is the based stripe provider that redirects to a form_url, which is defined as a setting on the payment provider:
(The thing to understand here is that the GenerateHtmlForm method is called to generate essentially a hidden form with a "Next" button in it which usually goes on the confirmation page and sends you to the payment page, it's not the actual payment form itself)
Custom Payment Provider Form Partial
Hey,
I'm currently in the process of building a custom payment provider for Realex Payments and I was just wondering how to tell TC to use a custom partial for the form, as it does for some of the built-in payment provider's (stripe etc.)?
Cheers, Tom
Hi Tom,
Ultimately it comes down to the Payment Providers
GenerateHtmlForm
method. In there, you set the forms action to sent it to a page on your site, rather than to some third party provider. For example, this is the based stripe provider that redirects to aform_url
, which is defined as a setting on the payment provider:https://github.com/TeaCommerce/Payment-Providers/blob/master/Source/TeaCommerce.PaymentProviders/Inline/BaseStripeProvider.cs#L54
(The thing to understand here is that the
GenerateHtmlForm
method is called to generate essentially a hidden form with a "Next" button in it which usually goes on the confirmation page and sends you to the payment page, it's not the actual payment form itself)Hope this helps
Matt
Thanks, that makes sense now.
is working on a reply...