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 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({
|
||||
'toAddress': toAddress,
|
||||
|
|
|
|||
|
|
@ -26,14 +26,14 @@ angular.module('copayApp.services').factory('mercadoLibreService', function($htt
|
|||
|
||||
var homeItem = {
|
||||
name: 'mercadoLibre',
|
||||
title: 'Mercado Libre',
|
||||
title: 'Mercado Livre Brazil Gift Cards',
|
||||
icon: 'icon-ml',
|
||||
sref: 'tabs.giftcards.mercadoLibre',
|
||||
};
|
||||
|
||||
var nextStepItem = {
|
||||
name: 'mercadoLibre',
|
||||
title: 'Buy Mercado Libre Gift Cards',
|
||||
title: 'Buy Mercado Livre Brazil Gift Cards',
|
||||
icon: 'icon-ml',
|
||||
sref: 'tabs.giftcards.mercadoLibre',
|
||||
};
|
||||
|
|
@ -112,7 +112,7 @@ angular.module('copayApp.services').factory('mercadoLibreService', function($htt
|
|||
$log.info('BitPay Create Invoice: SUCCESS');
|
||||
return cb(null, data.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);
|
||||
});
|
||||
};
|
||||
|
|
@ -122,8 +122,8 @@ angular.module('copayApp.services').factory('mercadoLibreService', function($htt
|
|||
$log.info('BitPay Get Invoice: SUCCESS');
|
||||
return cb(null, data.data.data);
|
||||
}, function(data) {
|
||||
$log.error('BitPay Get Invoice: ERROR ' + data.data.error);
|
||||
return cb(data.data.error);
|
||||
$log.error('BitPay Get Invoice: ERROR', JSON.stringify(data.data));
|
||||
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);
|
||||
return cb(null, data.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);
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@
|
|||
}
|
||||
|
||||
.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 {
|
||||
.card-head {
|
||||
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-nav-bar class="bar-royal">
|
||||
<ion-nav-title>
|
||||
{{'Enter Amount' | translate}}
|
||||
{{'Enter amount' | translate}}
|
||||
</ion-nav-title>
|
||||
<ion-nav-back-button>
|
||||
</ion-nav-back-button>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@
|
|||
<ion-nav-bar class="bar-royal">
|
||||
<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-content class="add-bottom-for-cta">
|
||||
|
|
@ -14,7 +16,7 @@
|
|||
<i class="icon big-icon-svg">
|
||||
<div class="bg icon-amazon"></div>
|
||||
</i>
|
||||
<span>Mercado Libre Gift Card</span>
|
||||
<span>Mercado Livre Brazil Gift Cards</span>
|
||||
</div>
|
||||
<div class="amount-label">
|
||||
<div class="amount">{{amountUnitStr}}</div>
|
||||
|
|
@ -60,13 +62,13 @@
|
|||
ng-click="buyConfirm()"
|
||||
ng-if="!isCordova"
|
||||
click-send-status="sendStatus">
|
||||
Confirm purchase
|
||||
{{'Confirm purchase'|translate}}
|
||||
</click-to-accept>
|
||||
<slide-to-accept
|
||||
ng-if="isCordova && wallet && totalAmountStr"
|
||||
slide-on-confirm="buyConfirm()"
|
||||
slide-send-status="sendStatus">
|
||||
Slide to buy
|
||||
{{'Slide to buy'|translate}}
|
||||
</slide-to-accept>
|
||||
<slide-to-accept-success
|
||||
slide-success-show="sendStatus === 'success'"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@
|
|||
<ion-nav-bar class="bar-royal">
|
||||
<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-content scroll="false" class="ng-hide" ng-show="!giftCards">
|
||||
|
|
@ -13,13 +15,18 @@
|
|||
<div class="integration-onboarding-logo">
|
||||
<img src="img/mercado-libre/mlbr.svg" alt="Mercado Libre" width="250">
|
||||
</div>
|
||||
<div class="integration-onboarding-description">
|
||||
Gift Cards are only redeemable on Mercado Livre (Brazil)
|
||||
<div class="integration-onboarding-description" translate>
|
||||
<b>Only</b> redeemable on Mercado Livre (Brazil)
|
||||
</div>
|
||||
<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"
|
||||
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>
|
||||
</ion-content>
|
||||
|
|
@ -30,7 +37,7 @@
|
|||
|
||||
<div class="m20t text-center">
|
||||
<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)
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -40,14 +47,14 @@
|
|||
<a class="item item-icon-left item-icon-right" href
|
||||
ui-sref="tabs.giftcards.mercadoLibre.amount" no-low-fee>
|
||||
<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>
|
||||
</a>
|
||||
|
||||
<a class="item item-icon-right item-icon-left"
|
||||
ui-sref="tabs.giftcards.mercadoLibre.cards">
|
||||
<i class="icon ion-ios-folder-outline"></i>
|
||||
Your cards
|
||||
<span translate>Your Gift Cards</span>
|
||||
<i class="icon bp-arrow-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
<ion-view>
|
||||
<ion-view id="meli-list-cards">
|
||||
<ion-nav-bar class="bar-royal">
|
||||
<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-content>
|
||||
|
|
@ -11,7 +13,7 @@
|
|||
ng-click="openCardModal(item)"
|
||||
class="item item-avatar"
|
||||
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="assertive" ng-if="item.status == 'FAILURE'" translate>Error</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue