Skip to content

Instantly share code, notes, and snippets.

@vanderwijk
Created December 23, 2021 13:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanderwijk/53065eab6f294d82a7fab6b73bcf5c9f to your computer and use it in GitHub Desktop.
Save vanderwijk/53065eab6f294d82a7fab6b73bcf5c9f to your computer and use it in GitHub Desktop.
Gravity forms Mollie payment status shortcode
function mollie_payment_status() {
if ( isset($_GET['entry_id']) ) {
$entry_id = $_GET['entry_id'];
$entry = GFAPI::get_entry( $entry_id );
//print_r ($entry);
$payment_status = rgar( $entry, 'payment_status' );
if ( $payment_status == 'Paid' ) {
return '<p>Bedankt voor uw aanmelding. Uw betaling is voltooid en u ontvangt spoedig een bevestigingsmail.</p>';
} else if ( $payment_status == 'Failed' ) {
return '<p>Uw betaling is mislukt. Probeert u het nogmaals of neem contact met ons op voor assistentie.</p>';
} else if ( $payment_status == 'Pending' ) {
return '<p>Bedankt voor uw aanmelding. Zodra uw betaling is verwerkt ontvangt u een bevestigingsmail.</p>';
}
}
}
add_shortcode( 'payment', 'mollie_payment_status' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment