Skip to content

Commit

Permalink
using window.parent for sending postMessage()
Browse files Browse the repository at this point in the history
  • Loading branch information
dmengelt committed Sep 10, 2024
1 parent 32be998 commit c6e46ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/iframed.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
 */
function processPayment(paymentData) {
console.log(paymentData);
window.postMessage("Success with card: " + paymentData.paymentMethodData.description, "https://dmengelt.github.io");
window.parent.postMessage("Success with card: " + paymentData.paymentMethodData.description, "https://dmengelt.github.io");
  // show returned data in developer console for debugging  
  // @todo pass payment token to your gateway to process payment
  paymentToken = paymentData.paymentMethodData.tokenizationData.token;
Expand Down

0 comments on commit c6e46ce

Please sign in to comment.