elpaypg 0.0.0-stage → 2.0.1
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.
- package/.env.example +8 -0
- package/README.md +176 -2
- package/package.json +21 -4
- package/public/elpay-checkout.js +769 -0
- package/public/elpay-sms-gateway.apk +0 -0
- package/public/elpay-sms-gateway.apk.sha256 +1 -0
- package/public/elpay.js +785 -0
- package/public/fonts/dm-sans.woff2 +0 -0
- package/public/fonts/sora.woff2 +0 -0
- package/public/views/checkout.html +2839 -0
- package/public/views/partials/auth.html +110 -0
- package/public/views/partials/footer.html +54 -0
- package/public/views/partials/header.html +101 -0
- package/public/views/partials/modals.html +179 -0
- package/public/views/partials/payment-methods.html +526 -0
- package/public/views/partials/sidebar.html +75 -0
- package/public/views/partials/splash.html +35 -0
- package/src/__tests__/smoke.test.js +8 -0
- package/src/auth-guard.js +95 -0
- package/src/index.js +137 -0
- package/src/router.js +46 -0
- package/src/routes/admin.routes.js +2424 -0
- package/src/routes/checkout.routes.js +2000 -0
- package/src/routes/customer.routes.js +650 -0
- package/src/routes/device.routes.js +303 -0
- package/src/routes/payments.routes.js +446 -0
- package/src/routes/pollers.routes.js +653 -0
- package/src/services/observer-poller.service.js +369 -0
- package/src/services/tunnel-manager.js +130 -0
- package/src/services/whatsapp-berry.service.js +743 -0
- package/src/vendor/common/__tests__/common.test.js +297 -0
- package/src/vendor/common/__tests__/common.test.ts +160 -0
- package/src/vendor/common/contracts.js +64 -0
- package/src/vendor/common/contracts.ts +188 -0
- package/src/vendor/common/crypto.js +132 -0
- package/src/vendor/common/crypto.ts +112 -0
- package/src/vendor/common/enums.js +91 -0
- package/src/vendor/common/enums.ts +91 -0
- package/src/vendor/common/index.js +12 -0
- package/src/vendor/common/index.ts +8 -0
- package/src/vendor/common/money.js +62 -0
- package/src/vendor/common/money.ts +56 -0
- package/src/vendor/common/observation.js +27 -0
- package/src/vendor/common/observation.ts +52 -0
- package/src/vendor/common/runtime-config.js +246 -0
- package/src/vendor/common/secrets.js +374 -0
- package/src/vendor/common/state-machine.d.ts +1 -0
- package/src/vendor/common/state-machine.js +1 -0
- package/src/vendor/common/state-transitions.js +85 -0
- package/src/vendor/common/tunnel-command.js +59 -0
- package/src/vendor/common/upi-providers.js +389 -0
- package/src/vendor/common/upi-providers.ts +400 -0
- package/src/vendor/common/upi.js +69 -0
- package/src/vendor/common/upi.ts +61 -0
- package/src/vendor/core/__tests__/core.test.js +683 -0
- package/src/vendor/core/__tests__/queue-timing.test.js +237 -0
- package/src/vendor/core/__tests__/webhook-engine.test.js +243 -0
- package/src/vendor/core/attribution-engine.js +855 -0
- package/src/vendor/core/bank-email-parser.js +105 -0
- package/src/vendor/core/bank-sms-parser.js +183 -0
- package/src/vendor/core/device-security.js +506 -0
- package/src/vendor/core/index.js +13 -0
- package/src/vendor/core/normalizer.js +165 -0
- package/src/vendor/core/qr-lib.js +8 -0
- package/src/vendor/core/qr.js +62 -0
- package/src/vendor/core/queue-engine.js +153 -0
- package/src/vendor/core/recovery-engine.js +159 -0
- package/src/vendor/core/state-machine.js +42 -0
- package/src/vendor/core/timing-engine.js +272 -0
- package/src/vendor/core/verification-pipeline.js +1164 -0
- package/src/vendor/core/webhook-engine.js +280 -0
- package/src/vendor/db/__tests__/auth-matrix.test.js +564 -0
- package/src/vendor/db/__tests__/customer-reset.test.js +95 -0
- package/src/vendor/db/__tests__/db.test.js +265 -0
- package/src/vendor/db/__tests__/schema-parity.test.js +137 -0
- package/src/vendor/db/__tests__/sqlite_verify.test.js +15 -0
- package/src/vendor/db/database.js +181 -0
- package/src/vendor/db/index.js +12 -0
- package/src/vendor/db/migrate.js +210 -0
- package/src/vendor/db/repositories/audit-log.repository.js +68 -0
- package/src/vendor/db/repositories/customer-session.repository.js +181 -0
- package/src/vendor/db/repositories/customer.repository.js +636 -0
- package/src/vendor/db/repositories/device.repository.js +285 -0
- package/src/vendor/db/repositories/merchant.repository.js +158 -0
- package/src/vendor/db/repositories/observation.repository.js +124 -0
- package/src/vendor/db/repositories/payment-session.repository.js +618 -0
- package/src/vendor/db/repositories/receiving-account.repository.js +244 -0
- package/src/vendor/db/repositories/support-ticket.repository.js +140 -0
- package/src/vendor/db/schema.sql +266 -0
- package/src/vendor/db/sqlite-schema.sql +270 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<!-- PRE-GATEWAY CUSTOMER AUTHENTICATION VIEW (WHATSAPP BERRY PROTOCOL OTP FLOW) -->
|
|
2
|
+
<div id="preGatewayAuthView" hidden>
|
|
3
|
+
<h2 class="ypg-page-title" id="authViewMainTitle">Sign in to Pay</h2>
|
|
4
|
+
<div class="ypg-auth-box">
|
|
5
|
+
<div class="ypg-auth-sub-desc" id="authViewSubTitle">Enter your 10-digit WhatsApp mobile number to continue
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<!-- Saved Account (1-Tap Selection) -->
|
|
9
|
+
<div class="ypg-saved-accs-wrapper" id="preAuthSavedAccountsContainer" hidden>
|
|
10
|
+
<div
|
|
11
|
+
style="font-size:11px; font-weight:800; color:var(--ypg-text-muted); text-transform:uppercase; margin-bottom:8px;">
|
|
12
|
+
Saved Account
|
|
13
|
+
</div>
|
|
14
|
+
<div id="savedAccountsList"></div>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<!-- STEP 1: ENTER MOBILE NUMBER -->
|
|
18
|
+
<div id="authStepMobile">
|
|
19
|
+
<div class="ypg-input-group">
|
|
20
|
+
<label class="ypg-input-label">WhatsApp Mobile Number</label>
|
|
21
|
+
<div class="ypg-phone-input-wrap">
|
|
22
|
+
<div class="ypg-phone-prefix">
|
|
23
|
+
<span>🇮🇳</span>
|
|
24
|
+
<span>+91</span>
|
|
25
|
+
</div>
|
|
26
|
+
<input type="tel" class="ypg-phone-control" id="authMobileInput" placeholder="10-digit mobile number"
|
|
27
|
+
maxlength="10" inputmode="numeric" />
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div
|
|
32
|
+
style="font-size:12px; color:var(--ypg-text-muted); margin-bottom:14px; display:flex; align-items:center; gap:6px;">
|
|
33
|
+
<span>💬</span>
|
|
34
|
+
<span>We'll verify your mobile via WhatsApp OTP</span>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<button type="button" class="ypg-btn-auth-action" id="btnAuthContinue" onclick="handleAuthMobileSubmit()">
|
|
38
|
+
<span>Continue</span> ›
|
|
39
|
+
</button>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<!-- STEP 2: NEW CUSTOMER SIGN UP (Shown only if user does NOT exist) -->
|
|
43
|
+
<div id="authStepSignup" hidden>
|
|
44
|
+
<div class="ypg-auth-badge-banner">
|
|
45
|
+
<div>
|
|
46
|
+
<span>Mobile: </span>
|
|
47
|
+
<strong id="authSignupPhoneBadge">+91 </strong>
|
|
48
|
+
</div>
|
|
49
|
+
<button type="button" class="ypg-btn-link" onclick="goToAuthStep('mobile')">Change</button>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<div style="font-size:12.5px; color:var(--ypg-text-dark); font-weight:600; margin-bottom:12px;">
|
|
53
|
+
New to ELPAY PG? Please enter your name and email to proceed:
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<div class="ypg-input-group">
|
|
57
|
+
<label class="ypg-input-label">Full Name</label>
|
|
58
|
+
<input type="text" class="ypg-input-control" id="authSignupName" placeholder="e.g. Alex Sharma" />
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<div class="ypg-input-group">
|
|
62
|
+
<label class="ypg-input-label">Email Address</label>
|
|
63
|
+
<input type="email" class="ypg-input-control" id="authSignupEmail"
|
|
64
|
+
placeholder="e.g. gaurav@example.com" />
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<button type="button" class="ypg-btn-auth-action" id="btnAuthSignup" onclick="handleAuthSignupSubmit()">
|
|
68
|
+
<span>Sign Up & Send WhatsApp OTP</span> ›
|
|
69
|
+
</button>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<!-- STEP 3: OTP VERIFICATION (Shown for existing user login OR after signup) -->
|
|
73
|
+
<div id="authStepOtp" hidden>
|
|
74
|
+
<div class="ypg-auth-badge-banner" style="background:#eff6ff; border-color:#bfdbfe; color:#1e40af;">
|
|
75
|
+
<div>
|
|
76
|
+
<span>Code sent to WhatsApp / SMS: </span>
|
|
77
|
+
<strong id="authOtpPhoneBadge">+91 </strong>
|
|
78
|
+
</div>
|
|
79
|
+
<button type="button" class="ypg-btn-link" onclick="goToAuthStep('mobile')">Edit</button>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<div id="authOtpGreeting"
|
|
83
|
+
style="font-size:12.5px; color:var(--ypg-text-dark); font-weight:600; margin-bottom:8px;">
|
|
84
|
+
Enter the 6-digit code sent to your phone:
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<div class="ypg-input-group">
|
|
88
|
+
<input type="text" class="ypg-input-control ypg-otp-control" id="authOtpInput" placeholder="••••••"
|
|
89
|
+
maxlength="6" inputmode="numeric" pattern="[0-9]*" autocomplete="one-time-code"
|
|
90
|
+
autocorrect="off" autocapitalize="off" spellcheck="false" />
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
<button type="button" class="ypg-btn-auth-action" id="btnAuthVerifyOtp"
|
|
94
|
+
onclick="handleAuthVerifyOtpSubmit()">
|
|
95
|
+
<span>Verify & Continue to Pay</span> ›
|
|
96
|
+
</button>
|
|
97
|
+
|
|
98
|
+
<div
|
|
99
|
+
style="display:flex; justify-content:space-between; align-items:center; margin-top:14px; font-size:12px; color:var(--ypg-text-muted);">
|
|
100
|
+
<div>
|
|
101
|
+
Didn't receive code?
|
|
102
|
+
<button type="button" class="ypg-btn-link" id="btnResendOtp" onclick="handleResendOtp()"
|
|
103
|
+
style="margin-left:4px;">Resend OTP</button>
|
|
104
|
+
</div>
|
|
105
|
+
<span id="otpCountdownTimer" style="font-weight:600; color:#64748b;"></span>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<!-- 4. AUTHENTIC STICKY BOTTOM FOOTER (SHOWN ONLY WHEN ACTIVE) -->
|
|
2
|
+
<footer class="ypg-sticky-footer" id="ypgStickyFooter">
|
|
3
|
+
|
|
4
|
+
<!-- Legal Disclaimer -->
|
|
5
|
+
<div class="ypg-legal-disclaimer" id="footerLegalDisclaimer">
|
|
6
|
+
Secured by ELPAY PG & 256-Bit Bank Encryption • <span style="text-decoration:underline; cursor:pointer;"
|
|
7
|
+
onclick="openHelpModal()">Privacy Notice</span>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<!-- Bottom Action Row: ₹5,500 View Details | Continue Button -->
|
|
11
|
+
<div class="ypg-action-bottom-bar">
|
|
12
|
+
<div class="ypg-amount-view-group">
|
|
13
|
+
<div class="ypg-bottom-price" id="bottomAmountDisplay">₹{{AMOUNT}}</div>
|
|
14
|
+
<button type="button" class="ypg-btn-view-details" onclick="toggleOrderDetails()">
|
|
15
|
+
<span>View Details</span>
|
|
16
|
+
<span id="chevronDetailsIcon">▴</span>
|
|
17
|
+
</button>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<!-- Continue CTA Button (Triggers Verification - only appears after 2 minutes elapsed) -->
|
|
21
|
+
<button type="button" class="ypg-btn-continue" id="btnContinuePayment" onclick="submitPaymentDone()"
|
|
22
|
+
style="display:none;">
|
|
23
|
+
Payment Done — Check My Payment
|
|
24
|
+
</button>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<!-- ORDER BREAKDOWN POPUP DRAWER -->
|
|
28
|
+
<div class="ypg-details-drawer" id="orderDetailsDrawer">
|
|
29
|
+
<div class="ypg-details-header">
|
|
30
|
+
<span>Order Summary</span>
|
|
31
|
+
<button type="button" onclick="toggleOrderDetails()"
|
|
32
|
+
style="background:none; border:none; font-size:18px; cursor:pointer; color:#64748b;">✕</button>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="ypg-details-row">
|
|
35
|
+
<span>Order Reference</span>
|
|
36
|
+
<strong id="drawerOrderId">{{ORDER_ID}}</strong>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="ypg-details-row">
|
|
39
|
+
<span>Merchant</span>
|
|
40
|
+
<strong>{{MERCHANT_NAME}}</strong>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div class="ypg-details-row">
|
|
44
|
+
<span>Platform & Processing Fee</span>
|
|
45
|
+
<span style="color:#10b981; font-weight:700;">₹0.00 (Zero Fee)</span>
|
|
46
|
+
</div>
|
|
47
|
+
<div class="ypg-details-row total">
|
|
48
|
+
<span>Total Amount</span>
|
|
49
|
+
<strong id="drawerTotalAmount">₹{{AMOUNT}}</strong>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</footer>
|
|
53
|
+
|
|
54
|
+
</div><!-- END ypg-pc-workspace -->
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<!-- PC RIGHT WORKSPACE WRAPPER -->
|
|
2
|
+
<div class="ypg-pc-workspace">
|
|
3
|
+
<!-- PC TOPBAR -->
|
|
4
|
+
<div class="ypg-pc-topbar">
|
|
5
|
+
<div class="ypg-pc-topbar-title">Payment Options</div>
|
|
6
|
+
<div class="ypg-pc-topbar-actions" style="position: relative;">
|
|
7
|
+
<button type="button" class="ypg-pc-btn-more" id="btnPcMore" onclick="toggleAccountMenu(event)" title="Options">•••</button>
|
|
8
|
+
<button type="button" class="ypg-pc-btn-close" onclick="openCancelPaymentModal()"
|
|
9
|
+
title="Close Checkout">✕</button>
|
|
10
|
+
|
|
11
|
+
<!-- PC Account Popover Menu -->
|
|
12
|
+
<div class="ypg-account-popover" id="accountMenuPopoverPc" hidden style="position: absolute; top: 40px; right: 0; background: #ffffff; color: var(--ypg-text-dark); border-radius: 12px; box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18); border: 1px solid var(--ypg-border); padding: 8px; z-index: 1000; min-width: 220px;">
|
|
13
|
+
<div class="popoverCustomerName" id="popoverCustomerNamePc"
|
|
14
|
+
style="padding:6px 10px 8px 10px; font-weight:700; font-size:12px; border-bottom:1px solid #f1f5f9; color:#0f172a; word-break:break-word;">
|
|
15
|
+
Guest User</div>
|
|
16
|
+
<button type="button" class="ypg-popover-item" onclick="openHelpModal()">
|
|
17
|
+
<span>❓</span> Help & Support
|
|
18
|
+
</button>
|
|
19
|
+
<button type="button" class="ypg-popover-item" onclick="handleCustomerLogout()"
|
|
20
|
+
style="color:var(--ypg-danger);">
|
|
21
|
+
<span>🚪</span> Sign Out / Change Number
|
|
22
|
+
</button>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<!-- 2. AUTHENTIC ELPAY PG HEADER -->
|
|
28
|
+
<header class="ypg-header">
|
|
29
|
+
<!-- Mobile Top Drag Handle -->
|
|
30
|
+
<div class="ypg-drag-handle-bar"></div>
|
|
31
|
+
|
|
32
|
+
<!-- Main Header Row -->
|
|
33
|
+
<div class="ypg-header-main-row">
|
|
34
|
+
<div class="ypg-header-left-group">
|
|
35
|
+
<!-- Back Button -->
|
|
36
|
+
<button type="button" class="ypg-btn-back" id="btnHeaderBack" onclick="cancelPayment()" title="Back">
|
|
37
|
+
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4"
|
|
38
|
+
stroke-linecap="round" stroke-linejoin="round">
|
|
39
|
+
<path d="M19 12H5M12 19l-7-7 7-7" />
|
|
40
|
+
</svg>
|
|
41
|
+
</button>
|
|
42
|
+
|
|
43
|
+
<!-- Teal Merchant Avatar with White Initial -->
|
|
44
|
+
<div class="ypg-merchant-avatar" id="merchantAvatarBox">
|
|
45
|
+
<span id="merchantAvatarLetter">M</span>
|
|
46
|
+
<img id="merchantAvatarImg" alt="Logo" style="display:none;" />
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<!-- Merchant Name & ELPAY PG Verified Business Badge -->
|
|
50
|
+
<div class="ypg-merchant-text-group">
|
|
51
|
+
<div class="ypg-merchant-name" id="headerMerchantName">{{MERCHANT_NAME}}</div>
|
|
52
|
+
<div class="ypg-trusted-badge" id="headerTrustBadge">
|
|
53
|
+
<svg class="ypg-green-shield" viewBox="0 0 24 24" fill="none">
|
|
54
|
+
<path d="M12 2L3 6v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V6l-9-4z" fill="#10b981" />
|
|
55
|
+
<path d="M8.5 12l2.5 2.5 5-5" stroke="#ffffff" stroke-width="2.2" stroke-linecap="round"
|
|
56
|
+
stroke-linejoin="round" />
|
|
57
|
+
</svg>
|
|
58
|
+
<span id="headerTrustBadgeText">ELPAY PG Verified Business</span>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<!-- Right Profile Button (Toggles User Details Popover) -->
|
|
64
|
+
<button type="button" class="ypg-btn-profile" id="btnProfileMenu" onclick="toggleAccountMenu(event)"
|
|
65
|
+
title="User Profile">
|
|
66
|
+
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2"
|
|
67
|
+
stroke-linecap="round" stroke-linejoin="round">
|
|
68
|
+
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" />
|
|
69
|
+
<circle cx="12" cy="7" r="4" />
|
|
70
|
+
</svg>
|
|
71
|
+
</button>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<!-- Header Sub-banner -->
|
|
75
|
+
<div class="ypg-header-subbanner" id="headerSubbanner">
|
|
76
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
|
77
|
+
stroke-linejoin="round">
|
|
78
|
+
<circle cx="9" cy="21" r="1" />
|
|
79
|
+
<circle cx="20" cy="21" r="1" />
|
|
80
|
+
<path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6" />
|
|
81
|
+
</svg>
|
|
82
|
+
<span id="subbannerText">200+ orders verified this month by ELPAY PG</span>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
<!-- Account Popover Menu -->
|
|
86
|
+
<div class="ypg-account-popover" id="accountMenuPopover" hidden>
|
|
87
|
+
<div id="popoverCustomerName"
|
|
88
|
+
style="padding:4px 8px 8px 8px; font-weight:700; font-size:12px; border-bottom:1px solid #f1f5f9; color:#0f172a;">
|
|
89
|
+
Guest User</div>
|
|
90
|
+
<button type="button" class="ypg-popover-item" onclick="openHelpModal()">
|
|
91
|
+
<span>❓</span> Help & Support
|
|
92
|
+
</button>
|
|
93
|
+
<button type="button" class="ypg-popover-item" onclick="handleCustomerLogout()"
|
|
94
|
+
style="color:var(--ypg-danger);">
|
|
95
|
+
<span>🚪</span> Sign Out / Change Number
|
|
96
|
+
</button>
|
|
97
|
+
</div>
|
|
98
|
+
</header>
|
|
99
|
+
|
|
100
|
+
<!-- 3. SCROLLABLE BODY -->
|
|
101
|
+
<main class="ypg-body">
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
<!-- HELP MODAL -->
|
|
2
|
+
<div class="ypg-dialog-overlay" id="helpModal" hidden>
|
|
3
|
+
<div class="ypg-dialog-card">
|
|
4
|
+
<div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:12px;">
|
|
5
|
+
<strong style="font-size:15px;" id="helpModalTitle">ELPAY PG Help & Support</strong>
|
|
6
|
+
<button type="button" onclick="closeHelpModal()"
|
|
7
|
+
style="background:none; border:none; font-size:18px; cursor:pointer; color:#64748b;">✕</button>
|
|
8
|
+
</div>
|
|
9
|
+
<div style="font-size:12px; color:#64748b; margin-bottom:12px;">For inquiries regarding your order or payment
|
|
10
|
+
status:</div>
|
|
11
|
+
<div id="helpModalEmailsContainer" style="margin-bottom:8px; font-size:12px;"></div>
|
|
12
|
+
<div id="helpModalMobilesContainer" style="margin-bottom:12px; font-size:12px;"></div>
|
|
13
|
+
<div id="helpModalLegalLinks"
|
|
14
|
+
style="display:none; gap:12px; font-size:11.5px; margin-bottom:12px; padding-bottom:8px; border-bottom:1px solid #e2e8f0;">
|
|
15
|
+
</div>
|
|
16
|
+
<div style="font-size:11px; font-weight:700; color:#64748b; text-transform:uppercase; margin-bottom:4px;">
|
|
17
|
+
Payment Case Info</div>
|
|
18
|
+
<pre id="helpModalCaseInfoText"
|
|
19
|
+
style="background:#f1f5f9; padding:8px; border-radius:6px; font-size:10px; color:#334155; white-space:pre-wrap; font-family:monospace; margin-bottom:12px;"></pre>
|
|
20
|
+
<button type="button" class="ypg-btn-auth-action" onclick="copyCaseInfo()">
|
|
21
|
+
<span id="copyCaseText">Copy Payment Case Details</span>
|
|
22
|
+
</button>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<!-- SINGLE ACTIVE SESSION CONFLICT MODAL -->
|
|
27
|
+
<div class="ypg-dialog-overlay" id="activeConflictModal" hidden>
|
|
28
|
+
<div class="ypg-dialog-card" style="max-width:380px; text-align:center;">
|
|
29
|
+
<div
|
|
30
|
+
style="width:48px; height:48px; border-radius:50%; background:#fef3c7; color:#d97706; display:flex; align-items:center; justify-content:center; font-size:24px; margin:0 auto 12px auto;">
|
|
31
|
+
⚠️</div>
|
|
32
|
+
<strong style="font-size:16px; color:#0f172a; display:block; margin-bottom:6px;" id="conflictModalTitle">Active Session Detected</strong>
|
|
33
|
+
<p style="font-size:12.5px; color:#475569; line-height:1.5; margin-bottom:16px;" id="conflictModalDesc">
|
|
34
|
+
You already have an active payment session.
|
|
35
|
+
</p>
|
|
36
|
+
<div style="display:flex; flex-direction:column; gap:8px;">
|
|
37
|
+
<button type="button" class="ypg-btn-auth-action" id="btnContinueExistingActive"
|
|
38
|
+
onclick="continueExistingActivePayment()"
|
|
39
|
+
style="background:#2563eb; color:#ffffff; font-size:13px; font-weight:700; padding:11px;">
|
|
40
|
+
CONTINUE ACTIVE SESSION
|
|
41
|
+
</button>
|
|
42
|
+
<button type="button" class="ypg-btn-auth-action" id="btnEndSessionAndStartNew"
|
|
43
|
+
onclick="executeRetryNewPayment()"
|
|
44
|
+
style="background:#f1f5f9; color:#334155; border:1px solid #cbd5e1; font-size:12.5px; font-weight:600; padding:9px;">
|
|
45
|
+
END SESSION & START NEW PAYMENT
|
|
46
|
+
</button>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<!-- RAZORPAY AUTHENTIC "PROCESSING YOUR PAYMENT" MODAL SHEET -->
|
|
52
|
+
<div class="rzp-sheet-backdrop" id="rzpProcessingModal" hidden>
|
|
53
|
+
<div class="rzp-sheet-dialog" style="position:relative;">
|
|
54
|
+
<button type="button" class="rzp-btn-sheet-close" onclick="closeProcessingModal()" title="Back to QR"
|
|
55
|
+
style="position:absolute; top:14px; right:14px; background:none; border:none; font-size:18px; cursor:pointer; color:#64748b; z-index:10; width:30px; height:30px; display:flex; align-items:center; justify-content:center; border-radius:50%; transition:background 0.15s;">✕</button>
|
|
56
|
+
<div class="rzp-sheet-content">
|
|
57
|
+
<div class="rzp-sheet-title" id="rzpProcessingTitle">Verifying Your Payment</div>
|
|
58
|
+
<div class="rzp-sheet-subtitle" id="rzpProcessingSubtitle">Bank verification in progress. Please do not close
|
|
59
|
+
or refresh this window.</div>
|
|
60
|
+
<div class="rzp-coin-stage">
|
|
61
|
+
<div class="rzp-halo-ring"></div>
|
|
62
|
+
<div class="rzp-3d-coin">
|
|
63
|
+
<div class="rzp-coin-face rzp-coin-front">
|
|
64
|
+
<div class="rzp-coin-inner-rim"></div>
|
|
65
|
+
<div class="rzp-coin-sheen"></div>
|
|
66
|
+
</div>
|
|
67
|
+
<div class="rzp-coin-face rzp-coin-back">
|
|
68
|
+
<div class="rzp-coin-inner-rim"></div>
|
|
69
|
+
<div class="rzp-coin-sheen"></div>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
<div
|
|
74
|
+
style="font-size:12px; color:#10b981; font-weight:700; display:flex; align-items:center; justify-content:center; gap:6px; margin-top:10px;">
|
|
75
|
+
<span
|
|
76
|
+
style="display:inline-block; width:7px; height:7px; border-radius:50%; background:#10b981; box-shadow:0 0 6px #10b981; animation:rzpHaloPulse 1.2s infinite;"></span>
|
|
77
|
+
Checking UPI transaction in real-time...
|
|
78
|
+
</div>
|
|
79
|
+
<button type="button" class="rzp-sheet-cancel-btn" onclick="openCancelPaymentModal()"
|
|
80
|
+
style="margin-top:12px;">Cancel Payment</button>
|
|
81
|
+
<button type="button" onclick="closeProcessingModal()"
|
|
82
|
+
style="background:none; border:none; color:#64748b; font-size:12px; font-weight:600; cursor:pointer; margin-top:8px; text-decoration:underline;">
|
|
83
|
+
Return to QR Code
|
|
84
|
+
</button>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<!-- RAZORPAY AUTHENTIC "CANCEL PAYMENT" CONFIRMATION MODAL SHEET -->
|
|
90
|
+
<div class="rzp-sheet-backdrop" id="rzpCancelModal" hidden>
|
|
91
|
+
<div class="rzp-sheet-dialog">
|
|
92
|
+
<!-- State 1: Exit Door & Confirm Prompt -->
|
|
93
|
+
<div id="rzpCancelPromptView"
|
|
94
|
+
style="display:flex; flex-direction:column; align-items:center; text-align:center; padding-bottom:16px;">
|
|
95
|
+
<div class="rzp-cancel-header-arc">
|
|
96
|
+
<button type="button" class="rzp-btn-sheet-close" onclick="closeCancelPaymentModal()"
|
|
97
|
+
title="Back">✕</button>
|
|
98
|
+
<!-- Authentic Exit Door Illustration with EXIT sign & footprints -->
|
|
99
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 160 120" width="88" height="62" fill="none">
|
|
100
|
+
<rect x="65" y="10" width="30" height="13" rx="2" fill="#dc2626" stroke="#b91c1c" stroke-width="0.8" />
|
|
101
|
+
<text x="80" y="19.5" font-family="-apple-system, BlinkMacSystemFont, Arial, sans-serif" font-size="7.5"
|
|
102
|
+
font-weight="900" fill="#ffffff" text-anchor="middle" letter-spacing="0.8">EXIT</text>
|
|
103
|
+
<path d="M50 23 H110 V90 H104 V27 H56 V90 H50 Z" fill="#94a3b8" />
|
|
104
|
+
<rect x="54" y="26" width="52" height="64" fill="#f8fafc" opacity="0.6" />
|
|
105
|
+
<path d="M55 27 L38 34 V97 L55 90 Z" fill="rgba(224, 242, 254, 0.75)" stroke="#64748b"
|
|
106
|
+
stroke-width="1.8" />
|
|
107
|
+
<path d="M53 30 L41 35 V93 L53 87 Z" fill="rgba(186, 230, 253, 0.45)" stroke="#94a3b8" stroke-width="1" />
|
|
108
|
+
<rect x="44" y="60" width="3" height="10" rx="1" fill="#334155" />
|
|
109
|
+
<path d="M105 27 L122 34 V97 L105 90 Z" fill="rgba(224, 242, 254, 0.75)" stroke="#64748b"
|
|
110
|
+
stroke-width="1.8" />
|
|
111
|
+
<path d="M107 30 L119 35 V93 L107 87 Z" fill="rgba(186, 230, 253, 0.45)" stroke="#94a3b8"
|
|
112
|
+
stroke-width="1" />
|
|
113
|
+
<rect x="113" y="60" width="3" height="10" rx="1" fill="#334155" />
|
|
114
|
+
<line x1="30" y1="94" x2="130" y2="94" stroke="#cbd5e1" stroke-width="1.5" stroke-dasharray="2 2" />
|
|
115
|
+
<g transform="translate(74, 80) rotate(-10) scale(0.65)" fill="#475569">
|
|
116
|
+
<ellipse cx="4" cy="3" rx="3.5" ry="4.5" />
|
|
117
|
+
<ellipse cx="4" cy="10" rx="2.5" ry="3" />
|
|
118
|
+
</g>
|
|
119
|
+
<g transform="translate(85, 88) rotate(12) scale(0.75)" fill="#334155">
|
|
120
|
+
<ellipse cx="4" cy="3" rx="3.5" ry="4.5" />
|
|
121
|
+
<ellipse cx="4" cy="10" rx="2.5" ry="3" />
|
|
122
|
+
</g>
|
|
123
|
+
<g transform="translate(71, 98) rotate(-8) scale(0.85)" fill="#1e293b">
|
|
124
|
+
<ellipse cx="4" cy="3" rx="3.8" ry="4.8" />
|
|
125
|
+
<ellipse cx="4" cy="11" rx="2.8" ry="3.2" />
|
|
126
|
+
</g>
|
|
127
|
+
<g transform="translate(87, 106) rotate(10) scale(0.95)" fill="#0f172a">
|
|
128
|
+
<ellipse cx="4" cy="3" rx="4" ry="5" />
|
|
129
|
+
<ellipse cx="4" cy="12" rx="3" ry="3.5" />
|
|
130
|
+
</g>
|
|
131
|
+
</svg>
|
|
132
|
+
</div>
|
|
133
|
+
<div
|
|
134
|
+
style="padding:12px 20px 0; width:100%; display:flex; flex-direction:column; align-items:center; box-sizing:border-box;">
|
|
135
|
+
<div class="rzp-sheet-title">
|
|
136
|
+
<span class="pc-only-title">Are you sure you want to exit?</span>
|
|
137
|
+
<span class="mob-only-title">Cancel Payment</span>
|
|
138
|
+
</div>
|
|
139
|
+
<div class="rzp-sheet-subtitle" style="margin-bottom:0; max-width:320px; line-height:1.45;">
|
|
140
|
+
<span class="pc-only-sub">You will be taken back to <span
|
|
141
|
+
class="cancelMerchantNameSpan">{{MERCHANT_NAME}}</span> website</span>
|
|
142
|
+
<span class="mob-only-sub">Your payment is ongoing. Are you sure you want to cancel the payment?</span>
|
|
143
|
+
</div>
|
|
144
|
+
<button type="button" class="rzp-btn-wait" onclick="closeCancelPaymentModal()">
|
|
145
|
+
<span class="pc-only-btn">Continue to payment</span>
|
|
146
|
+
<span class="mob-only-btn">No, wait</span>
|
|
147
|
+
</button>
|
|
148
|
+
<button type="button" class="rzp-btn-confirm-cancel" onclick="confirmCancelPayment()">
|
|
149
|
+
<span class="pc-only-btn">Yes, exit</span>
|
|
150
|
+
<span class="mob-only-btn">Yes, Cancel</span>
|
|
151
|
+
</button>
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
|
|
155
|
+
<!-- State 2: Cancelling Payment with Running Coin -->
|
|
156
|
+
<div id="rzpCancellingProgressView"
|
|
157
|
+
style="display:none; padding:28px 20px 24px; flex-direction:column; align-items:center; text-align:center;">
|
|
158
|
+
<div class="rzp-sheet-title">Cancelling Payment</div>
|
|
159
|
+
<div class="rzp-sheet-subtitle">This will only take a few seconds.</div>
|
|
160
|
+
<div class="rzp-coin-stage">
|
|
161
|
+
<div class="rzp-halo-ring"></div>
|
|
162
|
+
<div class="rzp-3d-coin">
|
|
163
|
+
<div class="rzp-coin-face rzp-coin-front">
|
|
164
|
+
<div class="rzp-coin-inner-rim"></div>
|
|
165
|
+
<div class="rzp-coin-sheen"></div>
|
|
166
|
+
</div>
|
|
167
|
+
<div class="rzp-coin-face rzp-coin-back">
|
|
168
|
+
<div class="rzp-coin-inner-rim"></div>
|
|
169
|
+
<div class="rzp-coin-sheen"></div>
|
|
170
|
+
</div>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
<div class="rzp-secured-by">
|
|
174
|
+
<span>Secured by</span>
|
|
175
|
+
<strong style="color:#0f172a; font-weight:800;">{{APP_NAME}}</strong>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
</div>
|