entry->get($entry_id); $total = 0; $email = ”; foreach ($form[‘fields’] as $field) { if (strtolower($field[‘name’]) === ‘total’) $total = floatval($field[‘value’]); if ($field[‘id’] == 5) $email = sanitize_email($field[‘value’]); } // Préparer le POST $postData = [ ‘userName’ => ‘0870669017’, ‘password’ => ‘d5cfdp6MD’, ‘orderNumber’ => “CMD” . $entry_id, ‘amount’ => $total * 100, ‘currency’ => 788, ‘returnUrl’ => ‘https://almanazeh.com/pfsv/’, ‘failUrl’ => ‘https://almanazeh.com/pfse/’, ‘clientEmail’ => $email, ]; $response = wp_remote_post(‘https://ipay.clictopay.com/payment/rest/register.do’, [ ‘body’ => http_build_query($postData), ‘timeout’ => 20, ]); $body = json_decode(wp_remote_retrieve_body($response), true); if (!empty($body[‘formUrl’])) { wp_safe_redirect($body[‘formUrl’]); exit; } else { wp_die(“Impossible de créer la commande de paiement.”); }
Accueil
A propos
Contact
© 2025 AL MANAZEH. Created with ❤️ using WordPress and
Kubio
[uwp_forgot]
✕
ALMANAZEH
GRATUIT
VOIR