PageSourceSearch

https://www.ptreyeslight.com/wp-content/plugins/paywall-project/as…/frontend/js/core/stripe-card.js?ver=3.1.0

js ptreyeslight.com collected 2026-10-02 02:36:26 UTC 1,950 bytes, 69 lines download raw bytes

1(function () {
2	'use strict';
3
4	window.ppaccessCore = window.ppaccessCore || {};
5
6	// Classic combined card element (card number + expiry + CVC + ZIP).
7	window.ppaccessCore.stripeCard = {
8		create: function (stripe, mountTarget, errorTarget) {
9			var elements = stripe.elements();
10			var card = elements.create('card', {
11				hidePostalCode: false,
12				style: {
13					base: {
14						fontSize: '15px',
15						color: '#1f2937',
16						'::placeholder': { color: '#9ca3af' },
17						fontFamily: 'system-ui, -apple-system, sans-serif'
18					},
19					invalid: { color: '#b91c1c' }
20				}
21			});
22			if (mountTarget) {
23				mountTarget.innerHTML = '';
24				card.mount(mountTarget);
25			}
26
27			// Mirror the postal code into a hidden input so the tax estimate
28			// can read it without touching the iframe.  The input is a sibling of
29			// the mount target (not inside it) so Stripe's innerHTML wipe doesn't
30			// destroy it.
31			var postalInput = mountTarget && mountTarget.parentNode
32				? mountTarget.parentNode.querySelector('[name="card_postal_code"]')
33				: null;
34
35			card.on('change', function (event) {
36				if (errorTarget) {
37					errorTarget.textContent = event.error ? event.error.message : '';
38				}
39				if (postalInput && event.value && event.value.postalCode !== undefined) {
40					postalInput.value = event.value.postalCode;
41				}
42			});
43
44			return {
45				elements: elements,
46				card: card
47			};
48		}
49	};
50
51	// Modern Payment Element — supports cards, Apple Pay, Google Pay, Link, etc.
52	// Mounting is handled by the caller after the container is visible in the DOM.
53	window.ppaccessCore.stripePaymentElement = {
54		createElements: function (stripe, clientSecret) {
55			return stripe.elements({
56				clientSecret: clientSecret,
57				appearance: {
58					theme: 'stripe',
59					variables: {
60						fontFamily: 'system-ui, -apple-system, sans-serif',
61						fontSizeBase: '15px',
62						colorText: '#1f2937',
63						colorDanger: '#b91c1c'
64					}
65				}
66			});
67		}
68	};
69})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.