Having issues with CurrencyFormat

Hi experts, i came across LSCurrencyFormat() function which shows a $ sign before thamount. i want to show money in INDIAN Rupees.

Is there any UDF that i can see this helps.

1. Show the amount in INR.

2. When i send money to paypal. it shows in USD dollars what i do please Guide Me.

I am just providing .20 paise to every user for signing up. now problem when i have to donate that money, how the INR money will convert to USD on fly.

but before sending money to Paypal. how can i display Info in INR ripees using the UDF like currrecy
LVL 16
Gurpreet Singh RandhawaCEOAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jones911Commented:
Do you want to use an uptodate exchange rate?
0
Gurpreet Singh RandhawaCEOAuthor Commented:
Probably yes, Beacuse i searched a lot and coldfusion does not any such locale doe India and its currency<input id="gwProxy" type="hidden"><!--Session data--><input onclick="jsCall();" id="jsProxy" type="hidden">
0
Jones911Commented:
This will convert 1 USD to INR at this time its about $1 USD = 47 INR

Now you can convert it all to and from INR form USD on the fly.
<cfhttp url="http://finance.yahoo.com/d/quotes.csv?f=sl1d1t1&s=USDINR=X" method="get" result="yahooData">
 
 
<cfset INR = listGetAt(yahooData.filecontent,2) />
 
<cfdump var="#INR#" />

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

Gurpreet Singh RandhawaCEOAuthor Commented:
why fetching from a CSV file, do yahoo store the values in the CSV Format. please tell me, if any other service can be used forthis stuff or not and i have not tested your code does it convert indian money to USD dollars when i transfer money to paypal.

Please do not take me wrong as i did not tested it and its just my assumption.

Regards


<input id="gwProxy" type="hidden"><!--Session data--><input onclick="jsCall();" id="jsProxy" type="hidden">
0
Jones911Commented:
Well why not just use my code?  
0
Gurpreet Singh RandhawaCEOAuthor Commented:
i encounter this error. Well how can i pass the dynamic value to this http:<input id="gwProxy" type="hidden"><!--Session data--><input onclick="jsCall();" id="jsProxy" type="hidden">
 Element FILECONTENT is undefined in YAHOODATA.
 
The error occurred in E:\domains\ibestcity.com\wwwroot\wallet.cfm: line 29
Called from E:\domains\ibestcity.com\wwwroot\allpages.cfm: line 28
Called from E:\domains\ibestcity.com\wwwroot\index.cfm: line 108
 
27 :   </tr>
28 :   <tr><td><cfhttp url="http://finance.yahoo.com/d/quotes.csv?f=sl1d1t1&s=USDINR=X" method="get" result="yahooData">
29 : 	<cfset INR = listGetAt(yahooData.filecontent,2) /> 
30 : 		<cfdump var="#INR#" />
31 : </cfhttp></td>

Open in new window

0
Jones911Commented:
Your code is a bit wrong.

</tr>
28 :   <tr><td><cfhttp url="http://finance.yahoo.com/d/quotes.csv?f=sl1d1t1&s=USDINR=X" method="get" result="yahooData" />
29 :    <cfset INR = listGetAt(yahooData.filecontent,2) />
30 :            <cfdump var="#INR#" />
31 : </td>


Try that.
0
Gurpreet Singh RandhawaCEOAuthor Commented:
that is the same code i posted error above, i tried it again same error <input id="gwProxy" type="hidden"><!--Session data--><input onclick="jsCall();" id="jsProxy" type="hidden">
0
Jones911Commented:
No its not the same code it is different notice the closing tags of cfhttp.  Please take a closer look and try it.
0
Gurpreet Singh RandhawaCEOAuthor Commented:
Eehh! My Mistake i correct, Dude it displays correct value Thanks:

two points.

  • How i pass the dynamic value to this cfhttp.
    • I have #amount# as variable, how i pass to it to cfhttp function.
  • and does yahoo store the contents like this everyday in a CSV file and this makes sure i will get the updated content everytime.
We are already near to finish. Thanks a ton for this Support. Please lets finish the tail end of elephant

<input id="gwProxy" type="hidden"><!--Session data--><input onclick="jsCall();" id="jsProxy" type="hidden">Regards
0
Jones911Commented:
Yep the yahoo values is updated all the time I log some values every 4 hours and its right upto date perhaps only behind by a few minutes.

I'll assume you are doing with using cfcproxy and ajax?  I woudl need to see more of the javascript code.
0
Gurpreet Singh RandhawaCEOAuthor Commented:
no i am not using ajax stuff here nor any cfcproxy.

My concern here is. i see the amount in INR 200.
 
Then the user will click the pay Button and it will go to the paypal site and on the fly it will convert the amount to USD.

i am using paypal code. but there code is very complex and they have nothing in that where i can send the money. or if you have any other suggestions please drop some words. here


<input id="gwProxy" type="hidden"><!--Session data--><input onclick="jsCall();" id="jsProxy" type="hidden">
This is paypal Stuff
 
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="5748946">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" 
name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">

Open in new window

0
Jones911Commented:
OK I would do this.

At the top of the page get the result.  Then make a javascript function that does the multiplication instead of submitting the form then submits the form via javascript.

The example I used came from here: http://tutorial30.learncf.com/

Use that as a start got get the INR value into javascript.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.