Added visualisation

Added return and cancel URL's
This commit is contained in:
2025-09-28 02:29:07 +02:00
parent bc3b86b705
commit a866801535
22 changed files with 2133 additions and 553 deletions

View File

@@ -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