Changeset 2888184
- Timestamp:
- 03/28/2023 09:06:07 AM (3 years ago)
- Location:
- swipe-for-gravity-forms/trunk
- Files:
-
- 4 edited
-
README.md (modified) (2 diffs)
-
includes/class-swipego-gf-gateway.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
swipego-gf.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
swipe-for-gravity-forms/trunk/README.md
r2876620 r2888184 4 4 Requires at least: 4.6 5 5 Tested up to: 6.0.1 6 Stable tag: 1.0. 46 Stable tag: 1.0.5 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 26 26 ## Changelog 27 27 28 1.0.5 - 2023-03-28 29 - Add event for success and fail 30 28 31 1.0.4 - 2023-03-08 29 32 - Fix add email -
swipe-for-gravity-forms/trunk/includes/class-swipego-gf-gateway.php
r2876620 r2888184 468 468 if ($type == 'complete_payment') { 469 469 $form = GFAPI::get_form( $entry['form_id'] ); 470 $notifications = $this->get_notifications_to_send($form); 471 GFCommon::send_notifications($notifications, $form, $entry, true, 'form_submission'); 470 471 // notify to event complete payment 472 $notifications = $this->get_notifications_to_send($form, 'complete_payment'); 473 GFCommon::send_notifications($notifications, $form, $entry, true, 'complete_payment'); 474 } 475 476 if ($type == 'fail_payment') { 477 $form = GFAPI::get_form( $entry['form_id'] ); 478 479 // notify to event fail payment 480 $notifications = $this->get_notifications_to_send($form, 'fail_payment'); 481 GFCommon::send_notifications($notifications, $form, $entry, true, 'fail_payment'); 472 482 } 473 483 … … 485 495 } 486 496 487 public function get_notifications_to_send($form )497 public function get_notifications_to_send($form, $status) 488 498 { 489 499 $notifications_to_send = array(); 490 500 491 501 foreach ($form['notifications'] as $notification) { 492 if (rgar($notification, 'event') != 'form_submission') {502 if (rgar($notification, 'event') != $status) { 493 503 continue; 494 504 } -
swipe-for-gravity-forms/trunk/readme.txt
r2876620 r2888184 4 4 Requires at least: 4.6 5 5 Tested up to: 6.0.1 6 Stable tag: 1.0. 46 Stable tag: 1.0.5 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 91 91 92 92 == Changelog == 93 = 1.0.5 - 2023-03-28 94 - Add event for success and fail 93 95 94 96 = 1.0.4 - 2023-03-08 = -
swipe-for-gravity-forms/trunk/swipego-gf.php
r2876620 r2888184 3 3 * Plugin Name: Swipe for Gravity Forms 4 4 * Description: Swipe payment integration for Gravity Forms. 5 * Version: 1.0. 45 * Version: 1.0.5 6 6 * Requires at least: 4.6 7 7 * Requires PHP: 7.0
Note: See TracChangeset
for help on using the changeset viewer.