Esempio n. 1
0
/**
 * Send To Success Page
 *
 * Sends the user to the succes page.
 *
 * @param string $query_string
 *
 * @access      public
 * @since       1.0
 * @return      void
 */
function give_send_to_success_page($query_string = null)
{
    global $give_options;
    $redirect = give_get_success_page_uri();
    if ($query_string) {
        $redirect .= $query_string;
    }
    $gateway = isset($_REQUEST['give-gateway']) ? $_REQUEST['give-gateway'] : '';
    wp_redirect(apply_filters('give_success_page_redirect', $redirect, $gateway, $query_string));
    give_die();
}
Esempio n. 2
0
 /**
  * Payment redirect URL filter.
  *
  * @param string                  $url
  * @param Pronamic_WP_Pay_Payment $payment
  * @return string
  */
 public static function redirect_url($url, $payment)
 {
     switch ($payment->get_status()) {
         case Pronamic_WP_Pay_Statuses::CANCELLED:
             $url = give_get_failed_transaction_uri();
             break;
         case Pronamic_WP_Pay_Statuses::FAILURE:
             $url = give_get_failed_transaction_uri();
             break;
         case Pronamic_WP_Pay_Statuses::SUCCESS:
             $url = give_get_success_page_uri();
             break;
     }
     return $url;
 }
<?php

/**
 * Give Payment Processing Message
 */
?>
<div id="give-payment-processing">
	<p><?php 
printf(__('Your donation is processing. This page will reload automatically in 8 seconds. If it does not, click <a href="%s">here</a>.', 'give'), give_get_success_page_uri());
?>
	<span class="give-loading-animation"></span>
	<script type="text/javascript">setTimeout(function(){ window.location = '<?php 
echo give_get_success_page_uri();
?>
'; }, 8000);</script>
</div>
						<span class="give_purchase_status <?php 
            echo $post->post_status;
            ?>
"><?php 
            echo give_get_payment_status($post, true);
            ?>
</span>
						<a href="<?php 
            echo esc_url(add_query_arg('payment_key', give_get_payment_key($post->ID), give_get_success_page_uri()));
            ?>
">&raquo;</a>
					<?php 
        } else {
            ?>
						<a href="<?php 
            echo esc_url(add_query_arg('payment_key', give_get_payment_key($post->ID), give_get_success_page_uri()));
            ?>
"><?php 
            _e('View Details', 'give');
            ?>
</a>
					<?php 
        }
        ?>
				</td>
				<?php 
        do_action('give_purchase_history_row_end', $post->ID, $donation_data);
        ?>
			</tr>
		<?php 
    }