PluginProbe
HyperPay Payments / 5.3.0
HyperPay Payments v5.3.0
6.6.0 trunk 1.7 1.8 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.1.0 2.2.0 2.3.0 2.3.1 2.3.2 2.3.3 3.0.0 3.0.5 4.0.0 4.0.2 All 34 releases
hyperpay-gateways / src / assets / js / script.js

script.js in HyperPay Payments 5.3.0, at src/assets/js/script.js

51 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1
2 /**
3 *
4 * to check if current browser support ApplePay
5 * @param {boolean}
6 * if @returns {false} attach error message Your Device Dose Not Support ApplePay
7 */
8 if (!window.ApplePaySession && dataObj.payment_brands.includes('APPLEPAY')) {
9 jQuery('.woocommerce-notices-wrapper')
10 .append(`<ul class="woocommerce-error" role="alert"><li> ${dataObj.is_arabic ? 'جهازك او �
11 تصفحك لا يدع�
12 الدفع عن طريق ابل' : 'Your Device Or Browser Dose Not Support ApplePay'} </li></ul>`)
13 }
14
15
16 /**
17 * initiate wpwlOptions
18 */
19 var wpwlOptions = {
20
21 onReady: function () {
22
23 jQuery('.wpwl-form-virtualAccount-STC_PAY .wpwl-wrapper-radio-qrcode').hide();
24 jQuery('.wpwl-form-virtualAccount-STC_PAY .wpwl-wrapper-radio-mobile').hide();
25 jQuery('.wpwl-form-virtualAccount-STC_PAY .wpwl-group-paymentMode').hide();
26 jQuery('.wpwl-form-virtualAccount-STC_PAY .wpwl-group-mobilePhone').show();
27 jQuery('.wpwl-form-virtualAccount-STC_PAY .wpwl-wrapper-radio-mobile .wpwl-control-radio-mobile').attr('checked', true);
28 jQuery('.wpwl-form-virtualAccount-STC_PAY .wpwl-wrapper-radio-mobile .wpwl-control-radio-mobile').trigger('click');
29
30 },
31 style: dataObj.style, // <== this style comes from settings page of gateways
32 paymentTarget: "_top",
33 locale: dataObj.is_arabic ? 'ar' : 'en',
34 registrations: {
35 hideInitialPaymentForms: true,
36 requireCvv: "true"
37 },
38 browser: {
39 threeDChallengeWindow: 5
40 }
41
42
43 }
44
45
46 if (dataObj.supported_network) {
47 wpwlOptions.applePay = {
48 supportedNetworks: dataObj.supported_network
49 }
50 }
51