Added visualisation
Added return and cancel URL's
This commit is contained in:
@@ -137,14 +137,22 @@ class WC_Aluxpay_Payment_Gateway extends WC_Payment_Gateway {
|
||||
*/
|
||||
private function get_payment_redirect_url($order) {
|
||||
|
||||
// Build description without special characters OR encode it
|
||||
$description = sprintf(
|
||||
__('Order %s from %s', 'aluxpay-payment-gateway'),
|
||||
$order->get_id(),
|
||||
get_bloginfo('name')
|
||||
);
|
||||
|
||||
$params = array(
|
||||
'wc_order_id' => $order->get_id(),
|
||||
'total' => $order->get_total(),
|
||||
'currency' => $order->get_currency(),
|
||||
'description' => sprintf(__('Order #%s from %s', 'aluxpay-payment-gateway'), $order->get_id(), get_bloginfo('name')),
|
||||
'description' => $description,
|
||||
'customer_email' => $order->get_billing_email(),
|
||||
'return_url' => $this->get_return_url($order),
|
||||
'cancel_url' => wc_get_checkout_url(),
|
||||
'_wpnonce' => wp_create_nonce('cpg_payment_' . $order->get_id()),
|
||||
);
|
||||
|
||||
// Add nonce for security
|
||||
|
||||
Reference in New Issue
Block a user