Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to pass language string to function in checkout page #21

Open
ahmadsaadkhan opened this issue Nov 8, 2021 · 0 comments
Open

how to pass language string to function in checkout page #21

ahmadsaadkhan opened this issue Nov 8, 2021 · 0 comments

Comments

@ahmadsaadkhan
Copy link

Hello, I want to pass below language option below to function renderPaymentform how can add this.
let wpwlOptions = {
locale: "ar",
numberFormatting:false
}

renderPaymentform = () => {
console.log('Loading ')
const script = document.createElement("script");

    script.src = `https://test.oppwa.com/v1/paymentWidgets.js?checkoutId=${this.state.checkoutId}`;
    script.async = true;

    document.body.appendChild(script);

    const form = document.createElement("form")
    form.action = "http://localhost:3000/result";
    form.setAttribute("class", "paymentWidgets");
    form.setAttribute("data-brands", "VISA MASTER AMEX")
    document.body.appendChild(form);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant