Jump to content

AladdinJ

Member
  • Content Count

    81
  • Joined

  • Last visited

  • Days Won

    3

AladdinJ last won the day on January 14

AladdinJ had the most liked content!

Community Reputation

11 Good

1 Follower

About AladdinJ

  • Rank
    Member

Recent Profile Visitors

598 profile views
  1. it's seem whmcs files problem you may need to repleace all whmcs files with orginal files
  2. you will need to override this tpl file supportticketsubmit-confirm.tpl https://github.com/WHMCS/templates-twenty-one/blob/master/supportticketsubmit-confirm.tpl if you don't know how read about whmcs child theme here https://developers.whmcs.com/themes/child-themes/
  3. the cron job only creates the invoice your tpl job views the invoice, so in logic, there is should not be a problem .. I got an idea you make check what deffrence bitween invoice created by cron and another one in database so later you may can make hook to edit the invoce created by cron to fix it's problem
  4. <?php add_hook('AdminAreaClientSummaryPage', 1, function($vars) { return 'This message will be output on the Client Summary page. I can add HTML here'; }); I think this hook what you need
  5. I don't think so there is a module or plugin can do that unfortunately
  6. you may consider using third party paypal module , search at github
  7. it's looks like you are right, I never noticed that this module force payment subscription I don't know if there is a way to bypass this just tried normal created invoice no force for subscription appeart then I have compaired bitween inovice for hosting and normal invoice the differnece was in invoice item type of hosting set to hosting and empty in the normal created invoice if I edit that from phpmyadmin (deleted "hosting" word in phpmyadmin invoiceitem table) then no force for subscription when trying to pay (I was thinking we can do hook for that ) but the problem appear after paying the invoice without subscription in the step I did , then no autocreate happened for the hosting so I am sorry I don't have a solution for this now If I got anything I will tell you here ..
  8. you are right the file is ok this is straing problem have you put the pacage right in the product settings like this
  9. Hello, I have made a hook for you add_hook('EmailPreSend', 1, function($vars) { $merge_fields = []; foreach ($vars['mergefields']['service_custom_fields_by_name'] as $field) { if ($field['name'] == 'Operating system') { // consider 'Operating system' here $OperatingSystem = $field['value']; break; } } if ($OperatingSystem == "windows-server-2019") // consider "windows-server-2019" here { $merge_fields['service_password'] = "123123"; } return $merge_fields; }); consider the names of Operating system and windows-server-2019 to be as you have them on your website exactly and tell me if it worked with you
  10. try using PayPal module instead of PayPal Basic in PayPal I see the button appear inside whmcs
  11. it's looks like you have repleace bitween disk and bandwith check if you have edit tpl file for this page
  12. Hello @Kian I think you may create your custom API to cancel PayPal subscription at first you will create php file in this folder "includes/api" let's name it "cancelpaypalsubscription.php" I have made it for you <?php /* * @ Cancel Paypal Subscription * @ 2023/01/10 * @ By Aladdin Jiroun */ $whmcs = WHMCS\Application::getInstance(); use \WHMCS\Module\GatewaySetting; $subscriptionID = $whmcs->get_req_var("subscriptionID"); $apiusername = GatewaySetting::where('gateway', '=', 'paypal')->where('setting', '=', 'apiusername')->first()->value; $apipassword = GatewaySetting::where('gateway', '=', 'paypal')->where('setting', '=', 'apipassword')->first()->value; $apisignature = GatewaySetting::where('gateway', '=', 'paypal')->where('setting', '=', 'apisignature')->first()->value; $apiresults = array(); $url = "https://api-3t.paypal.com/nvp"; $postFields = array(); $postFields["BUTTONSOURCE"] = "WHMCS_WPP_DP"; $postFields["USER"] = $apiusername; $postFields["PWD"] = $apipassword; $postFields["SIGNATURE"] = $apisignature; $postFields["VERSION"] = "3.0"; $postFields["METHOD"] = "ManageRecurringPaymentsProfileStatus"; $postFields["PROFILEID"] = $subscriptionID; $postFields["ACTION"] = "Cancel"; $postFields["NOTE"] = "Automatic Subscription Cancellation"; $result = curlCall($url, $postFields); parse_str($result, $resultsArray); $resultsArray["PROFILEID"] = $subscriptionID; if (strtoupper($resultsArray["ACK"]) == "SUCCESS" && $resultsArray["PROFILEID"]) $apiresults = array("status" => "success", "rawdata" => $resultsArray); else $apiresults = array("status" => "error", "rawdata" => $resultsArray); then you can use this api inside whmcs like this $command = 'cancelpaypalsubscription'; $postData = array( 'subscriptionID' => 'XXXX', ); $results = localAPI($command, $postData);
×
×
  • 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