Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tom Steer 161 posts 596 karma points
    Feb 19, 2019 @ 16:13
    Tom Steer
    0

    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

  • Matt Brailsford 2114 posts 10380 karma points MVP 5x c-trib
    Feb 19, 2019 @ 18:34
    Matt Brailsford
    100

    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 a form_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

  • Tom Steer 161 posts 596 karma points
    Feb 19, 2019 @ 22:02
    Tom Steer
    0

    Thanks, that makes sense now.

Please Sign in or register to post replies

Write your reply to:

Draft