public static function get_config($form_id) { if (!class_exists("GFPayPalData")) { require_once self::get_base_path() . "/data.php"; } //Getting paypal settings associated with this transaction $config = GFPayPalData::get_feed_by_form($form_id); //Ignore IPN messages from forms that are no longer configured with the PayPal add-on if (!$config) { return false; } return $config[0]; //only one feed per form is supported (left for backwards compatibility) }
public static function get_config_by_entry($entry) { $form_id = $entry["form_id"]; if (!class_exists("GFPayPalData")) { require_once self::get_base_path() . "/data.php"; } //Getting paypal settings associated with this transaction $paypal_config = GFPayPalData::get_feed_by_form($form_id); if (!is_array($paypal_config)) { return false; } else { //reading feed id from form meta $feed_id = gform_get_meta($entry["id"], "paypal_feed_id"); foreach ($paypal_config as $config) { if ($config["id"] == $feed_id) { return $config; } } } return false; }