Learning Java Day 51

I wrote my first line of Java on April 30, and today is June 19. The hardest part of a self-taught course of study is deciding what you want to learn, the second hardest part is finding the right…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Vue JS a promise modal

I started with a scenario that required my client to be redirected to a third-party payment gateway, while I did not want the user to leave my website. I, therefore, loaded an iframe and inserted the gateway payment into the iframe. (e.g. Paypal).

Since the inserted content is not served via our domain, we can not see the status or receive any information because of browser security protocols. (CORS).

Below is the code created in Vue JS. I believe the code is self-explaining with a little knowledge of Vue.JS.

The file “callback-modal.vue” is the sample page redirected from our gateway to our success or failure page. This allows us to find the modal parent window function to close the modal and return a promise.

Add a comment

Related posts:

Top 5 Marketing Jobs in India with the Highest Pay

Anyone between the ages of 20 and 60 will tell you that the concept of “leisure” is a passing one. We do not have time to stop as we race to meet the never-ending list of deadlines. But regardless of…

The Design Thinking and Lean Startup Models Are Broken. Here Is the Innovation Vortex!

I love Design Thinking and Lean Startup but their visualization models are broken. When the actual goal is continuous innovation, it makes sense to use a more innovative model: The Innovation Vortex.

Pleasant Valley School students become environmentally conscious after a series of projects

Throughout the previous school year, Meghan Loomis taught her then fourth-grade students at Pleasant Valley School about plastic water bottle waste and how her students can upcycle them into colorful…