@@ -180,7 +180,6 @@ Hyper = Class.create({
180
180
data : data ,
181
181
dataType : "xml" ,
182
182
headers : { 'origin' : this . headerOrigin } ,
183
- //contentType: "application/text; charset=utf-8",
184
183
success : function ( result ) {
185
184
var xml = jQuery ( result ) ;
186
185
var transactionStatus = xml . find ( "status" ) . text ( ) ;
@@ -212,21 +211,25 @@ Hyper = Class.create({
212
211
dataType : "xml" ,
213
212
headers : { 'origin' : this . headerOrigin } ,
214
213
contentType : "application/text; charset=utf-8" ,
215
- success : function ( result ) {
214
+ success : function ( result ) {
216
215
var xml = jQuery ( result ) ;
217
216
var transactionStatus = xml . find ( "status" ) . text ( ) ;
218
217
219
218
if ( transactionStatus == 'approved' || transactionStatus == 'pending_async' ) {
220
- alert ( "success" ) ;
219
+ window . location . href = successUrl ;
220
+ return ;
221
221
} else {
222
- alert ( "error in success" ) ;
222
+ window . location . href = errorUrl ;
223
+ return ;
223
224
}
224
225
} ,
225
- error : function ( jqXHR , tranStatus , errorThrown ) {
226
+ error : function ( jqXHR , tranStatus , errorThrown ) {
226
227
if ( jqXHR . status == 200 ) {
227
- alert ( "success in error" ) ;
228
+ window . location . href = successUrl ;
229
+ return ;
228
230
} else {
229
- alert ( "error in error" ) ;
231
+ window . location . href = errorUrl ;
232
+ return ;
230
233
}
231
234
}
232
235
} ) ;
0 commit comments