Skip to content

Commit

Permalink
Updating the merchant url spec
Browse files Browse the repository at this point in the history
  • Loading branch information
incentivetoken committed Mar 3, 2016
1 parent f047dc5 commit a7e4d78
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions app/scripts/controllers/merchant-terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,20 @@ module.config(function($routeProvider) {
* be replaced with the correct details.
*
* ${SENDER} - will be replaced with the sender address in RS format
* ${AMOUNT} - will be replaced with the amount of FIM or the asset quantity
*
* Example: urls with redirect and status.
*
* http%3A%2F%2Fgoogle.com%2Fsearch%3Fq%3Dredirect|http%3A%2F%2Fgoogle.com%2Fsearch%3Fq%3Dstatus-${SENDER}-${AMOUNT}
* http%3A%2F%2Fgoogle.com%2Fsearch%3Fq%3Dredirect|http%3A%2F%2Fgoogle.com%2Fsearch%3Fq%3Dstatus-${SENDER}
*
* Example: urls with only a status
*
* |http%3A%2F%2Fgoogle.com%2Fsearch%3Fq%3Dstatus
*
* Example: redirect and status
* http://localhost:9001/#/merchant/FIM-BA8U-LVXC-WBFT-49C4S/100000000/1440/Send%20money/Message%20text/15249019093105168329/http%3A%2F%2Fgoogle.com%2Fsearch%3Fq%3Dredirect|http%3A%2F%2Fgoogle.com%2Fsearch%3Fq%3Dstatus-${SENDER}-${AMOUNT}
* http://localhost:9001/#/merchant/FIM-BA8U-LVXC-WBFT-49C4S/100000000/1440/Send%20money/Message%20text/15249019093105168329/http%3A%2F%2Fgoogle.com%2Fsearch%3Fq%3Dredirect|http%3A%2F%2Fgoogle.com%2Fsearch%3Fq%3Dstatus-${SENDER}
*
* Example: status only
* http://localhost:9001/#/merchant/FIM-BA8U-LVXC-WBFT-49C4S/100000000/1440/Send%20money/Message%20text/15249019093105168329/|http%3A%2F%2Fgoogle.com%2Fsearch%3Fq%3Dstatus-${SENDER}-${AMOUNT}
* http://localhost:9001/#/merchant/FIM-BA8U-LVXC-WBFT-49C4S/100000000/1440/Send%20money/Message%20text/15249019093105168329/|http%3A%2F%2Fgoogle.com%2Fsearch%3Fq%3Dstatus-${SENDER}
**/

module.controller('MerchantTerminalController', function ($scope, $rootScope, nxt, $routeParams, plugins, $q, $http) {
Expand Down Expand Up @@ -121,8 +120,7 @@ module.controller('MerchantTerminalController', function ($scope, $rootScope, nx
if (items) {
$scope.$evalAsync(function () {
sendTransactionStatus({
sender:items.senderRS,
amount:items.quantity
sender:items.senderRS
});
});
}
Expand All @@ -144,8 +142,7 @@ module.controller('MerchantTerminalController', function ($scope, $rootScope, nx
if (items) {
$scope.$evalAsync(function () {
sendTransactionStatus({
sender:items.senderRS,
amount:items.quantity
sender:items.senderRS
});
});
}
Expand All @@ -162,7 +159,6 @@ module.controller('MerchantTerminalController', function ($scope, $rootScope, nx
var url = ($routeParams.urls||"").split('|')[1];
if (url) {
url = url.replace("${SENDER}",data.sender);
url = url.replace("${AMOUNT}",data.amount);
$http({method:'GET',url:url}).finally(function () {
$scope.$evalAsync(function () {
$scope.success = true;
Expand Down

0 comments on commit a7e4d78

Please sign in to comment.