Skip to content

Instantly share code, notes, and snippets.

@remcotolsma
Last active March 27, 2017 15:00
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 remcotolsma/d6257e299ab24908d9b9f14537b52a85 to your computer and use it in GitHub Desktop.
Save remcotolsma/d6257e299ab24908d9b9f14537b52a85 to your computer and use it in GitHub Desktop.
Gravity Forms, Pronamic iDEAL and SnelStart integration plugin.
<?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