Created
December 23, 2021 13:16
-
-
Save vanderwijk/53065eab6f294d82a7fab6b73bcf5c9f to your computer and use it in GitHub Desktop.
Gravity forms Mollie payment status shortcode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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