Jump to content

InvoiceChangeGateway Hook


mseg

Recommended Posts

Hi,

 

I'm using a hook to change the currency of the invoice when changing the payment method.

 

Hook: InvoiceChangeGateway

 

I can get the variables successfully but I couldn't find a way to change the currency of the invoice or the currency of the client.

 

I want the steps to be in this way:

 

1- Client opens the invoice.

2- Changes the gateway.

3- The currency in the invoice will be changed to what I coded.

 

I can't get the hook at anyway to change the currency, do you have any suggestions?

 

Thanks,

Link to comment
Share on other sites

once a client has purchased from you, they cannot change their currency - even if you can find a way to change it, you probably shouldn't!

 

We do not recommend changing a client's currency once they have placed an order; you would need to change their invoice history, recurring prices, transactions, etc. This is also why clients cannot change their currency on their own.
Link to comment
Share on other sites

once a client has purchased from you, they cannot change their currency - even if you can find a way to change it, you probably shouldn't!

 

Thanks for your reply, I appreciate it.

 

But, Let's say I would like to make it, How could this be done?

 

I will use this way to make whatever I need so it will help me.

 

Thanks,

Link to comment
Share on other sites

I suspect that WHMCS wouldn't have made an easy way to do this - why do you need to change the currency based on the gateway?

 

have you seen the info in the docs about "Convert To For Processing" ? - http://docs.whmcs.com/Payment_Gateways

 

Convert To For Processing

This option is for when using multiple currencies. It is possible that not every gateway you use will accept all the currencies you offer on your site and so for those that don’t, you can choose a currency here for WHMCS to convert to before sending to them. For example if using Google Checkout with a UK account but offering prices in GBP & USD, you would need to select GBP in the Convert To box. This will use the rates set in Config > Currencies to do the conversion which can be set to auto update daily.

is this a better option rather than changing currencies directly?

Link to comment
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.

  • 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