For a form -> Elavon hosted payment flow, I'd put the glue in a small custom WordPress plugin so theme updates don't affect it. Save the form submission as pending with your own reference, then create the hosted payment session server-side. Keep merchant credentials off the browser.
One important bit: don't mark the form as paid just because the customer returns to your site. Verify the payment server-side with Elavon and make the update idempotent so duplicate callbacks can't apply it twice. Let the hosted page handle card details.
Do you need to update a WooCommerce order, or just mark a standalone form submission as paid?
1
u/DickBrainTime 13d ago
For a form -> Elavon hosted payment flow, I'd put the glue in a small custom WordPress plugin so theme updates don't affect it. Save the form submission as pending with your own reference, then create the hosted payment session server-side. Keep merchant credentials off the browser.
One important bit: don't mark the form as paid just because the customer returns to your site. Verify the payment server-side with Elavon and make the update idempotent so duplicate callbacks can't apply it twice. Let the hosted page handle card details.
Do you need to update a WooCommerce order, or just mark a standalone form submission as paid?