Fix wording. Error handler improved
This commit is contained in:
parent
0b3cb389ae
commit
e7f8e2c235
8 changed files with 44 additions and 24 deletions
|
|
@ -110,7 +110,7 @@ angular.module('copayApp.controllers').controller('buyMercadoLibreController', f
|
||||||
|
|
||||||
var outputs = [];
|
var outputs = [];
|
||||||
var toAddress = invoice.bitcoinAddress;
|
var toAddress = invoice.bitcoinAddress;
|
||||||
var amountSat = parseInt(invoice.btcDue * 100000000); // BTC to Satoshi
|
var amountSat = parseInt((invoice.btcDue * 100000000).toFixed(0)); // BTC to Satoshi
|
||||||
|
|
||||||
outputs.push({
|
outputs.push({
|
||||||
'toAddress': toAddress,
|
'toAddress': toAddress,
|
||||||
|
|
|
||||||
|
|
@ -26,14 +26,14 @@ angular.module('copayApp.services').factory('mercadoLibreService', function($htt
|
||||||
|
|
||||||
var homeItem = {
|
var homeItem = {
|
||||||
name: 'mercadoLibre',
|
name: 'mercadoLibre',
|
||||||
title: 'Mercado Libre',
|
title: 'Mercado Livre Brazil Gift Cards',
|
||||||
icon: 'icon-ml',
|
icon: 'icon-ml',
|
||||||
sref: 'tabs.giftcards.mercadoLibre',
|
sref: 'tabs.giftcards.mercadoLibre',
|
||||||
};
|
};
|
||||||
|
|
||||||
var nextStepItem = {
|
var nextStepItem = {
|
||||||
name: 'mercadoLibre',
|
name: 'mercadoLibre',
|
||||||
title: 'Buy Mercado Libre Gift Cards',
|
title: 'Buy Mercado Livre Brazil Gift Cards',
|
||||||
icon: 'icon-ml',
|
icon: 'icon-ml',
|
||||||
sref: 'tabs.giftcards.mercadoLibre',
|
sref: 'tabs.giftcards.mercadoLibre',
|
||||||
};
|
};
|
||||||
|
|
@ -112,7 +112,7 @@ angular.module('copayApp.services').factory('mercadoLibreService', function($htt
|
||||||
$log.info('BitPay Create Invoice: SUCCESS');
|
$log.info('BitPay Create Invoice: SUCCESS');
|
||||||
return cb(null, data.data);
|
return cb(null, data.data);
|
||||||
}, function(data) {
|
}, function(data) {
|
||||||
$log.error('BitPay Create Invoice: ERROR ' + data.data.message);
|
$log.error('BitPay Create Invoice: ERROR', JSON.stringify(data.data));
|
||||||
return cb(data.data);
|
return cb(data.data);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -122,8 +122,8 @@ angular.module('copayApp.services').factory('mercadoLibreService', function($htt
|
||||||
$log.info('BitPay Get Invoice: SUCCESS');
|
$log.info('BitPay Get Invoice: SUCCESS');
|
||||||
return cb(null, data.data.data);
|
return cb(null, data.data.data);
|
||||||
}, function(data) {
|
}, function(data) {
|
||||||
$log.error('BitPay Get Invoice: ERROR ' + data.data.error);
|
$log.error('BitPay Get Invoice: ERROR', JSON.stringify(data.data));
|
||||||
return cb(data.data.error);
|
return cb(data.data);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -140,7 +140,7 @@ angular.module('copayApp.services').factory('mercadoLibreService', function($htt
|
||||||
$log.info('Mercado Libre Gift Card Create/Update: ' + status);
|
$log.info('Mercado Libre Gift Card Create/Update: ' + status);
|
||||||
return cb(null, data.data);
|
return cb(null, data.data);
|
||||||
}, function(data) {
|
}, function(data) {
|
||||||
$log.error('Mercado Libre Gift Card Create/Update: ', JSON.stringify(data.data));
|
$log.error('Mercado Libre Gift Card Create/Update: ERROR', JSON.stringify(data.data));
|
||||||
return cb(data.data);
|
return cb(data.data);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.big-icon-svg > .bg {
|
.big-icon-svg > .bg {
|
||||||
height: 27px;
|
height: 28px;
|
||||||
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -145,6 +146,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#meli-list-cards {
|
||||||
|
img.item-logo {
|
||||||
|
width: auto;
|
||||||
|
height: auto;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#meli-card {
|
#meli-card {
|
||||||
.card-head {
|
.card-head {
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
|
|
|
||||||
BIN
www/img/mercado-libre/meli-card-24px.png
Normal file
BIN
www/img/mercado-libre/meli-card-24px.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
|
|
@ -1,7 +1,7 @@
|
||||||
<ion-view id="view-amount" hide-tabs>
|
<ion-view id="view-amount" hide-tabs>
|
||||||
<ion-nav-bar class="bar-royal">
|
<ion-nav-bar class="bar-royal">
|
||||||
<ion-nav-title>
|
<ion-nav-title>
|
||||||
{{'Enter Amount' | translate}}
|
{{'Enter amount' | translate}}
|
||||||
</ion-nav-title>
|
</ion-nav-title>
|
||||||
<ion-nav-back-button>
|
<ion-nav-back-button>
|
||||||
</ion-nav-back-button>
|
</ion-nav-back-button>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,9 @@
|
||||||
<ion-nav-bar class="bar-royal">
|
<ion-nav-bar class="bar-royal">
|
||||||
<ion-nav-back-button>
|
<ion-nav-back-button>
|
||||||
</ion-nav-back-button>
|
</ion-nav-back-button>
|
||||||
<ion-nav-title>Buy</ion-nav-title>
|
<ion-nav-title>
|
||||||
|
{{'Buy'|translate}}
|
||||||
|
</ion-nav-title>
|
||||||
</ion-nav-bar>
|
</ion-nav-bar>
|
||||||
|
|
||||||
<ion-content class="add-bottom-for-cta">
|
<ion-content class="add-bottom-for-cta">
|
||||||
|
|
@ -14,7 +16,7 @@
|
||||||
<i class="icon big-icon-svg">
|
<i class="icon big-icon-svg">
|
||||||
<div class="bg icon-amazon"></div>
|
<div class="bg icon-amazon"></div>
|
||||||
</i>
|
</i>
|
||||||
<span>Mercado Libre Gift Card</span>
|
<span>Mercado Livre Brazil Gift Cards</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="amount-label">
|
<div class="amount-label">
|
||||||
<div class="amount">{{amountUnitStr}}</div>
|
<div class="amount">{{amountUnitStr}}</div>
|
||||||
|
|
@ -60,13 +62,13 @@
|
||||||
ng-click="buyConfirm()"
|
ng-click="buyConfirm()"
|
||||||
ng-if="!isCordova"
|
ng-if="!isCordova"
|
||||||
click-send-status="sendStatus">
|
click-send-status="sendStatus">
|
||||||
Confirm purchase
|
{{'Confirm purchase'|translate}}
|
||||||
</click-to-accept>
|
</click-to-accept>
|
||||||
<slide-to-accept
|
<slide-to-accept
|
||||||
ng-if="isCordova && wallet && totalAmountStr"
|
ng-if="isCordova && wallet && totalAmountStr"
|
||||||
slide-on-confirm="buyConfirm()"
|
slide-on-confirm="buyConfirm()"
|
||||||
slide-send-status="sendStatus">
|
slide-send-status="sendStatus">
|
||||||
Slide to buy
|
{{'Slide to buy'|translate}}
|
||||||
</slide-to-accept>
|
</slide-to-accept>
|
||||||
<slide-to-accept-success
|
<slide-to-accept-success
|
||||||
slide-success-show="sendStatus === 'success'"
|
slide-success-show="sendStatus === 'success'"
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,9 @@
|
||||||
<ion-nav-bar class="bar-royal">
|
<ion-nav-bar class="bar-royal">
|
||||||
<ion-nav-back-button>
|
<ion-nav-back-button>
|
||||||
</ion-nav-back-button>
|
</ion-nav-back-button>
|
||||||
<ion-nav-title>Mercado Libre Gift Cards</ion-nav-title>
|
<ion-nav-title>
|
||||||
|
{{'Mercado Livre Brazil Gift Cards'|translate}}
|
||||||
|
</ion-nav-title>
|
||||||
</ion-nav-bar>
|
</ion-nav-bar>
|
||||||
|
|
||||||
<ion-content scroll="false" class="ng-hide" ng-show="!giftCards">
|
<ion-content scroll="false" class="ng-hide" ng-show="!giftCards">
|
||||||
|
|
@ -13,13 +15,18 @@
|
||||||
<div class="integration-onboarding-logo">
|
<div class="integration-onboarding-logo">
|
||||||
<img src="img/mercado-libre/mlbr.svg" alt="Mercado Libre" width="250">
|
<img src="img/mercado-libre/mlbr.svg" alt="Mercado Libre" width="250">
|
||||||
</div>
|
</div>
|
||||||
<div class="integration-onboarding-description">
|
<div class="integration-onboarding-description" translate>
|
||||||
Gift Cards are only redeemable on Mercado Livre (Brazil)
|
<b>Only</b> redeemable on Mercado Livre (Brazil)
|
||||||
</div>
|
</div>
|
||||||
<div class="integration-onboarding-cta" ng-show="!showOauthForm">
|
<div class="integration-onboarding-cta" ng-show="!showOauthForm">
|
||||||
<button class="button button-standard button-primary" ui-sref="tabs.giftcards.mercadoLibre.amount" no-low-fee>Buy a Gift Card</button>
|
<button class="button button-standard button-primary" ui-sref="tabs.giftcards.mercadoLibre.amount" no-low-fee
|
||||||
|
translate>
|
||||||
|
Buy a Gift Card
|
||||||
|
</button>
|
||||||
<button class="button button-standard button-secondary"
|
<button class="button button-standard button-secondary"
|
||||||
ng-click="openExternalLink('https://www.mercadolivre.com.br')">Visit mercadolivre.com.br →</button>
|
ng-click="openExternalLink('https://www.mercadolivre.com.br')" translate>
|
||||||
|
Visit mercadolivre.com.br →
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|
@ -30,7 +37,7 @@
|
||||||
|
|
||||||
<div class="m20t text-center">
|
<div class="m20t text-center">
|
||||||
<img src="img/mercado-libre/mlbr.svg" alt="Mercado Libre" width="250">
|
<img src="img/mercado-libre/mlbr.svg" alt="Mercado Libre" width="250">
|
||||||
<div class="size-12 m10t">
|
<div class="size-12 m10t" translate>
|
||||||
<b>Only</b> redeemable on Mercado Livre (Brazil)
|
<b>Only</b> redeemable on Mercado Livre (Brazil)
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -40,14 +47,14 @@
|
||||||
<a class="item item-icon-left item-icon-right" href
|
<a class="item item-icon-left item-icon-right" href
|
||||||
ui-sref="tabs.giftcards.mercadoLibre.amount" no-low-fee>
|
ui-sref="tabs.giftcards.mercadoLibre.amount" no-low-fee>
|
||||||
<i class="icon ion-ios-pricetags-outline"></i>
|
<i class="icon ion-ios-pricetags-outline"></i>
|
||||||
Buy Gift Card
|
<span translate>Buy a Gift Card</span>
|
||||||
<i class="icon bp-arrow-right"></i>
|
<i class="icon bp-arrow-right"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a class="item item-icon-right item-icon-left"
|
<a class="item item-icon-right item-icon-left"
|
||||||
ui-sref="tabs.giftcards.mercadoLibre.cards">
|
ui-sref="tabs.giftcards.mercadoLibre.cards">
|
||||||
<i class="icon ion-ios-folder-outline"></i>
|
<i class="icon ion-ios-folder-outline"></i>
|
||||||
Your cards
|
<span translate>Your Gift Cards</span>
|
||||||
<i class="icon bp-arrow-right"></i>
|
<i class="icon bp-arrow-right"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
<ion-view>
|
<ion-view id="meli-list-cards">
|
||||||
<ion-nav-bar class="bar-royal">
|
<ion-nav-bar class="bar-royal">
|
||||||
<ion-nav-back-button>
|
<ion-nav-back-button>
|
||||||
</ion-nav-back-button>
|
</ion-nav-back-button>
|
||||||
<ion-nav-title>Your cards</ion-nav-title>
|
<ion-nav-title>
|
||||||
|
{{'Your Gift Cards'|translate}}
|
||||||
|
</ion-nav-title>
|
||||||
</ion-nav-bar>
|
</ion-nav-bar>
|
||||||
|
|
||||||
<ion-content>
|
<ion-content>
|
||||||
|
|
@ -11,7 +13,7 @@
|
||||||
ng-click="openCardModal(item)"
|
ng-click="openCardModal(item)"
|
||||||
class="item item-avatar"
|
class="item item-avatar"
|
||||||
ng-hide="hideCards">
|
ng-hide="hideCards">
|
||||||
<img src="img/mercado-libre/icon-ml.svg" alt="{{id}}" width="40">
|
<img class="item-logo" src="img/mercado-libre/meli-card-24px.png" alt="{{id}}">
|
||||||
|
|
||||||
<span class="item-note">
|
<span class="item-note">
|
||||||
<span class="assertive" ng-if="item.status == 'FAILURE'" translate>Error</span>
|
<span class="assertive" ng-if="item.status == 'FAILURE'" translate>Error</span>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue