支付
Showing
1 changed file
with
9 additions
and
3 deletions
| ... | @@ -80,6 +80,12 @@ angular.module('myApp.services') | ... | @@ -80,6 +80,12 @@ angular.module('myApp.services') |
| 80 | 80 | ||
| 81 | return q.promise; | 81 | return q.promise; |
| 82 | } | 82 | } |
| 83 | var callUnifiedOrderApiAliPay = function(msg){ | ||
| 84 | var q = $q.defer(); | ||
| 85 | q.reject(msg) | ||
| 86 | return q.promise; | ||
| 87 | } | ||
| 88 | |||
| 83 | 89 | ||
| 84 | return { | 90 | return { |
| 85 | /** | 91 | /** |
| ... | @@ -118,7 +124,7 @@ angular.module('myApp.services') | ... | @@ -118,7 +124,7 @@ angular.module('myApp.services') |
| 118 | // form.querySelector('#ok').click() | 124 | // form.querySelector('#ok').click() |
| 119 | document.body.appendChild(form) | 125 | document.body.appendChild(form) |
| 120 | document.querySelector('#ok').click() | 126 | document.querySelector('#ok').click() |
| 121 | return null | 127 | return callUnifiedOrderApiAliPay('支付') |
| 122 | case 101: | 128 | case 101: |
| 123 | var param = Object.assign($location.search(),{ | 129 | var param = Object.assign($location.search(),{ |
| 124 | amount : amount, | 130 | amount : amount, |
| ... | @@ -163,7 +169,7 @@ angular.module('myApp.services') | ... | @@ -163,7 +169,7 @@ angular.module('myApp.services') |
| 163 | 169 | ||
| 164 | var html = ' <form action="'+ host + '/h5/alipay/balance/'+token | 170 | var html = ' <form action="'+ host + '/h5/alipay/balance/'+token |
| 165 | +'" method="post">' + | 171 | +'" method="post">' + |
| 166 | ' <input type="text" name="amount" value="'+amout+'" />' + | 172 | ' <input type="text" name="amount" value="'+amount+'" />' + |
| 167 | ' <input type="text" name="body" value="保证金充值"/>' + | 173 | ' <input type="text" name="body" value="保证金充值"/>' + |
| 168 | ' <input type="text" name="type" value="100" />' + | 174 | ' <input type="text" name="type" value="100" />' + |
| 169 | ' <input type="submit" id="ok">\n' + | 175 | ' <input type="submit" id="ok">\n' + |
| ... | @@ -175,7 +181,7 @@ angular.module('myApp.services') | ... | @@ -175,7 +181,7 @@ angular.module('myApp.services') |
| 175 | // form.querySelector('#ok').click() | 181 | // form.querySelector('#ok').click() |
| 176 | document.body.appendChild(form) | 182 | document.body.appendChild(form) |
| 177 | document.querySelector('#ok').click() | 183 | document.querySelector('#ok').click() |
| 178 | return null | 184 | return callUnifiedOrderApiAliPay('支付') |
| 179 | case 101: | 185 | case 101: |
| 180 | var param = Object.assign($location.search(),{ | 186 | var param = Object.assign($location.search(),{ |
| 181 | amount : amount, | 187 | amount : amount, | ... | ... |
-
Please register or sign in to post a comment