feat: add GPC SMS helper functionality with local SMS support
- Introduced GPC OTP channel selection (WhatsApp/SMS) in the sidepanel. - Added local SMS helper toggle and URL input for macOS users. - Implemented normalization functions for OTP channel and local SMS URL. - Updated settings payload to include new GPC helper configurations. - Enhanced Plus checkout process to utilize local SMS helper for OTP retrieval. - Added tests for GPC SMS helper script and its integration in the checkout flow. - Updated documentation to reflect new GPC helper features and configurations.
This commit is contained in:
@@ -46,6 +46,14 @@
|
||||
return String(value || '').trim().replace(/[^\d]/g, '');
|
||||
}
|
||||
|
||||
function normalizeGpcOtpChannel(value = '') {
|
||||
const normalized = String(value || '').trim().toLowerCase();
|
||||
if (normalized === 'sms') {
|
||||
return 'sms';
|
||||
}
|
||||
return 'whatsapp';
|
||||
}
|
||||
|
||||
function normalizeGpcHelperBaseUrl(apiUrl = '') {
|
||||
let normalized = String(apiUrl || DEFAULT_GPC_HELPER_API_URL).trim();
|
||||
if (!normalized) {
|
||||
@@ -213,6 +221,7 @@
|
||||
normalizeGoPayPhoneForCountry,
|
||||
normalizeGoPayOtp,
|
||||
normalizeGoPayPin,
|
||||
normalizeGpcOtpChannel,
|
||||
normalizePlusPaymentMethod,
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user