@astropay/payments-lib 1.0.5 → 2.0.0

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
@@ -118,6 +118,9 @@ The main component for rendering a payment interface.
118
118
  | country | string | Yes | The country code (e.g., 'BR', 'US') |
119
119
  | showTitle | boolean | No | Whether to show the component title (defaults to `true`) |
120
120
  | showDescription | boolean | No | Whether to show the payment description (defaults to `true`) |
121
+ | cardConfig | object | No | Configuration for card module. |
122
+ | cardConfig.showPaymentSummary | boolean | No | Whether to display the summary of the payment (defaults to `true`) |
123
+ | cardConfig.expirationDateFormat | `MM/YYYY` or `MM/YY` | No | Mask format for expiration date (defaults to `MM/YY`) |
121
124
  | onSuccess | () => void | No | Callback function called when payment is successful |
122
125
  | onError | () => void | No | Callback function called when payment fails |
123
126
 
@@ -133,6 +136,10 @@ const fullCheckoutComponent = new AstroPayFullCheckout({
133
136
  // Optional props
134
137
  showTitle: true,
135
138
  showDescription: true,
139
+ cardConfig: {
140
+ showPaymentSummary: true,
141
+ expirationDateFormat: 'MM/YY',
142
+ },
136
143
  onSuccess: () => {
137
144
  console.log('Payment was successful');
138
145
  // Handle successful payment, e.g., redirect to success page
@@ -221,15 +228,16 @@ You can customize the styling by providing a `styles` object in the initializati
221
228
  ```typescript
222
229
  AstroPayCore.init('app-id', {
223
230
  styles: {
224
- primaryColor: '#FF5500',
225
- secondaryColor: '#00AAFF',
226
231
  backgroundColor: '#FFFFFF',
232
+ fontFamily: 'Arial, sans-serif',
233
+ textColor: '#000000',
234
+ primaryColor: '#FF5500',
227
235
  textPrimaryColor: '#333333',
236
+ secondaryColor: '#00AAFF',
228
237
  textSecondaryColor: '#666666',
229
- fontFamily: 'Arial, sans-serif',
230
238
  width: 500,
231
- paddingWrapper: '12px',
232
- borderRadiusWrapper: '4px'
239
+ paddingWrapper: 20,
240
+ borderRadiusWrapper: 8,
233
241
  },
234
242
  });
235
243
  ```
@@ -238,15 +246,17 @@ AstroPayCore.init('app-id', {
238
246
 
239
247
  | Property | Type | Description |
240
248
  | ------------------- | ------------- | ---------------------------------- |
241
- | primaryColor | string | Primary brand color |
242
- | secondaryColor | string | Secondary brand color |
243
249
  | backgroundColor | string | Background color |
250
+ | fontFamily | string | Font family |
251
+ | textColor | string | Text color |
252
+ | primaryColor | string | Primary brand color |
244
253
  | textPrimaryColor | string | Primary text color |
254
+ | secondaryColor | string | Secondary brand color |
245
255
  | textSecondaryColor | string | Secondary text color |
246
- | fontFamily | string | Font family |
247
256
  | width | string/number | Component width in pixels |
248
257
  | paddingWrapper | string/number | Padding for component wrapper |
249
258
  | borderRadiusWrapper | string/number | Border radius for component wrapper|
259
+ | ...otherProps | — | For additional styling options, see the [full style API docs](https://developers.astropay.com/docs/accept-astropay/checkout/payment-lib-web/styling-theming#custom-styling) |
250
260
 
251
261
  ## 🌐 Internationalization
252
262
 
@@ -1,4 +1,4 @@
1
- import { _ as r, $ as s, a0 as t, a1 as e, $ as y } from "./main-CJp9GspG.js";
1
+ import { _ as r, $ as s, a0 as t, a1 as e, $ as y } from "./main-DhA4kci7.js";
2
2
  export {
3
3
  r as AstroPayCardPayment,
4
4
  s as AstroPayCore,