Skip to content
Snippets Groups Projects
Commit ce498065 authored by Anas Mawlawi's avatar Anas Mawlawi
Browse files

Issue #3445236 by Anas_maw, hamzadwaya: Compatible With drupal 10

parent 78975218
No related branches found
No related tags found
No related merge requests found
var wpwlOptions;
(function ($, Drupal, drupalSettings) {
"use strict";
'use strict';
Drupal.behaviors.initHyperpayPayment = {
attach: function (context) {
var $form = $(context).find(".paymentWidgets");
var $form = $(context).find('.paymentWidgets');
if ($form.length > 0) {
$form.once("hyperpay-payment-form").each(function () {
var hyperpay_settings = drupalSettings.commerce_hyperpay_pg;
$(once("hyperpay-payment-form",$form)).each(function () {
var hyperpay_settings = drupalSettings.commerce_hyperpay;
wpwlOptions = {
locale: hyperpay_settings.langcode,
style: hyperpay_settings.style,
locale: hyperpay_settings.langcode
};
var hyperpay = document.createElement("script");
hyperpay.type = "text/javascript";
hyperpay.src = hyperpay_settings.hyperpay_url;
var s = document.getElementsByTagName("script")[0];
var hyperpay = document.createElement('script');
hyperpay.type = 'text/javascript';
hyperpay.src = hyperpay_settings.hyperpay_url;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(hyperpay, s);
});
}
},
}
};
})(jQuery, Drupal, drupalSettings);
})(jQuery, Drupal, drupalSettings , once);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment