Skip to content

Commit

Permalink
HyperCharge v1.1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
larisagroza committed Dec 3, 2014
1 parent c51f8ef commit 1c29ab3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<config>
<modules>
<GlobalExperts_Hypercharge>
<version>1.1.10</version>
<version>1.1.12</version>
</GlobalExperts_Hypercharge>
</modules>

Expand Down
17 changes: 10 additions & 7 deletions skin/frontend/base/default/hypercharge/js/hypercharge.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ Hyper = Class.create({
data: data,
dataType: "xml",
headers: {'origin': this.headerOrigin},
//contentType: "application/text; charset=utf-8",
success: function (result) {
var xml = jQuery(result);
var transactionStatus = xml.find("status").text();
Expand Down Expand Up @@ -212,21 +211,25 @@ Hyper = Class.create({
dataType: "xml",
headers: {'origin': this.headerOrigin},
contentType: "application/text; charset=utf-8",
success: function(result) {
success: function (result) {
var xml = jQuery(result);
var transactionStatus = xml.find("status").text();

if (transactionStatus == 'approved' || transactionStatus == 'pending_async') {
alert("success");
window.location.href = successUrl;
return;
} else {
alert("error in success");
window.location.href = errorUrl;
return;
}
},
error: function(jqXHR, tranStatus, errorThrown) {
error: function (jqXHR, tranStatus, errorThrown) {
if (jqXHR.status == 200) {
alert("success in error");
window.location.href = successUrl;
return;
} else {
alert("error in error");
window.location.href = errorUrl;
return;
}
}
});
Expand Down

0 comments on commit 1c29ab3

Please sign in to comment.