Skip to content

Commit

Permalink
Revert "Remove unused partners"
Browse files Browse the repository at this point in the history
This reverts commit f97cacc.
  • Loading branch information
ncoelho committed Oct 29, 2020
1 parent f97cacc commit 307914d
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions buy-bitcoin-redirect.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title></title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<noscript>
<meta http-equiv="Refresh" content="0;URL=https://moonpay-redirect.herokuapp.com/?apiKey=pk_live_IkhSI2lIXSiolwakfd95QFD4p3908cZa&enabledPaymentMethods=credit_debit_card%2Capple_pay%2Csepa_bank_transfer%2Cgbp_bank_transfer&currencyCode=BTC&colorCode=%2368BBE1&showWalletAddressForm=false"/>
<meta http-equiv="Refresh" content="0;URL=https://exchange.mercuryo.io/?widget_id=4d94cb57-60a4-4804-82a8-257aa94bcb73&utm_source=BlueWallet&utm_medium=referral&type=buy&currency=BTC&fix_currency=true"/>
</noscript>
<style>
.lds-dual-ring {
Expand Down Expand Up @@ -38,7 +38,11 @@
<div class="lds-dual-ring"></div>
<script>
var safello_countries = ["SE"];
var moonpay_currencies = ["AUD", "CAD", "CHF", "EUR", "GBP", "ILS", "NOK", "PLN", "RUB", "SEK", "USD", "ZAR", "IDR", "VND", "MYR", "SGD", "HKD", "PHP", "INR", "VND", "THB", "KRW", "JPY", "TRY","UAH", "ARS"]; // curl https://api.moonpay.io/v3/currencies?apiKey=pk_live_IkhSI2lIXSiolwakfd95QFD4p3908cZa | jq '.' | grep fiat -A 2 | grep code
var xanpool_countries = ["TH", "PH", "IN", "VN", "MY"]; // + "SG", "HK", "ID"
var moonpay_currencies = ["AUD", "CAD", "CHF", "EUR", "GBP", "ILS", "NOK", "PLN", "RUB", "SEK", "USD", "ZAR"]; // curl https://api.moonpay.io/v3/currencies?apiKey=pk_live_IkhSI2lIXSiolwakfd95QFD4p3908cZa | jq '.' | grep fiat -A 2 | grep code
var xanpool_currencies = ["SGD", "HKD", "THB", "PHP", "INR", "IDR", "VND", "MYR", "SGD", "HKD", "PHP", "INR", "VND", "THB"];
var mercuryo_countries = ["RU", "UA", "BY", "AM", "AZ", "BY", "GEN", "KZ", "KE", "LA", "MD", "MC", "ME", "SM", "RS", "TJ", "UZ", "SG", "HK", "KR", "AR", "ID", "TR", "JP"];
var mercuryo_currencies = ["EUR", "RUB", "USD", "IDR", "KRW", "JPY", "TRY", "GBP", "UAH", "ARS"];
var u = new URLSearchParams(window.location.search);
var address = u.get('address') || '';
var currency = u.get('currency') || '';
Expand All @@ -56,7 +60,7 @@
jsonpCallback: "callback",
dataType: "jsonp",
error: function() {
window.location = 'https://moonpay-redirect.herokuapp.com/?apiKey=pk_live_IkhSI2lIXSiolwakfd95QFD4p3908cZa&enabledPaymentMethods=credit_debit_card%2Capple_pay%2Csepa_bank_transfer%2Cgbp_bank_transfer&currencyCode=BTC&colorCode=%2368BBE1&showWalletAddressForm=false';
window.location = 'https://exchange.mercuryo.io/?widget_id=4d94cb57-60a4-4804-82a8-257aa94bcb73&utm_source=BlueWallet&utm_medium=referral&type=buy&currency=BTC&fix_currency=true';
},
success: function( location ) {
console.log('country_code', location.country_code);
Expand All @@ -71,6 +75,16 @@
}

window.location = safello_url
} else if (xanpool_countries.indexOf(location.country_code) !== -1) {
var xanpool_url = "https://widget.xanpool.com/?apiKey=7e3o3bzh5f2opybhhkqgo63yfbqykmll&cryptoCurrency=btc&transactionType=buy&isWebView=true";
if (address) xanpool_url += "&wallet=" + address;
if (xanpool_currencies.indexOf(currency) !== -1) xanpool_url += "&currency=" + currency;
window.location = xanpool_url;
} else if (mercuryo_countries.indexOf(location.country_code) !== -1) {
var mercuryo_url = "https://exchange.mercuryo.io/?widget_id=4d94cb57-60a4-4804-82a8-257aa94bcb73&hide_address=true&utm_source=BlueWallet&utm_medium=referral&type=buy&currency=BTC&fix_currency=true";
if (address) mercuryo_url += "&address=" + address;
if (mercuryo_currencies.indexOf(currency) !== -1) mercuryo_url += "&fiat_currency=" + currency;
window.location = mercuryo_url;
} else {
var moonpay_url = 'https://moonpay-redirect.herokuapp.com/?apiKey=pk_live_IkhSI2lIXSiolwakfd95QFD4p3908cZa&enabledPaymentMethods=credit_debit_card%2Capple_pay%2Csepa_bank_transfer%2Cgbp_bank_transfer&currencyCode=BTC&colorCode=%2368BBE1&showWalletAddressForm=false';
if (address) moonpay_url += '&walletAddress=' + address;
Expand Down

0 comments on commit 307914d

Please sign in to comment.