Comments (3)
It is open source bitcoin library. You can modify it.
from payment-gateway.
thank you
from payment-gateway.
@gabisajr I want to disable the use of external currency converter and set my own exchange rate. Someone sugested this to me today
function convert_currency_live($from_Currency, $to_Currency, $amount)
{
$amount = urlencode($amount);
$from_Currency = trim(strtoupper(urlencode($from_Currency)));
$to_Currency = trim(strtoupper(urlencode($to_Currency)));
if($from_Currency == "NGN" && $to_Currency == "USD"){
return round(($amount * 376), 2);
}else{
if ($from_Currency == "TRL") $from_Currency = "TRY"; // fix for Turkish Lyra
if ($from_Currency == "ZWD") $from_Currency = "ZWL"; // fix for Zimbabwe Dollar
if ($from_Currency == "RIAL") $from_Currency = "IRR"; // fix for Iranian Rial
$url = "https://finance.google.com/finance/converter?a=".$amount."&from=".$from_Currency."&to=".$to_Currency;
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko");
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 20);
curl_setopt ($ch, CURLOPT_TIMEOUT, 20);
$res = curl_exec($ch);
curl_close($ch);
if ($res)
{
$data = explode('bld>', $res);
$data = explode($to_Currency, $data[1]);
return round($data[0], ($to_Currency=="BTC"?5:2));
}else{
return -1;
}
}`
```
What do you think?
from payment-gateway.
Related Issues (20)
- Question: XRP and Stellar Lumens (XLM)?
- Ipn issue HOT 3
- landing_page
- How can someone test the payment integration HOT 1
- Not forwarding coin HOT 3
- Failing on cryptobox.callback.php part HOT 1
- Only once sell HOT 12
- Hi
- How can one confirm payment status directly on your service from a different programming language? HOT 1
- Appliances.protectionLtd
- Refund Request HOT 2
- Is this project still alive? HOT 2
- Testing Questions HOT 1
- Hello
- Bitcoin
- Is the project alive? HOT 2
- Invalid Private Key HOT 1
- Issues with payment
- Hello I need help. HOT 1
- Payment gateway in Bangladesh
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from payment-gateway.