Last active
March 27, 2017 15:00
-
-
Save remcotolsma/d6257e299ab24908d9b9f14537b52a85 to your computer and use it in GitHub Desktop.
Gravity Forms, Pronamic iDEAL and SnelStart integration plugin.
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
<?php | |
/* | |
Plugin Name: Gravity Forms SnelStart | |
Plugin URI: | |
Description: | |
Version: 1.0.0 | |
Requires at least: 4.0 | |
Author: | |
Author URI: | |
Text Domain: gravityforms-snelstart | |
Domain Path: /languages/ | |
License: GPL | |
*/ | |
/** | |
* Gravity Forms iDEAL fulfillment hook. | |
* | |
* @see https://github.com/wp-pay-extensions/gravityforms/blob/1.6.4/src/Extension.php#L750-L751 | |
* @param array $entry | |
* @param Pronamic_WP_Pay_Extensions_GravityForms_PayFeed $feed | |
*/ | |
function custom_gform_ideal_fulfillment( $entry, $feed ) { | |
$payment_id = gform_get_meta( $entry['id'], 'pronamic_payment_id' ); | |
$payment = get_pronamic_payment( $payment_id ); | |
error_log( print_r( $payment, true ) ); | |
// @todo Create a SnelStart booking/invoice. | |
} | |
add_action( 'gform_ideal_fulfillment', 'custom_gform_ideal_fulfillment', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment