(function (w, d, s, o, f, js, fjs) {
w[o] = w[o] || function () { (w[o].q = w[o].q || []).push(arguments) };
js = d.createElement(s), fjs = d.getElementsByTagName(s)[0];
js.id = o; js.src = f; js.async = 1; fjs.parentNode.insertBefore(js, fjs);
}(window, document, 'script', '_treezpay', 'https://development.d28pm8dafanify.amplifyapp.com/widget.js'));
/*
Script initialization
*/
_treezpay('init', {
element: document.querySelector(`#paysdk-widget`),
debug: true,
authTokenFactory: () => Promise.resolve(getCookie('authToken')),
getEntityId: () => Promise.resolve(document.getElementById('entityId').value), // Entity ID from input
theme: {
positionFixed: true,
},
dispensaryShortName: 'test-ach1',
disablePaymentMethods: [ //example of disabling payment methods
{
paymentMethod: 'Credit',
action: 'message', //hidden, or message (just for ecommerce channel)
message: 'This payment type is not supported in guest checkout. Please login to pay with credit.',
},
{
paymentMethod: 'Cash',
action: 'hidden', //hidden, or message (just for ecommerce channel)
message: 'Cash payments are currently disabled.',
}
]
});
Below you can initialize a payment by providing the necessary details.
Enabled or disabled payment methods. Message (just work for ecommerce channel) action will show a message when the payment method is selected. Hidden will not show the payment method at all.
Below you can initialize a payment by providing the necessary details.