Open fake-or-dead opened 9 years ago
@tommy-omise already opened a PR (#2) to let multiple instance live on the same page. We'll merge soon.
we need to change card.js source to https://omise-cdn.s3.amazonaws.com/card.js right?
Don't need to. I've started invalidating the CDN cache. The new version will be up in a few minutes. Let me know if the problem is solved.
ok thanks ;D
@fake-or-dead working?
nope still the same :(
I think the problems is
var target = document.documentElement;
while (target.childNodes.length && target.lastChild.nodeType == 1) {
target = target.lastChild;
}
in getScriptElement function because I put omise button in another html template and popup dialog via ngDialog and card.js try to insert button in wrong place like this (in ng-close div of ngDialog)
so card.js cannot capture any attributes that need (as you see in picture above)
may be this is expected results that occur when I open html template alone
OK we've looked at the issue more thoroughly today and given the way you're loading the button I'm not sure how we'll be able to solve this.
Since we have not yet added programmatic access to open the form from a method call you won't be able to use card.js for now. And I'm not sure when we'll have the time to do it.
The only way I can recommend you to do now is to build your own form and use omise/omise.js directly to create a token.
I plan to use card.js in Dialog box to paid
but when load with html example in https://docs.omise.co/card-js/ is not working I try to reproduce getScriptElement methods so i found this
from the same page with 2 scenario normal and popup dialog
so that make omise payment popup is not have any data