From e61d8d3e8b4f6700b775ee456c7517b44890fe75 Mon Sep 17 00:00:00 2001 From: ChetanGN Date: Tue, 8 Sep 2020 15:53:46 +0530 Subject: [PATCH 1/2] Changed the text in callback page --- class-gf-razorpay.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/class-gf-razorpay.php b/class-gf-razorpay.php index ace1823..b06d288 100644 --- a/class-gf-razorpay.php +++ b/class-gf-razorpay.php @@ -355,6 +355,9 @@ public function post_callback($callback_action, $callback_result) $status = rgar($callback_action, 'type'); } + $ref_id = url_to_postid(wp_get_referer()); + $ref_title = $ref_id > 0 ? get_the_title($ref_id): "Gravity Form Page"; + if ($status === 'complete_payment') { do_action('gform_razorpay_complete_payment', $callback_action['transaction_id'], $callback_action['amount'], $entry, $feed); @@ -390,8 +393,8 @@ public function post_callback($callback_action, $callback_result) Transaction Date Amount -

Go back to the Form Page

-

Note: This page will automatically redirected to the Referrer page in seconds.

+

Go back to the

+

Note: This page will automatically redirected to the in seconds.

'; From a1d5ee8970d22957a25603e593d3b81f3b82f42b Mon Sep 17 00:00:00 2001 From: ChetanGN Date: Tue, 8 Sep 2020 16:30:47 +0530 Subject: [PATCH 2/2] Code clean up --- class-gf-razorpay.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/class-gf-razorpay.php b/class-gf-razorpay.php index b06d288..d134dfe 100644 --- a/class-gf-razorpay.php +++ b/class-gf-razorpay.php @@ -356,7 +356,7 @@ public function post_callback($callback_action, $callback_result) } $ref_id = url_to_postid(wp_get_referer()); - $ref_title = $ref_id > 0 ? get_the_title($ref_id): "Gravity Form Page"; + $ref_title = $ref_id > 0 ? get_the_title($ref_id): "Home"; if ($status === 'complete_payment') { @@ -393,8 +393,8 @@ public function post_callback($callback_action, $callback_result) Transaction Date Amount -

Go back to the

-

Note: This page will automatically redirected to the in seconds.

+

Go back to the page.

+

Note: This page will automatically redirected to the page in seconds.

';