Skip to content

Commit

Permalink
Merge pull request #35 from razorpay/fix_redirect_page_title
Browse files Browse the repository at this point in the history
Changed the text in callback page
  • Loading branch information
ChetanGN authored Sep 8, 2020
2 parents 7564841 + a1d5ee8 commit ce5bfb5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions class-gf-razorpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -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): "Home";

if ($status === 'complete_payment')
{
do_action('gform_razorpay_complete_payment', $callback_action['transaction_id'], $callback_action['amount'], $entry, $feed);
Expand Down Expand Up @@ -390,8 +393,8 @@ public function post_callback($callback_action, $callback_result)
<tr class="item"> <td> Transaction Date </td><td> <?php echo date("F j, Y"); ?> </td></tr>
<tr class="item last"> <td> Amount </td><td> <?php echo $amount ?> </td></tr>
</table>
<p style="font-size:17px;text-align:center;">Go back to the <strong><a href="<?php echo wp_get_referer(); ?>">Form Page</a></strong> </p>
<p style="font-size:17px;text-align:center;"><strong>Note:</strong> This page will automatically redirected to the <strong>Referrer page</strong> in <span id="rzp_refresh_timer"></span> seconds.</p>
<p style="font-size:17px;text-align:center;">Go back to the <strong><a href="<?php echo wp_get_referer(); ?>"><?php echo $ref_title; ?></a></strong> page. </p>
<p style="font-size:17px;text-align:center;"><strong>Note:</strong> This page will automatically redirected to the <strong><?php echo $ref_title; ?></strong> page in <span id="rzp_refresh_timer"></span> seconds.</p>
<progress style = "margin-left: 40%;" value="0" max="10" id="progressBar"></progress>
</div>
</body>';
Expand Down

0 comments on commit ce5bfb5

Please sign in to comment.