Skip to content

Commit

Permalink
fix: Fixed success and error callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
filipperodrigues committed Nov 30, 2022
1 parent 5ec4a6e commit 1fdaa1e
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,17 @@
],
};

plugCheckoutFull.addEventListener("paymentSuccess", ({ detail: { data } }) => {
console.log(data);
});
plugCheckoutFull.addEventListener(
"transactionSuccess",
({ detail: { data } }) => {
console.log(data);
}
);

plugCheckoutFull.addEventListener("paymentError", ({ detail: { error } }) => {
console.log(error);
});
plugCheckoutFull.addEventListener(
"transactionFailed",
({ detail: { error } }) => {
console.log(error);
}
);
})();

0 comments on commit 1fdaa1e

Please sign in to comment.