Jump to content
Anu

Error adding Auto money to account at the end of a payment

Recommended Posts

My Payment Gateway only supports LKR Cash

Client registration on my website is allowed in USD (not allowed in LKR)

Product prices on my website are in USD.

Therefore, from the Payment Gateway Settings, I have selected Convert To For Processing as LKR.

After making the payment related to the payment gateway, the amount made in LKR will be invoiced in USD

For example My site is priced at $ 2.94 with Web Hosting, which is 1097 LKR.

if a payment of LKR 1097 is made, it will be noted on the invoice as USD 1097

That amount is deducted $ 2.94 and added to the account as a $ 1067 Credit Balance. This is a big problem for us

See the invoice below

12.png.4ab21ce257867056ecbf4032572c2a44.png

Below is the Gateway Transaction Log

Gateway-Transaction-Log.thumb.png.873b92d47cf4332d1b702e515631ab5e.png

Help us fix this

Thanks everyone
 

Share this post


Link to post
Share on other sites
2 minutes ago, pRieStaKos said:

Hello, 

What's the chosen Currency o Client's Profile ?

Client's profile contains USD currency.

Share this post


Link to post
Share on other sites

What’s the payment gateway ? You can set the currency to be LKR always with code, if there is no option for this.

Share this post


Link to post
Share on other sites
1 hour ago, pRieStaKos said:

What’s the payment gateway ? You can set the currency to be LKR always with code, if there is no option for this.

Yes, this problem does not occur if the profile is changed to LKR.

Then when the exchange rates change the price of LKR in the profile does not change. It's a big problem. I googled a solution to it and searched for about 10 days but could not find it. I limited my registration to USD. Do you know the solution?

I use the ipay.lk payment gateway in Sri Lanka

Share this post


Link to post
Share on other sites
8 minutes ago, Anu said:

Yes, this problem does not occur if the profile is changed to LKR.

Then when the exchange rates change the price of LKR in the profile does not change. It's a big problem. I googled a solution to it and searched for about 10 days but could not find it. I limited my registration to USD. Do you know the solution?

I use the ipay.lk payment gateway in Sri Lanka

Is this a commercial module ?

Share this post


Link to post
Share on other sites
2 minutes ago, pRieStaKos said:

Is this a commercial module ?

The module was created by one of our team

Share this post


Link to post
Share on other sites
Posted (edited)
26 minutes ago, Anu said:

The module was created by one of our team

Ok. Then you can use convertCurrency() to change the amount before pushing it to your gateway.

$userCurrency = getCurrency($invoice->clientId);
$paymentCurrencyID = WHMCS\Database\Capsule::table("tblcurrencies")->where("code", "LKR")->value("id"); 
$total = convertCurrency($invoice->total, $userCurrency["id"], $paymentCurrencyID);

 

Edited by pRieStaKos

Share this post


Link to post
Share on other sites
46 minutes ago, pRieStaKos said:

Ok. Then you can use convertCurrency() to change the amount before pushing it to your gateway.


$userCurrency = getCurrency($invoice->clientId);
$paymentCurrencyID = WHMCS\Database\Capsule::table("tblcurrencies")->where("code", "LKR")->value("id"); 
$total = convertCurrency($invoice->total, $userCurrency["id"], $paymentCurrencyID);

 

Did you mean, this?

WHMCS-Payment-Gateways.thumb.png.595872c2a6eb904d2a043b57a3412a1d.png

I have chosen it as LKR and then this problem of theirs comes up

Share this post


Link to post
Share on other sites
Posted (edited)
23 hours ago, pRieStaKos said:

So this is not working as expected.

I found my problem. The callback currency comes from LKR which is why I have this problem.

Is there a way to convert callback currency to USD? Like a code

Edited by Anu

Share this post


Link to post
Share on other sites
9 minutes ago, Anu said:

I found my problem. The callback currency comes from LKR which is why I have this problem.

Is there a way to convert callback currency to USD? Like a code

Same function, different currency id 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Similar Content

    • By WGS
      We are thrilled to announce that we are launching the HostX V2.2.2 version. Below are the new features & updates of the HostX theme.


      New Feature Added =>

      => New navigation introduced.
      => Font awesome 5 menu icon introduced.
      => New footer design.
      => Another new colour scheme added.
      => Setting for currency format over dynamic pricing blocks.

      New Blocks Added=>

      => Top rated reviews block added.
      => Price comparison block added.
      => New pricing block for dynamic product listing.

      Product URL : https://whmcsglobalservices.com/webhosting-template/hostx-whmcs-theme-template/
       





    • By Tebo
      I have active accounts that I do not want to be suspended and then deleted, how can I configure that and where should I do it
    • By Cloud Matrix
      Hi there,
      I trust you are well.

      I am using the payment gateway https://github.com/PayFast/mod-whmcs.
      The callback refuses to work for manual payments since latest update.
      The original developers at the company called PayFast have been unable to find the problem.

      Willing to pay for a solution to the issue.
    • By ModulesGarden
      1. Inactive Account Manager For cPanel 1.1.0 - 20% OFF!

      We have a confession to make... The vision for Inactive Account Manager For cPanel wasn't originally born in our own heads. It comes 100% from real-life needs that our customers have shared with us, especially in light of the dramatic licensing cost increase that cPanel introduced a while ago.

      We felt it would only be fair if the module continues that sophisticated trend, and its next update will also be built on the basis of the most pressing customer expectations. This is how the 1.1.0 version was brought to the world, enhanced in particular with the following possibilities:
      Your resellers are now empowered to ignore, suspend or terminate inactive accounts in the same way you have been doing it so far. You are now allowed to manage the "Ignored Accounts" list by removing any account that was previously added to it. We fully understand that this short release announcement may not answer all your questions about this module - that's why we invite all those interested in Inactive Account Manager For cPanel straight to its changelog!




      2. Payment Gateway Charges For WHMCS 2.2.0

      But today is not all about cPanel, as we have the pleasure of introducing one more fine-tuned product - Payment Gateway Charges For WHMCS that turns the management of custom gateway features into a completely trouble-free routine.

      The noteworthy 2.2.0 update, that labels the module as perfectly compatible with WHMCS V8.4, brings into being several significant components, such as the possibility to copy the billing rules along with their conditions freely between specified gateways.

      Step by the module’s changelog to see point by point what else has undergo improvement!




      3. EasyDCIM v1.8.3 w/ Mass Add & Import Tool

      We bet no one needs to be told how frustrating it may be when, despite your best efforts, you end up having not enough time to finish all the tasks on your daily to-do list. Knowing that the work will start piling up sooner or later forces you to think outside the box - and this is exactly the moment when you should consider using EasyDCIM.

      The platform's most recent 1.8.3 update is a tribute to effective time management in your data center - primarily thanks to an all-new toolkit dedicated exclusively to bulk addition and import of inventory elements.

      What should also be duly highlighted is the freshly implemented "Chart.js" graph driver, followed by a hefty number of 13 new graph types that allow you to quickly track such important factors as the Aggregate Traffic, Network Traffic, Power Usage, or Ping.

      Go to the EasyDCIM Blog to read more about the refreshing shake-up in device management!




      4. Let us also make a special and well-deserved mention of other most recent updates:
      Multibrand For WHMCS - v2.9.2 Proxmox VE VPS For WHMCS - v3.4.1 Proxmox VE Cloud VPS For WHMCS - v3.4.1 SolusVM Extended VPS For WHMCS - v1.10.3 SolusVM Extended Cloud For WHMCS – v1.10.3


      Need Custom Software Development For Your Business?
      Get Your Free Quote Now! Specially for you we will adapt an application and its design to your own needs, create a new module or even a completely new system built from scratch!
    • By crispy24
      Hi,
      On our platform we have the pricing in a certain currency, but on the checkout page, if the client is not registered yet in our system, we want to force the currency to be changed to another one in which we normally invoice products and we did that in older versions of WHMCS by only letting the client select the invoicing currency from the dropdown on the registration form by hiding the other currency. In the earlier versions of WHMCS I used a similar code like the one below from a post from the WHMCS community on the register and the checkout page (if the client would register on that page) to hide a currency and only let the clients choose a certain currency for invoicing, but in the 21 version in the child theme I can't seem to get it to work (I also tried in the parent theme and it didn't show up there either), but only in the checkout.tpl. In the normal register.tpl page it works with the first code below, which I used in the earlier versions of WHMCS. I tried putting the code where the custom fields show up on the page, at the top of the page, outside "if's" etc. but to no avail... The field won't show up whatever I try. I also cleared the template cache multiple times, but I don't know what I'm doing wrong. For example I'd want EUR as the only available option on the checkout registration page and these are two versions of the code that I used:
      {if $currencies} <div class="col-sm-6"> <label for="inputCurrency">Choose currency</label> <div class="form-group prepend-icon"> <label for="inputCurrency" class="field-icon"> <i class="far fa-money-bill-alt"></i> </label> <select id="inputCurrency" name="currency" class="field form-control"> {foreach $currencies as $curr} {if $curr.code eq 'EUR'} <option value="{$curr.id}"{if !$smarty.post.currency && $curr.default || $smarty.post.currency eq $curr.id } selected{/if}>{$curr.code}</option> {/if} {/foreach} </select> </div> </div> {/if}  
       
                                      {if !$loggedin && $currencies}  // I also tried without !@loggedin                                 <div class="pull-right form-inline float-right">                                     <label for="inputCurrency" class="field-icon">                                         <i class="far fa-money-bill-alt"></i>                                     </label>                                     <select name="currency" id="inputCurrency" class="field form-control">                                         <option value="">{$LANG.choosecurrency}</option>                                         {foreach from=$currencies item=listcurr}                                             {if $listcurr.code eq 'EUR'}                                                 <option value="{$listcurr.id}"{if $listcurr.id == $currency.id} selected{/if}>{$listcurr.code}</option>                                             {/if}                                         {/foreach}                                     </select>                                 </div>                                 {/if}  
      Any ideas what I'm doing wrong/why it isn't working?
      Thank you
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • 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