@paynext/sdk 0.0.95 → 0.0.97

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/README.md CHANGED
@@ -112,6 +112,7 @@ interface PayNextConfig {
112
112
  variant?: 'default' | 'compact'
113
113
  locale?: Locale
114
114
  translate?: CheckoutTranslate
115
+ errorMessageText?: string
115
116
  styles?: StylesConfig
116
117
  onCheckoutLoaded?: (result: LoadedResult) => void
117
118
  onCheckoutAttempt?: (result: AttemptResult) => void
@@ -125,6 +126,45 @@ interface LoadedResult {
125
126
  }
126
127
  ```
127
128
 
129
+ ### Add a Submit Button Icon
130
+
131
+ Provide inline SVG markup via `styles.SubmitButton.iconSvg` to render an icon to the left of the "Pay with card" button label. The SDK hides the icon and shows a spinner while a payment request is in flight, then restores the icon once processing finishes. A 24x24px viewBox keeps the layout balanced.
132
+
133
+ ```ts
134
+ const checkout = new PayNextCheckout(container)
135
+
136
+ await checkout.mount({
137
+ ...config,
138
+ styles: {
139
+ SubmitButton: {
140
+ iconSvg: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
141
+ <path d="M6 12L10 16L18 8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
142
+ </svg>`
143
+ }
144
+ }
145
+ })
146
+ ```
147
+
148
+ ### Customize the Back Button
149
+
150
+ Pass `styles.BackButton` to adjust the container that wraps the default arrow icon. Both `className` and `styles` map directly onto that wrapper `<div>`, letting you add global CSS hooks or inline overrides without replacing the built-in markup.
151
+
152
+ ```ts
153
+ const checkout = new PayNextCheckout(container)
154
+
155
+ await checkout.mount({
156
+ ...config,
157
+ styles: {
158
+ BackButton: {
159
+ className: 'my-back-button',
160
+ styles: {
161
+ color: '#111827'
162
+ }
163
+ }
164
+ }
165
+ })
166
+ ```
167
+
128
168
  ## Supported Payment Methods
129
169
 
130
170
  - **Cards**: Visa, Mastercard, American Express, Discover, JCB, Diners Club, UnionPay, Maestro
@@ -0,0 +1,11 @@
1
+ function o(e) {
2
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
3
+ }
4
+ function r(e) {
5
+ throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
6
+ }
7
+ export {
8
+ r as c,
9
+ o as g
10
+ };
11
+ //# sourceMappingURL=_commonjs-dynamic-modules-C4BgavC4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_commonjs-dynamic-modules-C4BgavC4.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}