Home worldpay useTemplateForm callback
Reply: 0

worldpay useTemplateForm callback

lab6
1#
lab6 Published in 2018-01-12 16:08:54Z

I implemented worldpay on my onepage angular app (angular 1.x). Im using useTemplateForm() method to generate credit card form and retrive token. Everything is working fine, except that my callback function (that is set in useTemplateForm) is called multiple times after retriving token.

This is due to calling useTemplateForm every time payments window pops up. Worldpay.js somehow stacks those callbacks instead of clearing them and i have no idea how to prevent it. I have to call useTemplateForm every time window pops up cos the element (div) that contains iframe is destroyed every time payment window closes. Destroying this element doesnt reset stacked callbacks tho.

I can handle this in different ways, but id rather use some method to prevent stacking infinite amount of callbacks cos at the end it will just consume unnecessary resources.

Anyone got any idea how to "fix" this ?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.300322 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO