WIP - re-factor debit card to create a reusable bitpayService.

This commit is contained in:
Andy Phillipson 2016-12-23 11:37:19 -05:00
commit 4a6499d528
6 changed files with 464 additions and 169 deletions

View file

@ -130,20 +130,27 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
url: data
});
// BitPayCard Authentication
// BitPay Authentication
} else if (data && data.indexOf($window.appConfig.name + '://') === 0) {
var secret = getParameterByName('secret', data);
var email = getParameterByName('email', data);
var otp = getParameterByName('otp', data);
var reason = getParameterByName('r', data);
$state.go('tabs.home', {}, {
'reload': true,
'notify': $state.current.name == 'tabs.home' ? false : true
}).then(function() {
$state.transitionTo('tabs.bitpayCardIntro', {
secret: secret,
email: email,
otp: otp
});
switch (reason) {
default:
case '0': /* For BitPay card binding */
$state.transitionTo('tabs.bitpayCardIntro', {
secret: secret,
email: email,
otp: otp
});
break;
}
});
return true;