Jump to content

Waqas Saeed

Member
  • Content Count

    53
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Waqas Saeed

  • Rank
    Member

Recent Profile Visitors

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

  1. Recently we have encountered a issue related to our Billing, the ResellerClub has decided to add the individual charges/fee for each account in Linux Reseller Hosting, therefore, we have many cPanel account and we weren't charging our client individually for cP license fee. so could you please help us understand the procedure so that we can do the following without disturbing their basic package hosting. - Forcefully add (cPanel Fee Add-on) in the next invoice , and also compulsory to all Shared products only (hosting) based on monthly, yearly, or biannually billing.
  2. my payment gateway does not return transaction_id in json response, What is the method to add the transaction_id, so there shouldn't be duplication if the callback URL is hit on the browser manually. WHMCS has a simple flow, it does not check if the invoice is paid, or unpaid, if the callback file is directly access it might be possible to add the same payment again if the transaction is different or no transaction id.
  3. the most simples question, do I have alternative to this, if WHMCS has some built-in function to check if the invoice is already paid and redirect to the URL ? $results = localAPI($command, $postData, $adminUsername); $getInvoice = $results['status']; if($getInvoice=="Paid") { ?> <script language="javascript"> window.location.replace("<?php echo $systemUrl.'viewinvoice.php?id='.$invoiceId.'&paymentsuccess=1' ?>"); </script> <?php } Another, What is the name of the function that check if the user belong to that invoice specifically.?
  4. Unfortunately that wasn't the issue due to the header, or window.location.replace, the gateway response to the callback file consist of 2 similar responses (HTTP response after successful payment, and Click Button with GET variables) that was actually duplicating the transaction_id, log transaction does not work for duplicated transaction id and freezes, I've added a localAPI that checks the invoice is Paid that does not execute AddPayment and redirects to the invoice page.
  5. Hello! I have a difficulty find out the reason. my code is mentioned below; the only problem am having is that the after payment is successful, the user is not redirected through php header; although have tried javascript redirect but unfortunately does not work after payment gateway send params to the callback file. however there is no problem in logs and payment. as mentioned above. code :: if ($status_api=="PAID"){ addInvoicePayment( $invoiceId, $transactionId, $paymentAmount, 0, $gatewayModuleName ); logTransaction($gatewayParams['name'], $response, "PAID"); header('Location: '.$systemUrl.'viewinvoice.php?id='.$invoiceId.'&paymentsuccess=1'); }
  6. Hello I'm improving the callback file, if possible, could you let me know hints on how to get the id from the response JSON. am able to get the Success using strpros in PHP but since the JSON is in a very different format am not able to understand it how to actually pull our the id from it. {"data": "Success \"c723d42a-c3ee-452c-940b-3d8e8b944868"} I need this. c723d42a-c3ee-452c-940b-3d8e8b944868 I'm using WHMCS___ SMS gateway module for SMS. For Success; I'm doing this : if(strpos($response,'Success')) { @steven99
  7. Yes that you have understood that now. What exactly I have the issue about. May I know if you share a post with example snippet that can make a custom session and then retrieve the session on the page2 (landing page), and it can determine if the session is true ? (For WHMCS), or if you can let me know that the pure PHP code can work also in WHMCS without using any specific library. or module.
  8. Thank you @steven99 for such an brief response. I admit that the gateway should have the transid for each transaction, unfortunately, the callback receive the response in GET method, that is likely unsecured too, the url can be tempered if left unsecured without API checks. yesterday after replying I tried check the SERVER REFERRER and able to find a solution with regular expression by comparing URL with the response HTTP referrer URL., it seems to be helpful returns false if the request is triggered by POSTMAN or browser. That is true, the variables, if not; at least transaction id should not added in the response params. Exactly, I' m really thankful to you for this, I appreciate your words. as it feel the file is secured and if I needed I will reply on this. Please refer me post in the community or snippet that can work in callback file.
  9. i have uploaded the reply in a link, there whmcs.community is showing error of 403 again and again
  10. https://privatebin.net/?f413213209b03aa7#5V53TYoskAdy1ujhMvFQR4xWw54tq3BWf6T5VozDRrPM 403 error again and again
  11. How do I create a session in gateway file and then retrieve the values in callback file. after redirecting to callback. Mainly, To do this https://www.w3schools.com/php/php_sessions.asp in WHMCS like dummies
  12. I'm using the 3rd party payment gateway has a callback file, however the callback file is not too much protected due to IPN response from the gateway, since I wanted to know if I can make the $CUSTOM_SESSION['invoice_id'] in view invoice as client page , then check the invoice id at callback file.
  13. Is there some has a example code that can create a cookie or session on viewinvoice.php and then after payment it can be matched on callback file. @Brains
  14. I will also prefer if someone in community response for it.
×
×
  • 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