Jump to content

sokalsondha

Members
  • Content count

    32
  • Joined

  • Last visited

Community Reputation

0 Neutral

About sokalsondha

  • Rank
    Newbie

Recent Profile Visitors

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

  1. hello my friends. how are you? i am having one major issue with my custom made payment gateway using sumup api. payment works fine. its marking the invoice paid too which works smoothly. but only the problem is after make successfull payment its not redirect to invoice page.. here is my callback file <?php session_start(); /* Gateway Module Name: Nexxus Payment Group Callback Description: Nexxus payment gateway module for WHMCS Version: 1.0 Author: Asif Iqbal Author URI: https://www.webwizo.com */ // Require libraries needed for gateway module functions. require_once __DIR__ . '/../../../init.php'; require_once __DIR__ . '/../../../includes/gatewayfunctions.php'; require_once __DIR__ . '/../../../includes/invoicefunctions.php'; // Detect module name from filename. $gatewayModuleName = basename(__FILE__, '.php'); // Fetch gateway configuration parameters. $gatewayParams = getGatewayVariables($gatewayModuleName); // Die if module is not active. if (!$gatewayParams['type']) { die("Module Not Activated"); } // Retrieve data returned in payment gateway callback // Varies per payment gateway $status = $_GET["status"]; $invoiceId = $_GET["invoice_id"]; $transactionId = $_GET["transactionId"]; $paymentAmount = $_GET["amount"]; $paymentFee = $_POST["x_fee"]; $transactionStatus = ucwords($status); /** * Validate Callback Invoice ID. * * Checks invoice ID is a valid invoice number. Note it will count an * invoice in any status as valid. * * Performs a die upon encountering an invalid Invoice ID. * * Returns a normalised invoice ID. */ $invoiceId = checkCbInvoiceID($invoiceId, $gatewayParams['name']); /** * Check Callback Transaction ID. * * Performs a check for any existing transactions with the same given * transaction number. * * Performs a die upon encountering a duplicate. */ checkCbTransID($transactionId); /** * Log Transaction. * * Add an entry to the Gateway Log for debugging purposes. * * The debug data can be a string or an array. In the case of an * array it will be * * @param string $gatewayName Display label * @param string|array $debugData Data to log * @param string $transactionStatus Status */ logTransaction($gatewayParams['name'], $_GET, $transactionStatus); if ($status == 'SUCCESSFULL') { /** * Add Invoice Payment. * * Applies a payment transaction entry to the given invoice ID. * * @param int $invoiceId Invoice ID * @param string $transactionId Transaction ID * @param float $paymentAmount Amount paid (defaults to full balance) * @param float $paymentFee Payment fee (optional) * @param string $gatewayModule Gateway module name */ addInvoicePayment( $invoiceId, $transactionId, $paymentAmount, $paymentFee, $gatewayModuleName ); }else{ addInvoicePayment( $invoiceId, $transactionId, $paymentAmount, $paymentFee, $gatewayModuleName ); header('Location:'.$_SESSION['return_url']); } can someone guide me with this? how to return to invoice page with success message thanks
  2. Dear everyone.. greetings from me. i just need some suggestion from the experts. currently i am in ireland and using my whmcs for irish market. so my currency is euro. and my website all the products shows as in euros. i am planning to start a brand for host in bangladesh where i am originally from but i have the different price set for bangladesh website.. just to let u know i made another website for bangladesh market. and in the website prices are set in BDT not in euro i am looking for some solution when a visitor visit bangladesh website and select the product it will be shows the product sets for bangladesh and price will shown BDT not in euros but when client from ireland will visit the website they will see euros.. i want to set euros as default. also like visitor from UK will see product sets for UK and price will shown in GBP. do i need hook make for this? or what thing i need to customise? or need some module? can someone help me with some suggestion? thanks in advance
  3. sokalsondha

    need help for a module for payment

    thanks every one.. i got solved the issue by made a module.. thanks again
  4. dear my friends.. thanks again for reading my post.. i dont know its very hard to find some whmcs developer.. i actually stuck here for a payment module. may be someone like to help me again.. What I need from you is... I want a manual payment gateway from you.. the plan is like after create the invoice when client will be click the button pay now it take them to a page where the page will be say thank you very much for your order. We will contact with you regarding the payment. And the module will send me a email that this client tried to pay me. But the invoice will remain unpaid. So after I will get the email I will edit the invoice and select the proper gateway for that invoice and I will contact with the client to pay the invoice by PayPal or stripe or whatever proper gateway. i know i can add some fake gateway from whmcs and i can see the unpaid invoice in my admin area.. but not everyone click on the pay now button. all i want who tried to pay me that person email address. so this is the only way i can find out who want to pay me.. so i can get notified in email and i will contact with the person.. i have made some layout of the gateway setting can someone really really help me with this.. i will be so pleased... thank you very much in advance
  5. sokalsondha

    2 whmcs in same domain

    hello community i need a big favour from you. i have whmcs installed in http://mydomain.com but 3 days before i create a sub directory http://mydomain.com/billing/ its working fine. but my existing client still have the old invoice template which is generated all the time. so what happened is they have email invoice with the invoice link http://mydomain.com/viewinvoice.php?id=xxxx but now when they click it its showing viewinvoice.php not find in the server error 404 page.. i want to keep my whmcs in the subdirectory folder called billing. but is there anyway i can use any hook or something so all my clients who have already invoice generated and got the invoice email if they click on the invoice link it will redirect to the new link like http://mydomain.com/billing/viewinvoice.php?id=xxxx please someone help please
  6. dear community how are you all? i have move my whmcs to a sub directory but i forgot to update the cron job link in the cpanel . as a result 2 days the invoice didnt generate.. can you please tell me is there any way i can do so the invoice can be generate for that 2 days... i dont want to loose the clients :( please help me thanksa million in advance
  7. sokalsondha

    want to remove menu item from the homepage

    thankssssssssssssssssss boss... i use the hook.. and works straight.. you just made my day 🙂 god bless you all the time 🙂
  8. sokalsondha

    want to remove menu item from the homepage

    superrrr. its works really nice.. but sir i stil see the View Cart button in homepage ... i want to remove that too.. can you please help me with that . which file i need to edit basically we dont want any one register by themself.. admin register client with product.. thanks again for wonderful help
  9. hello community hope we all doing well. i just need bit help if you can help me with that. i think i need a hock to remove some menu item from the homepage i need to remove the Store Menu item and the Announcement. can someone guide me with the hook so i can remove them 🙂 thanks in advance everyone 🙂
  10. sokalsondha

    Set next invoice date

    Hello community... I came back again. Can someone help me with my system. What happened is.. We sell yearly service. Let's say client bought service 01/04/2018 And his next due date is 31/03/2019. Now system generate invoice on 15/03/209 But he didn't paid. He decide to pay on may.. I knw the service will be suspended. But it's not a problem. Now if he pay on may .. I see his next due date will be 31/03/2020 not 01/05/2020 So he is loosing a month when he didn't used the service in April. Can we have a hook to update the next invoice date the customer paid+365 days? Please help me
  11. Hello Brian. Yes finally you get it correct. even i put tick or untick in the settings--> security Disable CC Storage. its not affecting anything with last 4 digit information because i am using stripe gateway. so its stripe token. and yes i want to get rid of that too.. is it possible with hook?
  12. thanks a million again brian. As you can see on the DOC because of its tokenised gateway its saving last 4 digit in my WHMCS. i think something with stripe thats forcing WHMCS to store the data. because after the payment i can see in my stripe that stripe save that payment as a new cusotmer of them. so they are pulling customer email address from WHMCS. so basically all i want any how not storing the card at all. so far i understand i need hook. is it possible you can help me with hook? so i can put this hook and after my client pay by stripe the card number will not be saved at all thnaks
  13. dear brian. this code worked. i can see the radio button ticked even i have save card details but unfortunately even the 1st radio button ticket my system still not showing the new card box to enter new CC. is there any chance any hook can i use so everytime customer pay with card its not even saving the last 4 digit of the card. as template file editing not helping me at all. waiting to hear from you soon brian 🙂
  14. thanks brian for support me again.. brian all i want hide this two radio button. and make the 1st radio button by default at any stage. even our system saved the last 4 digit of the card. but the radio button will be 1st one enabled. so clients can put CC details everytime. at least they will trust this the card is not saved anywhere. if i make a hook can you help me with the code of hook? or may be its more better is it possible to make a hook so the card details never saved in our whmcs server? then i know how to hide the radio buttons.. please help me brian.. either with hook to not store the cards at all or edit the tpl file make the 1st radio button default all the time 🙂
  15. hello community... i hope all are doing very well. today i came back again for a small help with an code. basically by default now whmcs store the last 4 digit of the Credit card number of stripe gateway. which i found less confident for our clients. so i found an idea to modify the creditcard.tpl and make the RADIO BUTTON default to ENTER NEW CARD DETAILS and i will hide the 2nd radio button. this way client will never see that their credit card 4 digit is stored.. basically even storing the 4 digit we can't do anything.. but you know the clients.... can someone guide me from this code what i should modify to make default to the 1st radio button even the card number is stored in the server {if $remotecode} <div id="frmRemoteCardProcess" class="text-center" align="center"> {$remotecode} <iframe name="ccframe" class="auth3d-area" width="90%" height="600" scrolling="auto" src="about:blank"></iframe> </div> <script language="javascript"> jQuery("#frmRemoteCardProcess").find("form:first").attr('target', 'ccframe'); setTimeout("autoSubmitFormByContainer('frmRemoteCardProcess')", 1000); </script> {else} <form id="frmPayment" method="post" action="creditcard.php" class="form-horizontal" role="form"> <input type="hidden" name="action" value="submit" /> <input type="hidden" name="invoiceid" value="{$invoiceid}" /> <div class="row"> <div class="col-md-7"> {if $errormessage} {include file="$template/includes/alert.tpl" type="error" errorshtml=$errormessage} {/if} <div class="col-sm-12"> <img width="100%" src="/templates/{$template}/img/stripelogo.png"> </div> <div class="alert alert-danger text-center gateway-errors hidden"></div> <div class="form-group"> <div class="col-sm-8 col-sm-offset-4"> <div class="radio"> <label> <input type="radio" name="ccinfo" value="new" onclick="showNewCardInputFields()"{if $ccinfo eq "new" || !$cardOnFile} checked{/if} /> {$LANG.creditcardenternewcard}</label> </label> </div> <div class="radio"> <label> <input type="radio" name="ccinfo" value="useexisting" onclick="hideNewCardInputFields()" {if $cardOnFile && $ccinfo neq "new"}checked{elseif !$cardOnFile}disabled{/if} /> {$LANG.creditcarduseexisting}{if $cardOnFile} ({$existingCardType}-{$existingCardLastFour}){/if} </label> </div> </div> </div> <div class="form-group{if $userDetailsValidationError} hidden{/if}" id="billingAddressSummary"> <label for="cctype" class="col-sm-4 control-label">{$LANG.billingAddress}</label> <div class="col-sm-6"> {if $companyname}{$companyname}{else}{$firstname} {$lastname}{/if} <button type="button" id="btnEditBillingAddress" onclick="editBillingAddress()" class="btn btn-default btn-sm"{if $cardOnFile} disabled="disabled"{/if}><i class="fa fa-edit"></i> {$LANG.change}</button><br /> {$address1}{if $address2}, {$address2}{/if}<br /> {$city}, {$state}, {$postcode}<br /> {$countryname} </div> </div> <div class="form-group cc-billing-address{if !$userDetailsValidationError} hidden{/if}"> <label for="inputFirstName" class="col-sm-4 control-label">{$LANG.clientareafirstname}</label> <div class="col-sm-6"> <input type="text" name="firstname" id="inputFirstName" value="{$firstname}" class="form-control" /> </div> </div> <div class="form-group cc-billing-address{if !$userDetailsValidationError} hidden{/if}"> <label for="inputLastName" class="col-sm-4 control-label">{$LANG.clientarealastname}</label> <div class="col-sm-6"> <input type="text" name="lastname" id="inputLastName" value="{$lastname}" class="form-control" /> </div> </div> <div class="form-group cc-billing-address{if !$userDetailsValidationError} hidden{/if}"> <label for="inputAddress1" class="col-sm-4 control-label">{$LANG.clientareaaddress1}</label> <div class="col-sm-6"> <input type="text" name="address1" id="inputAddress1" value="{$address1}" class="form-control" /> </div> </div> <div class="form-group cc-billing-address{if !$userDetailsValidationError} hidden{/if}"> <label for="inputAddress2" class="col-sm-4 control-label">{$LANG.clientareaaddress2}</label> <div class="col-sm-6"> <input type="text" name="address2" id="inputAddress2" value="{$address2}" class="form-control" /> </div> </div> <div class="form-group cc-billing-address{if !$userDetailsValidationError} hidden{/if}"> <label for="inputCity" class="col-sm-4 control-label">{$LANG.clientareacity}</label> <div class="col-sm-6"> <input type="text" name="city" id="inputCity" value="{$city}" class="form-control" /> </div> </div> <div class="form-group cc-billing-address{if !$userDetailsValidationError} hidden{/if}"> <label for="inputState" class="col-sm-4 control-label">{$LANG.clientareastate}</label> <div class="col-sm-6"> <input type="text" name="state" id="inputState" value="{$state}" class="form-control" /> </div> </div> <div class="form-group cc-billing-address{if !$userDetailsValidationError} hidden{/if}"> <label for="inputPostcode" class="col-sm-4 control-label">{$LANG.clientareapostcode}</label> <div class="col-sm-6"> <input type="text" name="postcode" id="inputPostcode" value="{$postcode}" class="form-control" /> </div> </div> <div class="form-group cc-billing-address{if !$userDetailsValidationError} hidden{/if}"> <label for="inputCountry" class="col-sm-4 control-label">{$LANG.clientareacountry}</label> <div class="col-sm-6"> {$countriesdropdown} </div> </div> <div class="form-group cc-billing-address{if !$userDetailsValidationError} hidden{/if}"> <label for="inputPhone" class="col-sm-4 control-label">{$LANG.clientareaphonenumber}</label> <div class="col-sm-6"> <input type="text" name="phonenumber" id="inputPhone" value="{$phonenumber}" class="form-control" /> </div> </div> <div class="form-group cc-details{if !$addingNewCard} hidden{/if}"> <label for="cctype" class="col-sm-4 control-label">{$LANG.creditcardcardtype}</label> <div class="col-sm-5"> <select name="cctype" id="cctype" class="form-control newccinfo"> {foreach from=$acceptedcctypes item=type} <option{if $cctype eq $type} selected{/if}> {$type} </option> {/foreach} </select> </div> </div> <div class="form-group cc-details{if !$addingNewCard} hidden{/if}"> <label for="inputCardNumber" class="col-sm-4 control-label">{$LANG.creditcardcardnumber}</label> <div class="col-sm-7"> <input type="tel" name="ccnumber" id="inputCardNumber" size="30" value="{if $ccnumber}{$ccnumber}{/if}" autocomplete="off" class="form-control newccinfo" /> </div> </div> {if $showccissuestart} <div class="form-group cc-details{if !$addingNewCard} hidden{/if}"> <label for="inputCardStart" class="col-sm-4 control-label">{$LANG.creditcardcardstart}</label> <div class="col-sm-8"> <select name="ccstartmonth" id="inputCardStart" class="form-control select-inline"> {foreach from=$months item=month} <option{if $ccstartmonth eq $month} selected{/if}>{$month}</option> {/foreach} </select> <select name="ccstartyear" id="inputCardStartYear" class="form-control select-inline"> {foreach from=$startyears item=year} <option{if $ccstartyear eq $year} selected{/if}>{$year}</option> {/foreach} </select> </div> </div> {/if} <div class="form-group cc-details{if !$addingNewCard} hidden{/if}"> <label for="inputCardExpiry" class="col-sm-4 control-label">{$LANG.creditcardcardexpires}</label> <div class="col-sm-8"> <select name="ccexpirymonth" id="inputCardExpiry" class="form-control select-inline"> {foreach from=$months item=month} <option{if $ccexpirymonth eq $month} selected{/if}>{$month}</option> {/foreach} </select> <select name="ccexpiryyear" id="inputCardExpiryYear" class="form-control select-inline"> {foreach from=$expiryyears item=year} <option{if $ccexpiryyear eq $year} selected{/if}>{$year}</option> {/foreach} </select> </div> </div> {if $showccissuestart} <div class="form-group cc-details{if !$addingNewCard} hidden{/if}"> <label for="inputIssueNum" class="col-sm-4 control-label">{$LANG.creditcardcardissuenum}</label> <div class="col-xs-2"> <input type="number" name="ccissuenum" id="inputIssueNum" value="{$ccissuenum}" class="form-control input-" /> </div> </div> {/if} <div class="form-group"> <label for="cctype" class="col-sm-4 control-label">{$LANG.creditcardcvvnumber}</label> <div class="col-sm-7"> <input type="number" name="cccvv" id="inputCardCvv" value="{$cccvv}" autocomplete="off" class="form-control input-inline input-inline-100" /> <button type="button" class="btn btn-link" data-toggle="popover" data-content="<img src='{$BASE_PATH_IMG}/ccv.gif' width='210' />"> {$LANG.creditcardcvvwhere} </button> </div> </div> {if $shownostore} <div class="form-group cc-details{if !$addingNewCard} hidden{/if}"> <div class="col-sm-offset-4 col-sm-8"> <div class="checkbox"> <label> <input type="checkbox" name="nostore" id="inputNoStore"> {$LANG.creditcardnostore} </label> </div> </div> </div> {/if} <div class="form-group"> <div class="text-center"> <button type="submit" class="btn btn-primary btn-lg" id="btnSubmit" value="{$LANG.submitpayment}"> <span class="pay-text">{$LANG.submitpayment}</span> <span class="click-text hidden">{$LANG.pleasewait}</span> </button> </div> </div> </div> <div class="col-md-5"> <div id="invoiceIdSummary" class="invoice-summary"> <h2 class="text-center">{$LANG.invoicenumber}{$invoiceid}</h2> <div class="invoice-summary-table"> <table class="table table-condensed"> <tr> <td class="text-center"><strong>{$LANG.invoicesdescription}</strong></td> <td width="150" class="text-center"><strong>{$LANG.invoicesamount}</strong></td> </tr> {foreach $invoiceitems as $item} <tr> <td>{$item.description}</td> <td class="text-center">{$item.amount}</td> </tr> {/foreach} <tr> <td class="total-row text-right">{$LANG.invoicessubtotal}</td> <td class="total-row text-center">{$invoice.subtotal}</td> </tr> {if $invoice.taxrate} <tr> <td class="total-row text-right">{$invoice.taxrate}% {$invoice.taxname}</td> <td class="total-row text-center">{$invoice.tax}</td> </tr> {/if} {if $invoice.taxrate2} <tr> <td class="total-row text-right">{$invoice.taxrate2}% {$invoice.taxname2}</td> <td class="total-row text-center">{$invoice.tax2}</td> </tr> {/if} <tr> <td class="total-row text-right">{$LANG.invoicescredit}</td> <td class="total-row text-center">{$invoice.credit}</td> </tr> <tr> <td class="total-row text-right">{$LANG.invoicestotaldue}</td> <td class="total-row text-center">{$invoice.total}</td> </tr> </table> </div> <p class="text-center"> {$LANG.paymentstodate}: <strong>{$invoice.amountpaid}</strong><br /> {$LANG.balancedue}: <strong>{$balance}</strong> </p> </div> </div> </div> <div class="alert alert-warning" role="alert"> <i class="fa fa-lock"></i> &nbsp; {$LANG.creditcardsecuritynotice} </div> </form> {/if} thanks very much to everyone for reading my post... Mahim
×

Important Information

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