Jump to content

Haithem_Tebib

Member
  • Posts

    7
  • Joined

  • Last visited

About Haithem_Tebib

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Haithem_Tebib's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. Hello, Actually, i've devlopped a payment gateway and everything works fine but i have an issue, when a client pay an invoice, the payment status doesn't update from incomplet to payed in the WHMCS server, Could you please help? thanks.
  2. Hello, Actually, i've developped a payment gateway using Third Party Gatewy module.The module works fine.The only problem i have that the payment gateway's callback doesnt work and when i try to display the callback'url "www.mydomain.com/modules/gateways/callback/gatewaymodule.php" the web browser displays error message that page doesnt work, so i want to make this url works. Could you please help to find a solution for this issue? thanks
  3. Thank you very much the payment gateway module works!
  4. the syntaxe is $Amount = number_format($params['Amount'], 3, '.', ''); My input: // Gateway Configuration Parameters $Numsite = $params['Numsite']; $Password = $params['Password']; $testMode = $params['testMode']; $orderId = time(); $VAD = $Params['VAD']; $Devise = $params['currency']; // $dropdownField = $params['dropdownField']; //$radioField = $params['radioField']; // $textareaField = $params['textareaField']; // Invoice Parameters $invoiceId = $params['invoiceid']; $description = $params["description"]; $Amount = number_format($params['Amount'], 3, '.', ''); $currencyCode = $params['currency']; // Client Parameters $firstname = $params['clientdetails']['firstname']; $lastname = $params['clientdetails']['lastname']; $email = $params['clientdetails']['email']; $address1 = $params['clientdetails']['address1']; $address2 = $params['clientdetails']['address2']; $city = $params['clientdetails']['city']; $state = $params['clientdetails']['state']; $postcode = $params['clientdetails']['postcode']; $country = $params['clientdetails']['country']; $phone = $params['clientdetails']['phonenumber']; // System Parameters $companyName = $params['companyname']; $systemUrl = $params['systemurl']; $returnUrl = $params['returnurl']; $langPayNow = $params['langpaynow']; $moduleDisplayName = $params['name']; $moduleName = $params['paymentmethod']; $whmcsVersion = $params['whmcsVersion']; $signture = sha1($Numsite . $Password . $orderId . number_format($Amount, 3, '.', '') . $Devise); $url = 'https://preprod.gpgcheckout.com/Paiement_test/Validation_paiement.php'; $postfields = array(); $postfields['order_id'] = $orderId; $postfields['invoice_id'] = $invoiceId; $postfields['username'] = $username; $postfields['description'] = $description; $postfields['Amount'] = number_format($Amount, 3, '.', ''); $postfields['currency'] = $currencyCode; $postfields['first_name'] = $firstname; $postfields['last_name'] = $lastname; $postfields['email'] = $email; $postfields['address1'] = $address1; $postfields['address2'] = $address2; $postfields['city'] = $city; $postfields['state'] = $state; $postfields['postcode'] = $postcode; $postfields['country'] = $country; $postfields['phone'] = $phone; $postfields['signture'] = sha1($Numsite . $Password . $orderId . $Amount . $Devise); $postfields['callback_url'] = $systemUrl . '/modules/gateways/callback/' . $moduleName . '.php'; $postfields['return_url'] = $returnUrl; my output: $htmlOutput = '<form method="post" action="' . $url . '">'; foreach ($postfields as $k => $v) { $htmlOutput .= '<input type="hidden" name="' . $k . '" value="' . urlencode($v) . '" />'; } $htmlOutput .= '<input type="hidden" name="NumSite" value="' . $Numsite . '">'; $htmlOutput .= '<input type="hidden" name="Password" value="' . md5($Password) . '">'; $htmlOutput .= '<input type="hidden" name="orderID" value="' . $orderId . '">'; $htmlOutput .= '<input type="hidden" name="Amount" value="' . $Amount . '">'; $htmlOutput .= '<input type="hidden" name="Currency" value="' . $Devise . '">'; $htmlOutput .= '<input type="hidden" name="CustFirstName" value="' . $firstname . '">'; $htmlOutput .= '<input type="hidden" name="CustLastName" value="' . $lastname . '">'; $htmlOutput .= '<input type="hidden" name="EMAIL" value="' . $email . '">'; $htmlOutput .= '<input type="hidden" name="CustAddress" value="' . $address1 . '">'; $htmlOutput .= '<input type="hidden" name="signature" value="' . $signture . '">'; $htmlOutput .= '<input type="submit" value="' . $langPayNow . '" />'; $htmlOutput .= '</form>'; return $htmlOutput; Many Thanks
  5. i applied the function number_format to the amout in the imput in the code like this: // Invoice Parameters $Amount = number_format($params['Amount'], 3, '.', ''); // System Parameters $postfields['Amount'] = number_format($Amount, 3, '.', ''); and this is my imput: unction gatewaymodule_link($params) { // Gateway Configuration Parameters $Numsite = $params['Numsite']; $Password = $params['Password']; $testMode = $params['testMode']; $orderId = time(); $VAD = $Params['VAD']; $Devise = $params['currency']; // $dropdownField = $params['dropdownField']; //$radioField = $params['radioField']; // $textareaField = $params['textareaField']; // Invoice Parameters $invoiceId = $params['invoiceid']; $description = $params["description"]; $Amount = number_format($params['Amount'], 3, '.', ''); $currencyCode = $params['currency']; // Client Parameters $firstname = $params['clientdetails']['firstname']; $lastname = $params['clientdetails']['lastname']; $email = $params['clientdetails']['email']; $address1 = $params['clientdetails']['address1']; $address2 = $params['clientdetails']['address2']; $city = $params['clientdetails']['city']; $state = $params['clientdetails']['state']; $postcode = $params['clientdetails']['postcode']; $country = $params['clientdetails']['country']; $phone = $params['clientdetails']['phonenumber']; // System Parameters $companyName = $params['companyname']; $systemUrl = $params['systemurl']; $returnUrl = $params['returnurl']; $langPayNow = $params['langpaynow']; $moduleDisplayName = $params['name']; $moduleName = $params['paymentmethod']; $whmcsVersion = $params['whmcsVersion']; $signture = sha1($Numsite . $Password . $orderId . number_format($Amount, 3, '.', '') . $Devise); $url = 'https://preprod.gpgcheckout.com/Paiement_test/Validation_paiement.php'; $postfields = array(); $postfields['order_id'] = $orderId; $postfields['invoice_id'] = $invoiceId; $postfields['username'] = $username; $postfields['description'] = $description; $postfields['Amount'] = number_format($Amount, 3, '.', ''); $postfields['currency'] = $currencyCode; $postfields['first_name'] = $firstname; $postfields['last_name'] = $lastname; $postfields['email'] = $email; $postfields['address1'] = $address1; $postfields['address2'] = $address2; $postfields['city'] = $city; $postfields['state'] = $state; $postfields['postcode'] = $postcode; $postfields['country'] = $country; $postfields['phone'] = $phone; $postfields['signture'] = sha1($Numsite . $Password . $orderId . $Amount . $Devise); $postfields['callback_url'] = $systemUrl . '/modules/gateways/callback/' . $moduleName . '.php'; $postfields['return_url'] = $returnUrl; and this is my output: $htmlOutput = '<form method="post" action="' . $url . '">'; foreach ($postfields as $k => $v) { $htmlOutput .= '<input type="hidden" name="' . $k . '" value="' . urlencode($v) . '" />'; } $htmlOutput .= '<input type="hidden" name="NumSite" value="' . $Numsite . '">'; $htmlOutput .= '<input type="hidden" name="Password" value="' . md5($Password) . '">'; $htmlOutput .= '<input type="hidden" name="orderID" value="' . $orderId . '">'; $htmlOutput .= '<input type="hidden" name="Amount" value="' . $Amount . '">'; $htmlOutput .= '<input type="hidden" name="Currency" value="' . $Devise . '">'; $htmlOutput .= '<input type="hidden" name="CustFirstName" value="' . $firstname . '">'; $htmlOutput .= '<input type="hidden" name="CustLastName" value="' . $lastname . '">'; $htmlOutput .= '<input type="hidden" name="EMAIL" value="' . $email . '">'; $htmlOutput .= '<input type="hidden" name="CustAddress" value="' . $address1 . '">'; $htmlOutput .= '<input type="hidden" name="signature" value="' . $signture . '">'; $htmlOutput .= '<input type="submit" value="' . $langPayNow . '" />'; $htmlOutput .= '</form>'; return $htmlOutput; Many thanks.
  6. Hello, Actually, 'm developping a payment gateway using Third Party Gatewy module.The module redirect successfully to the url of the payment gateway.The only problem i have that the payment gateway requires (xx.xxx) as amount's format to work and amount's format in the ivoice parameters of the WHMCS is (xx.xx) so i converted it with a php function number_format but it doesn't work.Could you please help to find a solution for this issue? thanks
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated