Open Amazon redeem link in system browser. Fix buy gc on mobile
This commit is contained in:
parent
2b60bc3066
commit
7793be3615
7 changed files with 22 additions and 14 deletions
|
|
@ -10,7 +10,7 @@
|
|||
</section>
|
||||
|
||||
<section class="right-small">
|
||||
<a class="p10" ng-click="$root.go('buyAmazon')">
|
||||
<a class="p10" ui-sref="buyAmazon">
|
||||
<i class="fi-shopping-cart size-24"></i>
|
||||
</a>
|
||||
</section>
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
<div class="row">
|
||||
<div class="columns">
|
||||
<button class="m20t button black round expand"
|
||||
ng-click="$root.go('buyAmazon')">
|
||||
ui-sref="buyAmazon">
|
||||
Buy now
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row m20t" ng-show="!buy.giftCard">
|
||||
<div class="row m20t" ng-show="!buy.giftCard" ng-init="buy.init()">
|
||||
<div class="columns">
|
||||
|
||||
<div class="box-notification m20b" ng-show="buy.error" ng-click="buy.error = null">
|
||||
|
|
@ -57,8 +57,8 @@
|
|||
<a class="amazon-select-amount" ng-click="buy.setAmount(1)">+</a>
|
||||
</div>
|
||||
|
||||
<div
|
||||
ng-init="buy.init()"
|
||||
<div
|
||||
class="m10b"
|
||||
ng-click="openWalletsModal(buy.allWallets)">
|
||||
<label>Pay From Copay Wallet</label>
|
||||
<div class="input">
|
||||
|
|
@ -122,7 +122,7 @@
|
|||
</div>
|
||||
<div class="m10t">
|
||||
<button class="button black round tiny"
|
||||
ng-click="$root.openExternalLink('https://www.amazon.com/gc/redeem?claimCode=' + buy.giftCard.gcClaimCode)">
|
||||
ng-click="$root.openExternalLink('https://www.amazon.com/gc/redeem?claimCode=' + buy.giftCard.gcClaimCode, '_system')">
|
||||
Redeem Now
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -130,7 +130,7 @@
|
|||
|
||||
<div class="size-12 m10t text-center">
|
||||
| <a
|
||||
ng-click="$root.openExternalLink('https://www.amazon.com/gp/css/gc/payment/view-gc-balance?claimCode=' + buy.giftCard.gcClaimCode)">
|
||||
ng-click="$root.openExternalLink('https://www.amazon.com/gp/css/gc/payment/view-gc-balance?claimCode=' + buy.giftCard.gcClaimCode, '_system')">
|
||||
Apply to Account
|
||||
</a> |
|
||||
<a ng-click="$root.openExternalLink('http://www.amazon.com/gc-redeem')">How to Use</a> |
|
||||
|
|
|
|||
|
|
@ -30,16 +30,16 @@
|
|||
<div>
|
||||
Claim code: <span class="text-bold enable_text_select">{{card.gcClaimCode}}</span>
|
||||
</div>
|
||||
<div class="m10t">
|
||||
<div class="m10t" ng-show="card.cardInfo.cardStatus == 'Fulfilled'">
|
||||
<button class="button black round tiny"
|
||||
ng-click="$root.openExternalLink('https://www.amazon.com/gc/redeem?claimCode=' + card.gcClaimCode)">
|
||||
ng-click="$root.openExternalLink('https://www.amazon.com/gc/redeem?claimCode=' + card.gcClaimCode, '_system')">
|
||||
Redeem Now
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="size-12 m10t text-center">
|
||||
<div class="size-12 m10t text-center" ng-show="card.cardInfo.cardStatus == 'Fulfilled'">
|
||||
| <a
|
||||
ng-click="$root.openExternalLink('https://www.amazon.com/gp/css/gc/payment/view-gc-balance?claimCode=' + card.gcClaimCode)">
|
||||
ng-click="$root.openExternalLink('https://www.amazon.com/gp/css/gc/payment/view-gc-balance?claimCode=' + card.gcClaimCode, '_system')">
|
||||
Apply to Account
|
||||
</a> |
|
||||
<a ng-click="$root.openExternalLink('http://www.amazon.com/gc-redeem')">How to Use</a> |
|
||||
|
|
@ -67,9 +67,9 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="m10t size-12 white line-t p10" ng-show="card.gcClaimCode">
|
||||
<div class="size-12 white line-t p10" ng-show="card.gcClaimCode && card.cardInfo.cardStatus == 'Fulfilled'">
|
||||
<div class="text-bold m10b">To redeem your gift card, follow these steps:</div>
|
||||
<ol class="size-12">
|
||||
<ol class="amazon-list size-12">
|
||||
<li>Visit <a ng-click="$root.openExternalLink('https://www.amazon.com/gc')">www.amazon.com/gc</a>.</li>
|
||||
<li>Click Apply to Account and enter the claim code when prompted.</li>
|
||||
<li>Gift card funds will be applied automatically to eligible orders during the checkout process.</li>
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ angular.module('copayApp.controllers').controller('buyAmazonController',
|
|||
if (err) {
|
||||
self.loading = null;
|
||||
self.error = bwsError.msg(err);
|
||||
$scope.$apply();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ angular.element(document).ready(function() {
|
|||
|
||||
document.addEventListener('deviceready', function() {
|
||||
|
||||
window.open = cordova.InAppBrowser.open;
|
||||
|
||||
// Create a sticky event for handling the app being opened via a custom URL
|
||||
cordova.addStickyDocumentEventHandler('handleopenurl');
|
||||
startAngular();
|
||||
|
|
|
|||
|
|
@ -39,8 +39,9 @@ angular.module('copayApp.services').factory('amazonService', function($http, $lo
|
|||
$log.error(err);
|
||||
return cb();
|
||||
});
|
||||
} else {
|
||||
return cb('XXX'); // Test purpose
|
||||
}
|
||||
return cb('XXX'); // Test purpose
|
||||
};
|
||||
|
||||
var _checkLimits = function(amount, cb) {
|
||||
|
|
|
|||
|
|
@ -20,3 +20,7 @@
|
|||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
ol.amazon-list {
|
||||
list-style: decimal !important;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue