()
| 1644 | } |
| 1645 | |
| 1646 | function collectVendorConfig() { |
| 1647 | const checkoutUrl = getInputValue("vendor-checkout-input"); |
| 1648 | const redeemCode = normalizeVendorRedeemCode(getInputValue("vendor-redeem-input")); |
| 1649 | setInputValue("vendor-redeem-input", redeemCode); |
| 1650 | return { |
| 1651 | checkout_url: checkoutUrl, |
| 1652 | redeem_code: redeemCode, |
| 1653 | }; |
| 1654 | } |
| 1655 | |
| 1656 | function normalizeVendorRedeemCode(raw) { |
| 1657 | const compact = String(raw || "").toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, 16); |
nothing calls this directly
no test coverage detected