paymob-pixel-alpha 1.1.9 → 1.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/README.md +4 -3
  2. package/main.js +91 -31
  3. package/package.json +1 -1
  4. package/styles.css +564 -558
package/README.md CHANGED
@@ -57,7 +57,7 @@ The full list of properties is as follows:
57
57
  | Property | Type | Definition |
58
58
  | --------------------- | -------------- | -------------- |
59
59
  | publicKey | String | It can be accessed from Merchant’s Dashboard → Settings → Account Info. |
60
- | clientSecre | String | Once you fire Intention API, you will receive “client_secret” in the API Response , which will be used in the Pixel SDK. Client Secret is unique for each Order and it expires in an hour. |
60
+ | clientSecret | String | Once you fire Intention API, you will receive “client_secret” in the API Response , which will be used in the Pixel SDK. Client Secret is unique for each Order and it expires in an hour. |
61
61
  | paymentMethods | Array of String | Pass card for Card Payments ,google-pay for Google Pay && apple-pay for Apple Pay. |
62
62
  | elementId | String | ID of the HTML element where the checkout pixel will be embedded. |
63
63
  | disablePay | Boolean | pass true If you don’t want to use Paymob’s Pay Button for Card Payment, in this case you will dispatchEvent with name (payFromOutside) to fire the pay. |
@@ -170,7 +170,7 @@ The full list of functions is as follows:
170
170
  HideCardLabel: true,
171
171
  Direction: 'rtl',
172
172
  Label_Text: {
173
- cardLabel: "بيانات البطاقة"
173
+ cardLabel: "بيانات البطاقة",
174
174
  savedCardsLabel: 'البطاقات المحفوطة',
175
175
  saveCardConsentLabel: 'حفظ البطاقة',
176
176
  },
@@ -181,7 +181,6 @@ The full list of functions is as follows:
181
181
  securityCode:'(CVV) الرمز الامني'
182
182
  },
183
183
  Error_Text: {
184
- holderName: 'مطلوب اسم حامل البطاقة',
185
184
  cardNumber: {
186
185
  required: 'مطلوب رقم البطاقة',
187
186
  invalid: 'رقم البطاقة غير صحيح'
@@ -190,6 +189,8 @@ The full list of functions is as follows:
190
189
  required: 'مطلوب تاريخ انتهاء الصلاحية',
191
190
  invalid: 'تاريخ انتهاء الصلاحية غير صحيح'
192
191
  },
192
+ securityCode: 'مطلوب الرمز الامني (CVV)',
193
+ holderName: 'مطلوب اسم حامل البطاقة',
193
194
  },
194
195
  Button_Text: {
195
196
  viewSavedCardsBtn: 'عرض البطاقات المحفوظة',
package/main.js CHANGED
@@ -32240,11 +32240,11 @@ const symplv3_en_namespaceObject = /*#__PURE__*/JSON.parse('{"ERR_MSG_SOMETHING_
32240
32240
  ;// CONCATENATED MODULE: ../../localization/apps/flash/symplv3/ur.json
32241
32241
  const symplv3_ur_namespaceObject = /*#__PURE__*/JSON.parse('{"ERR_MSG_SOMETHING_WENT_WRONG":"Something went wrong"}');
32242
32242
  ;// CONCATENATED MODULE: ../../localization/apps/flash/fastcheckout/ar.json
32243
- const fastcheckout_ar_namespaceObject = /*#__PURE__*/JSON.parse('{"PAY_WITH_BTN":"Pay with","FAST_CHECKOUT":"Fast checkout","LOGIN_CREATE_ACCOUNT":"Login or create account for faster checkout","QUICK_SETUP_TITLE":"Just last 2 quick steps","QUICK_SETUP_DESCRIPTION":"Complete the below steps for a fastest checkout from next time","VERIFY_ACCOUNT_TITLE":"Verify your account","ACCOUNT_VERIFIED_TITLE":"Account verified!","PASSKEY_TITLE":"Setup passkey","PASSKEY_DESCRIPTION":"Use your face, fingerprint, or passcode to log in to your account.","RESEND_CODE":"Resend code in","PLEASE_ENTER_CODE":"Please enter the {{length}} digit code we’ve sent to","REDIRECT_TO_PASSKEY":"Redirecting to passkey setup...","PASSKEY_CREATION_FAILED":"Passkey creation failed","PASSKEY_UNKNOWN_ERROR":"An unknown error occurred during passkey setup","PASSKEY_VERIFY_ERROR":"Failed to verify passkey","PASSKEY_UNEXPECTED_ERROR":"An unexpected error occurred","ERR_MSG_INVALID_OTP":"Incorrect OTP","ERR_MSG_SOMETHING_WENT_WRONG":"Something went wrong","CONTINUE_GUEST_BTN":"Or, Continue as a guest","WELCOME_BACK":"Welcome back","LOGIN_ENTER_OTP":"You’re logged with <identifier>{{identifier}}</identifier> \\nPlease enter the OTP for faster checkout","CREATE_ACCOUNT":"Create your account and \\nenjoy fastest checkouts","PAY_EASIER":"Pay easier","PAY_FASTER":"Pay faster","PAY_SECURE":"Pay secure","SETUP_ACCOUNT":"Setup your account","VERIFICATION_CODE":"Verification code","FAST_CHECKOUT_TERMS":"Pay faster on all Paymob’s partner channels. By continuing, you agree to <a>Terms of Service</a>","FAST_CHECKOUT_PAYMENT_INFO_SAVED":"Your payment information would be saved on the 1-Click Account.","SAVE_INFO_CREATE_ACCOUNT":"Save information to create 1-click account","FAST_CHECKOUT_LOGGED_WITH":"You\'re logged with","GREETING_ALREADY_HAVE":"Hey {{name}} 👋, you already have account","ALREADY_HAVE":"You already have Click account","LOGIN_AND_ENJOY":"Just login & enjoy fast checkout","LOGIN_WITH_OTP":"Login with OTP","LOGIN_WITH_PASSKEY":"Login with passkey","PASSKEY_FALLBACK":"Can’t login with Passkey? login with OTP instead","WANT_LOGOUT":"Do you want to logout?","WILL_BE_LOGGED_OUT":"You will be logged out from the 1-click checkout after this.","LOGOUT":"Logout","CANCEL":"Cancel","VISIT_PORTAL":"Visit 1-click portal","SAVED_PAYMENTS_TITLE":"Saved payment methods","SAVED_CARD_IDENTIFIER":"Card Ending with","DEFAULT":"Default","PAY_BTN":"Pay","IDENTIFIER_FORM_TITLE":"Email / Mobile number","CLICK_CONTINUE_BTN":"Continue","AGREE_T&C":"By continuing, You agree to Terms & conditions","ADD_NEW_METHOD_BTN":"New method","SAME_AS_BILLING_CHECKBOX":"Use the same as billing address","SHIPPING":"Shipping","BILLING":"Billing","ADDRESS":"Address","CHANGE":"Change","MAX_OTP_ATTEMPTS":"You have reached the maximum number of OTP attempts","ADD_NEW_SHIPPING_BTN":"New shipping address","ADD_NEW_BILLING_BTN":"New billing address","ADD_SHIPPING_TITLE":"Add shipping address","ADD_BILLING_TITLE":"Add billing address","EDIT_SHIPPING_TITLE":"Edit shipping address","EDIT_BILLING_TITLE":"Edit billing address","SAVE_ADDRESS_BTN":"Save address","ADDRESS_WILL_BE_DEFAULT":"This address will be set as default","ACCOUNT_DETECTED":"Click account detected"}');
32243
+ const fastcheckout_ar_namespaceObject = /*#__PURE__*/JSON.parse('{"PAY_WITH_BTN":"Pay with","FAST_CHECKOUT":"Fast checkout","LOGIN_CREATE_ACCOUNT":"Login or create account for faster checkout","QUICK_SETUP_TITLE":"Just last 2 quick steps","QUICK_SETUP_DESCRIPTION":"Complete the below steps for a fastest checkout from next time","VERIFY_ACCOUNT_TITLE":"Verify your account","ACCOUNT_VERIFIED_TITLE":"Account verified!","PASSKEY_TITLE":"Setup passkey","PASSKEY_DESCRIPTION":"Use your face, fingerprint, or passcode to log in to your account.","RESEND_CODE":"Resend code in","PLEASE_ENTER_CODE":"Please enter the {{length}} digit code we’ve sent to","REDIRECT_TO_PASSKEY":"Redirecting to passkey setup...","PASSKEY_CREATION_FAILED":"Passkey creation failed","PASSKEY_UNKNOWN_ERROR":"An unknown error occurred during passkey setup","PASSKEY_VERIFY_ERROR":"Failed to verify passkey","PASSKEY_UNEXPECTED_ERROR":"An unexpected error occurred","ERR_MSG_INVALID_OTP":"Incorrect OTP","ERR_MSG_SOMETHING_WENT_WRONG":"Something went wrong","CONTINUE_GUEST_BTN":"Or, Continue as a guest","WELCOME_BACK":"Welcome back","LOGIN_ENTER_OTP":"You’re logged with <identifier>{{identifier}}</identifier> \\nPlease enter the OTP for faster checkout","CREATE_ACCOUNT":"Create your account and \\nenjoy fastest checkouts","PAY_EASIER":"Pay easier","PAY_FASTER":"Pay faster","PAY_SECURE":"Pay secure","SETUP_ACCOUNT":"Setup your account","VERIFICATION_CODE":"Verification code","FAST_CHECKOUT_TERMS":"Pay faster on all Paymob’s partner channels. By continuing, you agree to <a>Terms of Service</a>","FAST_CHECKOUT_PAYMENT_INFO_SAVED":"Your payment information would be saved on the 1-Click Account.","SAVE_INFO_CREATE_ACCOUNT":"Save information to create 1-click account","FAST_CHECKOUT_LOGGED_WITH":"You\'re logged with","GREETING_ALREADY_HAVE":"Hey {{name}} 👋, you already have account","ALREADY_HAVE":"You already have Click account","LOGIN_AND_ENJOY":"Just login & enjoy fast checkout","LOGIN_WITH_OTP":"Login with OTP","LOGIN_WITH_PASSKEY":"Login with passkey","PASSKEY_FALLBACK":"Can’t login with Passkey? login with OTP instead","WANT_LOGOUT":"Do you want to logout?","WILL_BE_LOGGED_OUT":"You will be logged out from the 1-click checkout after this.","LOGOUT":"Logout","CANCEL":"Cancel","VISIT_PORTAL":"Visit 1-click portal","SAVED_PAYMENTS_TITLE":"Saved payment methods","SAVED_CARD_IDENTIFIER":"Card Ending with","DEFAULT":"Default","PAY_BTN":"Pay","IDENTIFIER_FORM_TITLE":"Email / Mobile number","CLICK_CONTINUE_BTN":"Continue","AGREE_T&C":"By continuing, You agree to Terms & conditions","ADD_NEW_METHOD_BTN":"New method","SAME_AS_BILLING_CHECKBOX":"Use the same as billing address","SHIPPING":"Shipping","BILLING":"Billing","ADDRESS":"Address","CHANGE":"Change","MAX_OTP_ATTEMPTS":"You have reached the maximum number of OTP attempts","ADD_NEW_SHIPPING_BTN":"New shipping address","ADD_NEW_BILLING_BTN":"New billing address","ADD_SHIPPING_TITLE":"Add shipping address","ADD_BILLING_TITLE":"Add billing address","EDIT_SHIPPING_TITLE":"Edit shipping address","EDIT_BILLING_TITLE":"Edit billing address","SAVE_ADDRESS_BTN":"Save address","ADDRESS_WILL_BE_DEFAULT":"This address will be set as default","ACCOUNT_DETECTED":"Detecting click account"}');
32244
32244
  ;// CONCATENATED MODULE: ../../localization/apps/flash/fastcheckout/en.json
32245
- const fastcheckout_en_namespaceObject = /*#__PURE__*/JSON.parse('{"PAY_WITH_BTN":"Pay with","FAST_CHECKOUT":"Fast checkout","LOGIN_CREATE_ACCOUNT":"Login or create account for faster checkout","QUICK_SETUP_TITLE":"Just last 2 quick steps","QUICK_SETUP_DESCRIPTION":"Complete the below steps for a fastest checkout from next time","VERIFY_ACCOUNT_TITLE":"Verify your account","ACCOUNT_VERIFIED_TITLE":"Account verified!","PASSKEY_TITLE":"Setup passkey","PASSKEY_DESCRIPTION":"Use your face, fingerprint, or passcode to log in to your account.","RESEND_CODE":"Resend code in","PLEASE_ENTER_CODE":"Please enter the {{length}} digit code we’ve sent to","REDIRECT_TO_PASSKEY":"Redirecting to passkey setup...","PASSKEY_CREATION_FAILED":"Passkey creation failed","PASSKEY_UNKNOWN_ERROR":"An unknown error occurred during passkey setup","PASSKEY_VERIFY_ERROR":"Failed to verify passkey","PASSKEY_UNEXPECTED_ERROR":"An unexpected error occurred","ERR_MSG_INVALID_OTP":"Incorrect OTP","ERR_MSG_SOMETHING_WENT_WRONG":"Something went wrong","CONTINUE_GUEST_BTN":"Or, Continue as a guest","WELCOME_BACK":"Welcome back","LOGIN_ENTER_OTP":"You’re logged with <identifier>{{identifier}}</identifier> \\nPlease enter the OTP for faster checkout","CREATE_ACCOUNT":"Create your account and \\nenjoy fastest checkouts","PAY_EASIER":"Pay easier","PAY_FASTER":"Pay faster","PAY_SECURE":"Pay secure","SETUP_ACCOUNT":"Setup your account","VERIFICATION_CODE":"Verification code","FAST_CHECKOUT_TERMS":"Pay faster on all Paymob’s partner channels. By continuing, you agree to <a>Terms of Service</a>","FAST_CHECKOUT_PAYMENT_INFO_SAVED":"Your payment information would be saved on the 1-Click Account.","SAVE_INFO_CREATE_ACCOUNT":"Save information to create 1-click account","FAST_CHECKOUT_LOGGED_WITH":"You\'re logged with","GREETING_ALREADY_HAVE":"Hey {{name}} 👋, you already have account","ALREADY_HAVE":"You already have Click account","LOGIN_AND_ENJOY":"Just login & enjoy fast checkout","LOGIN_WITH_OTP":"Login with OTP","LOGIN_WITH_PASSKEY":"Login with passkey","PASSKEY_FALLBACK":"Can’t login with Passkey? login with OTP instead","WANT_LOGOUT":"Do you want to logout?","WILL_BE_LOGGED_OUT":"You will be logged out from the 1-click checkout after this.","LOGOUT":"Logout","CANCEL":"Cancel","VISIT_PORTAL":"Visit 1-click portal","SAVED_PAYMENTS_TITLE":"Saved payment methods","SAVED_CARD_IDENTIFIER":"Card Ending with","DEFAULT":"Default","PAY_BTN":"Pay","IDENTIFIER_FORM_TITLE":"Email / Mobile number","CLICK_CONTINUE_BTN":"Continue","AGREE_T&C":"By continuing, You agree to Terms & conditions","ADD_NEW_METHOD_BTN":"New method","SAME_AS_BILLING_CHECKBOX":"Use the same as billing address","SHIPPING":"Shipping","BILLING":"Billing","ADDRESS":"Address","CHANGE":"Change","MAX_OTP_ATTEMPTS":"You have reached the maximum number of OTP attempts","ADD_NEW_SHIPPING_BTN":"New shipping address","ADD_NEW_BILLING_BTN":"New billing address","ADD_SHIPPING_TITLE":"Add shipping address","ADD_BILLING_TITLE":"Add billing address","EDIT_SHIPPING_TITLE":"Edit shipping address","EDIT_BILLING_TITLE":"Edit billing address","SAVE_ADDRESS_BTN":"Save address","ADDRESS_WILL_BE_DEFAULT":"This address will be set as default","ACCOUNT_DETECTED":"Click account detected"}');
32245
+ const fastcheckout_en_namespaceObject = /*#__PURE__*/JSON.parse('{"PAY_WITH_BTN":"Pay with","FAST_CHECKOUT":"Fast checkout","LOGIN_CREATE_ACCOUNT":"Login or create account for faster checkout","QUICK_SETUP_TITLE":"Just last 2 quick steps","QUICK_SETUP_DESCRIPTION":"Complete the below steps for a fastest checkout from next time","VERIFY_ACCOUNT_TITLE":"Verify your account","ACCOUNT_VERIFIED_TITLE":"Account verified!","PASSKEY_TITLE":"Setup passkey","PASSKEY_DESCRIPTION":"Use your face, fingerprint, or passcode to log in to your account.","RESEND_CODE":"Resend code in","PLEASE_ENTER_CODE":"Please enter the {{length}} digit code we’ve sent to","REDIRECT_TO_PASSKEY":"Redirecting to passkey setup...","PASSKEY_CREATION_FAILED":"Passkey creation failed","PASSKEY_UNKNOWN_ERROR":"An unknown error occurred during passkey setup","PASSKEY_VERIFY_ERROR":"Failed to verify passkey","PASSKEY_UNEXPECTED_ERROR":"An unexpected error occurred","ERR_MSG_INVALID_OTP":"Incorrect OTP","ERR_MSG_SOMETHING_WENT_WRONG":"Something went wrong","CONTINUE_GUEST_BTN":"Or, Continue as a guest","WELCOME_BACK":"Welcome back","LOGIN_ENTER_OTP":"You’re logged with <identifier>{{identifier}}</identifier> \\nPlease enter the OTP for faster checkout","CREATE_ACCOUNT":"Create your account and \\nenjoy fastest checkouts","PAY_EASIER":"Pay easier","PAY_FASTER":"Pay faster","PAY_SECURE":"Pay secure","SETUP_ACCOUNT":"Setup your account","VERIFICATION_CODE":"Verification code","FAST_CHECKOUT_TERMS":"Pay faster on all Paymob’s partner channels. By continuing, you agree to <a>Terms of Service</a>","FAST_CHECKOUT_PAYMENT_INFO_SAVED":"Your payment information would be saved on the 1-Click Account.","SAVE_INFO_CREATE_ACCOUNT":"Save information to create 1-click account","FAST_CHECKOUT_LOGGED_WITH":"You\'re logged with","GREETING_ALREADY_HAVE":"Hey {{name}} 👋, you already have account","ALREADY_HAVE":"You already have Click account","LOGIN_AND_ENJOY":"Just login & enjoy fast checkout","LOGIN_WITH_OTP":"Login with OTP","LOGIN_WITH_PASSKEY":"Login with passkey","PASSKEY_FALLBACK":"Can’t login with Passkey? login with OTP instead","WANT_LOGOUT":"Do you want to logout?","WILL_BE_LOGGED_OUT":"You will be logged out from the 1-click checkout after this.","LOGOUT":"Logout","CANCEL":"Cancel","VISIT_PORTAL":"Visit 1-click portal","SAVED_PAYMENTS_TITLE":"Saved payment methods","SAVED_CARD_IDENTIFIER":"Card Ending with","DEFAULT":"Default","PAY_BTN":"Pay","IDENTIFIER_FORM_TITLE":"Email / Mobile number","CLICK_CONTINUE_BTN":"Continue","AGREE_T&C":"By continuing, You agree to Terms & conditions","ADD_NEW_METHOD_BTN":"New method","SAME_AS_BILLING_CHECKBOX":"Use the same as billing address","SHIPPING":"Shipping","BILLING":"Billing","ADDRESS":"Address","CHANGE":"Change","MAX_OTP_ATTEMPTS":"You have reached the maximum number of OTP attempts","ADD_NEW_SHIPPING_BTN":"New shipping address","ADD_NEW_BILLING_BTN":"New billing address","ADD_SHIPPING_TITLE":"Add shipping address","ADD_BILLING_TITLE":"Add billing address","EDIT_SHIPPING_TITLE":"Edit shipping address","EDIT_BILLING_TITLE":"Edit billing address","SAVE_ADDRESS_BTN":"Save address","ADDRESS_WILL_BE_DEFAULT":"This address will be set as default","ACCOUNT_DETECTED":"Detecting click account"}');
32246
32246
  ;// CONCATENATED MODULE: ../../localization/apps/flash/fastcheckout/ur.json
32247
- const fastcheckout_ur_namespaceObject = /*#__PURE__*/JSON.parse('{"PAY_WITH_BTN":"Pay with","FAST_CHECKOUT":"Fast checkout","LOGIN_CREATE_ACCOUNT":"Login or create account for faster checkout","QUICK_SETUP_TITLE":"Just last 2 quick steps","QUICK_SETUP_DESCRIPTION":"Complete the below steps for a fastest checkout from next time","VERIFY_ACCOUNT_TITLE":"Verify your account","ACCOUNT_VERIFIED_TITLE":"Account verified!","PASSKEY_TITLE":"Setup passkey","PASSKEY_DESCRIPTION":"Use your face, fingerprint, or passcode to log in to your account.","RESEND_CODE":"Resend code in","PLEASE_ENTER_CODE":"Please enter the {{length}} digit code we’ve sent to","REDIRECT_TO_PASSKEY":"Redirecting to passkey setup...","PASSKEY_CREATION_FAILED":"Passkey creation failed","PASSKEY_UNKNOWN_ERROR":"An unknown error occurred during passkey setup","PASSKEY_VERIFY_ERROR":"Failed to verify passkey","PASSKEY_UNEXPECTED_ERROR":"An unexpected error occurred","ERR_MSG_INVALID_OTP":"Incorrect OTP","ERR_MSG_SOMETHING_WENT_WRONG":"Something went wrong","CONTINUE_GUEST_BTN":"Or, Continue as a guest","WELCOME_BACK":"Welcome back","LOGIN_ENTER_OTP":"You’re logged with <identifier>{{identifier}}</identifier> \\nPlease enter the OTP for faster checkout","CREATE_ACCOUNT":"Create your account and \\nenjoy fastest checkouts","PAY_EASIER":"Pay easier","PAY_FASTER":"Pay faster","PAY_SECURE":"Pay secure","SETUP_ACCOUNT":"Setup your account","VERIFICATION_CODE":"Verification code","FAST_CHECKOUT_TERMS":"Pay faster on all Paymob’s partner channels. By continuing, you agree to <a>Terms of Service</a>","FAST_CHECKOUT_PAYMENT_INFO_SAVED":"Your payment information would be saved on the 1-Click Account.","SAVE_INFO_CREATE_ACCOUNT":"Save information to create 1-click account","FAST_CHECKOUT_LOGGED_WITH":"You\'re logged with","GREETING_ALREADY_HAVE":"Hey {{name}} 👋, you already have account","ALREADY_HAVE":"You already have Click account","LOGIN_AND_ENJOY":"Just login & enjoy fast checkout","LOGIN_WITH_OTP":"Login with OTP","LOGIN_WITH_PASSKEY":"Login with passkey","PASSKEY_FALLBACK":"Can’t login with Passkey? login with OTP instead","WANT_LOGOUT":"Do you want to logout?","WILL_BE_LOGGED_OUT":"You will be logged out from the 1-click checkout after this.","LOGOUT":"Logout","CANCEL":"Cancel","VISIT_PORTAL":"Visit 1-click portal","SAVED_PAYMENTS_TITLE":"Saved payment methods","SAVED_CARD_IDENTIFIER":"Card Ending with","DEFAULT":"Default","PAY_BTN":"Pay","IDENTIFIER_FORM_TITLE":"Email / Mobile number","CLICK_CONTINUE_BTN":"Continue","AGREE_T&C":"By continuing, You agree to Terms & conditions","ADD_NEW_METHOD_BTN":"New method","SAME_AS_BILLING_CHECKBOX":"Use the same as billing address","SHIPPING":"Shipping","BILLING":"Billing","ADDRESS":"Address","CHANGE":"Change","MAX_OTP_ATTEMPTS":"You have reached the maximum number of OTP attempts","ADD_NEW_SHIPPING_BTN":"New shipping address","ADD_NEW_BILLING_BTN":"New billing address","ADD_SHIPPING_TITLE":"Add shipping address","ADD_BILLING_TITLE":"Add billing address","EDIT_SHIPPING_TITLE":"Edit shipping address","EDIT_BILLING_TITLE":"Edit billing address","SAVE_ADDRESS_BTN":"Save address","ADDRESS_WILL_BE_DEFAULT":"This address will be set as default","ACCOUNT_DETECTED":"Click account detected"}');
32247
+ const fastcheckout_ur_namespaceObject = /*#__PURE__*/JSON.parse('{"PAY_WITH_BTN":"Pay with","FAST_CHECKOUT":"Fast checkout","LOGIN_CREATE_ACCOUNT":"Login or create account for faster checkout","QUICK_SETUP_TITLE":"Just last 2 quick steps","QUICK_SETUP_DESCRIPTION":"Complete the below steps for a fastest checkout from next time","VERIFY_ACCOUNT_TITLE":"Verify your account","ACCOUNT_VERIFIED_TITLE":"Account verified!","PASSKEY_TITLE":"Setup passkey","PASSKEY_DESCRIPTION":"Use your face, fingerprint, or passcode to log in to your account.","RESEND_CODE":"Resend code in","PLEASE_ENTER_CODE":"Please enter the {{length}} digit code we’ve sent to","REDIRECT_TO_PASSKEY":"Redirecting to passkey setup...","PASSKEY_CREATION_FAILED":"Passkey creation failed","PASSKEY_UNKNOWN_ERROR":"An unknown error occurred during passkey setup","PASSKEY_VERIFY_ERROR":"Failed to verify passkey","PASSKEY_UNEXPECTED_ERROR":"An unexpected error occurred","ERR_MSG_INVALID_OTP":"Incorrect OTP","ERR_MSG_SOMETHING_WENT_WRONG":"Something went wrong","CONTINUE_GUEST_BTN":"Or, Continue as a guest","WELCOME_BACK":"Welcome back","LOGIN_ENTER_OTP":"You’re logged with <identifier>{{identifier}}</identifier> \\nPlease enter the OTP for faster checkout","CREATE_ACCOUNT":"Create your account and \\nenjoy fastest checkouts","PAY_EASIER":"Pay easier","PAY_FASTER":"Pay faster","PAY_SECURE":"Pay secure","SETUP_ACCOUNT":"Setup your account","VERIFICATION_CODE":"Verification code","FAST_CHECKOUT_TERMS":"Pay faster on all Paymob’s partner channels. By continuing, you agree to <a>Terms of Service</a>","FAST_CHECKOUT_PAYMENT_INFO_SAVED":"Your payment information would be saved on the 1-Click Account.","SAVE_INFO_CREATE_ACCOUNT":"Save information to create 1-click account","FAST_CHECKOUT_LOGGED_WITH":"You\'re logged with","GREETING_ALREADY_HAVE":"Hey {{name}} 👋, you already have account","ALREADY_HAVE":"You already have Click account","LOGIN_AND_ENJOY":"Just login & enjoy fast checkout","LOGIN_WITH_OTP":"Login with OTP","LOGIN_WITH_PASSKEY":"Login with passkey","PASSKEY_FALLBACK":"Can’t login with Passkey? login with OTP instead","WANT_LOGOUT":"Do you want to logout?","WILL_BE_LOGGED_OUT":"You will be logged out from the 1-click checkout after this.","LOGOUT":"Logout","CANCEL":"Cancel","VISIT_PORTAL":"Visit 1-click portal","SAVED_PAYMENTS_TITLE":"Saved payment methods","SAVED_CARD_IDENTIFIER":"Card Ending with","DEFAULT":"Default","PAY_BTN":"Pay","IDENTIFIER_FORM_TITLE":"Email / Mobile number","CLICK_CONTINUE_BTN":"Continue","AGREE_T&C":"By continuing, You agree to Terms & conditions","ADD_NEW_METHOD_BTN":"New method","SAME_AS_BILLING_CHECKBOX":"Use the same as billing address","SHIPPING":"Shipping","BILLING":"Billing","ADDRESS":"Address","CHANGE":"Change","MAX_OTP_ATTEMPTS":"You have reached the maximum number of OTP attempts","ADD_NEW_SHIPPING_BTN":"New shipping address","ADD_NEW_BILLING_BTN":"New billing address","ADD_SHIPPING_TITLE":"Add shipping address","ADD_BILLING_TITLE":"Add billing address","EDIT_SHIPPING_TITLE":"Edit shipping address","EDIT_BILLING_TITLE":"Edit billing address","SAVE_ADDRESS_BTN":"Save address","ADDRESS_WILL_BE_DEFAULT":"This address will be set as default","ACCOUNT_DETECTED":"Detecting click account"}');
32248
32248
  ;// CONCATENATED MODULE: ../../localization/libs/card/en.json
32249
32249
  const libs_card_en_namespaceObject = /*#__PURE__*/JSON.parse('{"CARD_INFO":"Card Information","CARDHOLDER_NAME":"Cardholder Name","CARD_NUMBER":"Card Number","CARD_NUMBER_NOT_VALID":"Card number is not valid","CARD_NUMBER_IS_REQUIRED":"Card number is required","CARD_EXPIRY":"Expiry (MM/YY)","CARD_EXPIRY_NOT_VALID":"Expiry date is not valid","CARD_EXPIRY_IS_REQUIRED":"Expiry date is required","AMEX_CVV_IS_REQUIRED":"4-digit CVV is required","CVV_IS_REQUIRED":"3-digit CVV is required","CARD_NAME":"Name on card","CARD_NAME_PLACEHOLDER":"ex. Abdullah Adel","CARD_NAME_NOT_VALID":"Card name is not valid","CARD_NAME_IS_REQUIRED":"Cardholder Name is required","NAME_IS_REQUIRED":"Name is required","EMAIL_IS_REQUIRED":"Email is required","EMAIL_NOT_VALID":"Email is not valid","PHONE_IS_REQUIRED":"Phone is required","PHONE_NOT_VALID":"Phone is not valid","SAVED_CARDS_TITLE":"Saved cards","SAVE_CARD":"Save card for future use","ADD_NEW_CARD_BTN":"New card","CARD_ACTION_BTN":"Pay","OTP_ACTION_BTN":"Verify OTP","CARD_NUMBER_PLACEHOLDER":"1234 1234 1234 1234","MOBILE_CARD_NUMBER_PLACEHOLDER":"Card number","OTP_HINT":"Please enter the 4-digit code sent to your mobile","CVV_MODAL_HEADER":"CVV","CVV_MODAL_VISA_HEADER":"Have Mastercard / Visa card?","CVV_MODAL_VISA_BODY":"It\'s a 3-digit code on the back of your card.","CVV_MODAL_AMEX_HEADER":"Have American Express card?","CVV_MODAL_AMEX_BODY":"It\'s a 4-digit number on the front, just above your credit card number","ERR_MSG_EXCEEDED_TRIALS":"The payment session ends after 3 unsuccessful trials. You will be redirected to the website. You can start a new checkout session with Paymob","ERR_MSG_ALREADY_PROCESSED":"This payment was already processed with status pending","ERR_MSG_DECLINED":"Payment is declined","ERR_MSG_EXPIRED":"Looks like this payment was expired perhaps you should create a new one","ERR_MSG_SOMETHING_WENT_WRONG":"Something went wrong","FORCE_SAVE_CARD":"Card Details would be saved for future use","ERR_MSG_ALREADY_PAID":"This order has already been paid","ERR_OMAN_NET_INVALID":"Oman Net Card can’t be used for transaction. Please use another card type.","VIEW_SAVED_CARDS":"View Saved Cards"}');
32250
32250
  ;// CONCATENATED MODULE: ../../localization/libs/card/ar.json
@@ -32719,6 +32719,62 @@ i18next.use(initReactI18next).init({
32719
32719
  }
32720
32720
  });
32721
32721
  /* harmony default export */ const localization_i18n = ((/* unused pure expression or super */ null && (i18n)));
32722
+ ;// CONCATENATED MODULE: ./src/utils/ShadowWrapper.tsx
32723
+
32724
+
32725
+
32726
+ const ShadowWrapper = ({
32727
+ elementId,
32728
+ stylesheets: _stylesheets = ['/main.css', '/styles.css'],
32729
+ children
32730
+ }) => {
32731
+ const [shadowRoot, setShadowRoot] = (0,react.useState)(null);
32732
+ const [error, setError] = (0,react.useState)(null);
32733
+ (0,react.useEffect)(() => {
32734
+ const container = document.getElementById(elementId);
32735
+ if (!('attachShadow' in Element.prototype)) {
32736
+ setError('Shadow DOM is not supported in this browser');
32737
+ return;
32738
+ }
32739
+ try {
32740
+ let shadow = container.shadowRoot;
32741
+ if (!shadow) {
32742
+ shadow = container.attachShadow({
32743
+ mode: 'open'
32744
+ });
32745
+ _stylesheets.forEach(path => {
32746
+ var _shadow;
32747
+ const link = document.createElement('link');
32748
+ link.rel = 'stylesheet';
32749
+ link.href = path;
32750
+ (_shadow = shadow) == null || _shadow.appendChild(link);
32751
+ });
32752
+ }
32753
+ setShadowRoot(shadow);
32754
+ } catch (error) {
32755
+ console.error('Failed to create Shadow DOM:', error);
32756
+ setError(`Failed to create Shadow DOM: ${error instanceof Error ? error.message : String(error)}`);
32757
+ }
32758
+ return () => {
32759
+ setShadowRoot(null);
32760
+ };
32761
+ }, [elementId, _stylesheets]);
32762
+ if (error) {
32763
+ const container = document.getElementById(elementId);
32764
+ return /*#__PURE__*/(0,react_dom.createPortal)( /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
32765
+ style: {
32766
+ color: 'red',
32767
+ padding: '10px'
32768
+ },
32769
+ children: error
32770
+ }), container);
32771
+ }
32772
+ if (shadowRoot) {
32773
+ return /*#__PURE__*/(0,react_dom.createPortal)(children, shadowRoot);
32774
+ }
32775
+ return null;
32776
+ };
32777
+ /* harmony default export */ const utils_ShadowWrapper = (ShadowWrapper);
32722
32778
  ;// CONCATENATED MODULE: ./src/lib/pixel.tsx
32723
32779
  var _Pixel;
32724
32780
 
@@ -32730,6 +32786,7 @@ var _Pixel;
32730
32786
 
32731
32787
 
32732
32788
 
32789
+
32733
32790
  class Pixel {
32734
32791
  constructor(options) {
32735
32792
  var _options$showPaymobLo;
@@ -32855,7 +32912,8 @@ class Pixel {
32855
32912
  return await instance._paymentsRef.current.handleGenerateToken();
32856
32913
  }
32857
32914
  render() {
32858
- const container = document.getElementById(this._options['elementId']);
32915
+ const elementId = this._options['elementId'];
32916
+ const container = document.getElementById(elementId);
32859
32917
  if (!container) {
32860
32918
  console.error(`Container with ID ${this._options['elementId']} not found`);
32861
32919
  return;
@@ -32869,34 +32927,36 @@ class Pixel {
32869
32927
  }));
32870
32928
  return;
32871
32929
  }
32872
- container.classList.add('paymob-pixel-lib');
32873
32930
  this._root.render( /*#__PURE__*/(0,jsx_runtime.jsx)(react.StrictMode, {
32874
- children: /*#__PURE__*/(0,jsx_runtime.jsx)(components_Payments, Object.assign({
32875
- baseUrl: this._baseURL,
32876
- paymentList: this._paymentList,
32877
- payment: this._paymentMethod,
32878
- disablePay: this._options['disablePay'],
32879
- showPaymobLogo: this._options['showPaymobLogo'],
32880
- customStyle: this._options['customStyle'],
32881
- savedCards: this._savedCards,
32882
- forceSaveCard: this._options['forceSaveCard'],
32883
- showSaveCard: this._options['showSaveCard'],
32884
- hideCardHolderName: this._options['hideCardHolderName'],
32885
- publicKey: this._options['publicKey'],
32886
- clientSecret: this._options['clientSecret'],
32887
- selectedPaymentMethods: this._options['paymentMethods'],
32888
- ref: this._paymentsRef
32889
- }, this._options.beforePaymentComplete && {
32890
- onBeforePaymentComplete: this.handleBeforePaymentComplete.bind(this)
32891
- }, this._options.afterPaymentComplete && {
32892
- onAfterPaymentComplete: this.handleAfterPaymentComplete.bind(this)
32893
- }, this._options.onPaymentCancel && {
32894
- onPaymentCancel: this.handleOnPaymentCancel.bind(this)
32895
- }, this._options.cardValidationChanged && {
32896
- onCardValidationChanged: this.handleCardValidationChanged.bind(this)
32897
- }, {
32898
- integrationType: this._integrationType
32899
- }), Date.now())
32931
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)(utils_ShadowWrapper, {
32932
+ elementId: elementId,
32933
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)(components_Payments, Object.assign({
32934
+ baseUrl: this._baseURL,
32935
+ paymentList: this._paymentList,
32936
+ payment: this._paymentMethod,
32937
+ disablePay: this._options['disablePay'],
32938
+ showPaymobLogo: this._options['showPaymobLogo'],
32939
+ customStyle: this._options['customStyle'],
32940
+ savedCards: this._savedCards,
32941
+ forceSaveCard: this._options['forceSaveCard'],
32942
+ showSaveCard: this._options['showSaveCard'],
32943
+ hideCardHolderName: this._options['hideCardHolderName'],
32944
+ publicKey: this._options['publicKey'],
32945
+ clientSecret: this._options['clientSecret'],
32946
+ selectedPaymentMethods: this._options['paymentMethods'],
32947
+ ref: this._paymentsRef
32948
+ }, this._options.beforePaymentComplete && {
32949
+ onBeforePaymentComplete: this.handleBeforePaymentComplete.bind(this)
32950
+ }, this._options.afterPaymentComplete && {
32951
+ onAfterPaymentComplete: this.handleAfterPaymentComplete.bind(this)
32952
+ }, this._options.onPaymentCancel && {
32953
+ onPaymentCancel: this.handleOnPaymentCancel.bind(this)
32954
+ }, this._options.cardValidationChanged && {
32955
+ onCardValidationChanged: this.handleCardValidationChanged.bind(this)
32956
+ }, {
32957
+ integrationType: this._integrationType
32958
+ }), Date.now())
32959
+ })
32900
32960
  }));
32901
32961
  }
32902
32962
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paymob-pixel-alpha",
3
- "version": "1.1.9",
3
+ "version": "1.1.10",
4
4
  "keywords": ["paymob","pixel","paymob-pixel"],
5
5
  "main": "./main.js",
6
6
  "license": "MIT",