r/Wordpress • • Nov 03 '26

Elavon-WordPress Sync

Can anyone guide me on how to integrate the Elavon Payment Gateway with WordPress without relying on any third-party plugins or paid app subscriptions?

We only need a direct, synchronized connection between Elavon and WordPress to process payments.

If anyone has experience with Elavon API integration or can share relevant documentation, tutorials, or code references, it would be greatly appreciated.

Thanks in advance!

3 Upvotes

12 comments sorted by

1

u/TrainingChef5331 Nov 03 '26

Can you give more specifics as to what Data you want synchronized? Do you mean WooCommerce or a form engine to accept payments through Elevaon?

1

u/JstRandomUser Nov 03 '26

Want a form engine to accept payment after user enter details and submits then payment gateway to be open process the payment.

1

u/Mahmud_haisan 27d ago

If this is just a form payment rather than a WooCommerce checkout, you don't need WooCommerce for it.

A small custom plugin can handle the form submission, create the payment request on the server, and then open Elavon's hosted payment page or Lightbox.

I'd confirm the exact Elavon product first, though. The Converge flow mentioned above isn't interchangeable with every Elavon gateway integration.

One important detail: don't mark the form as paid just because the customer lands on a success URL. Verify the gateway response against the saved transaction reference and amount first.

Is the merchant account using Converge or Elavon Payment Gateway, and which country is it registered in?

2

u/JstRandomUser 24d ago

It is the Converge one

1

u/Mahmud_haisan 23d ago

Since it’s Converge, the flow Sabawaba1 described above is the right one. Two things I’d add for a form-based setup:

  1. Calculate the amount on the server from the submitted form values. Don’t read it from a hidden field. The amount goes into the session token request, so whatever the browser sends would otherwise become the charge.
  2. Save the entry as pending with your own reference before you open the Lightbox, and pass that reference to Converge. Then mark it paid only after your server has confirmed the transaction with Converge. Don’t rely on the redirect or the JavaScript callback alone.

Which form plugin are you using? Gravity Forms and WPForms both have submission hooks that make the “save as pending, then hand off to Converge” step straightforward.

2

u/JstRandomUser 23d ago

Using the Contact Form 7 for the form.

1

u/Mahmud_haisan 22d ago

CF7 works, but it has two gaps for this: it doesn’t save entries, and it sends its email before anyone has paid. Roughly how I’d wire it:

  1. wpcf7_before_send_mail: calculate the amount from the posted values, save a pending record (a custom post type is fine) with your own reference, then request the Converge session token on the server. If the token request fails, set $abort = true so the form shows an error instead of “sent”.
  2. wpcf7_feedback_response filter: add the token to CF7’s AJAX response.
  3. JS: listen for the wpcf7mailsent event, read the token from event.detail.apiResponse, and open the Lightbox with it.
  4. Skip CF7’s own email (skip_mail: on in the form’s Additional Settings, or the wpcf7_skip_mail filter) and send your notification yourself once the payment is confirmed. Otherwise you get “new order” emails for people who closed the Lightbox.

php

add_action( 'wpcf7_before_send_mail', function ( $form, &$abort, $submission ) {
    if ( 123 !== $form->id() ) {
        return;
    }
    $data   = $submission->get_posted_data();
    $amount = my_calculate_amount( $data );           // server-side only
    $ref    = my_save_pending_entry( $data, $amount );
    $token  = my_get_converge_token( $amount, $ref ); // wp_remote_post to Converge

    if ( ! $token ) {
        $abort = true;
        return;
    }
    $GLOBALS['my_converge_token'] = $token;
}, 10, 3 );

add_filter( 'wpcf7_feedback_response', function ( $response ) {
    if ( ! empty( $GLOBALS['my_converge_token'] ) ) {
        $response['converge_token'] = $GLOBALS['my_converge_token'];
    }
    return $response;
} );

The my_ functions are yours to write. Check Converge’s hosted payments docs for the exact token field names, and use their demo endpoint while testing. Then, as before, only mark the record paid after your server has confirmed the transaction with Converge.

2

u/TinyNiceWolf Nov 03 '26

I'm not sure what you mean by "synchronized", but Elavon's help page is here. It looks like you could just set up a payment page on Elavon, one you can access via a URL. Then on your WordPress site, you could just add a Pay Now button that links to that payment page, where the customer would enter their info and how much they want to pay.

If that's not what you're looking for, it might help if you describe in more detail what you need.

1

u/Sabawaba1 Nov 04 '26

Not sure "no plugins" is realistic unless you mean no paid ones. Whatever you write to talk to Elavon is a plugin by definition, it's just yours.

If that's ok, the normal route is Converge hosted payments. Your form posts to a small handler on your site, the handler calls the Converge API with your merchant id and user id to get a one time session token, then you redirect to their hosted page or open the Lightbox with that token. Card details never hit your server so PCI stays on the easy end. Elavon also has a free Converge plugin for WooCommerce if you go that way, which honestly beats hand rolling it for most sites.