@tagadapay/plugin-sdk 1.0.30 → 2.0.2

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
@@ -1,414 +1,504 @@
1
- # TagadaPay Plugin SDK
2
-
3
- A comprehensive SDK for building checkout plugins on the TagadaPay platform. Create custom checkout experiences with React components, payment processing, and advanced features.
4
-
5
- ## 📚 Documentation
6
-
7
- ### Core APIs
8
-
9
- - **[useCheckout](./README-useCheckout.md)** - Checkout state management and flow control
10
- - **[setCheckoutInfo](./README-setCheckoutInfo.md)** - Customer information and validation
11
- - **[useOffers](./README-useOffers.md)** - Dynamic pricing and promotional offers
12
- - **[Money utilities](./README-money.md)** - Currency formatting and calculations
13
- - **[URL utilities](./README-urlUtils.md)** - Navigation and routing helpers
14
-
15
- ### Examples
16
-
17
- - **[Vite Checkout Demo](../checkout-vite)** - Complete checkout implementation
18
-
19
- ## 🚀 Quick Start
20
-
21
- ### Installation
22
-
23
- ```bash
24
- npm install @tagadapay/plugin-sdk
25
- ```
26
-
27
- ### Basic Usage
28
-
29
- ```typescript
30
- import { useCheckout, setCheckoutInfo } from '@tagadapay/plugin-sdk';
31
-
32
- function CheckoutPage() {
33
- const { customer, cart, payment } = useCheckout();
34
-
35
- const handleSubmit = async (data) => {
36
- await setCheckoutInfo({
37
- customer: data.customer,
38
- payment: data.payment
39
- });
40
- };
41
-
42
- return (
43
- <div>
44
- {/* Your checkout UI */}
45
- </div>
46
- );
47
- }
48
- ```
49
-
50
- ## 🎯 Key Features
51
-
52
- ### Payment Processing
53
-
54
- - Secure tokenized payments
55
- - Multiple payment method support
56
- - Real-time validation
57
- - PCI compliance
58
-
59
- ### Customer Management
60
-
61
- - Profile management
62
- - Address validation
63
- - Order history
64
- - Preferences
65
-
66
- ### Cart & Pricing
67
-
68
- - Dynamic pricing
69
- - Promotional offers
70
- - Tax calculations
71
- - Currency conversion
72
-
73
- ### UI Components
74
-
75
- - Pre-built checkout components
76
- - Customizable themes
77
- - Mobile-optimized
78
- - Accessibility features
79
-
80
- ## 📖 API Reference
81
-
82
- ### Core Hooks
83
-
84
- #### useCheckout()
85
-
86
- Primary hook for checkout state management.
87
-
88
- ```typescript
89
- const {
90
- customer, // Customer information
91
- cart, // Shopping cart state
92
- payment, // Payment details
93
- shipping, // Shipping information
94
- loading, // Loading states
95
- errors, // Error handling
96
- } = useCheckout();
97
- ```
98
-
99
- #### useOffers()
100
-
101
- Hook for managing dynamic offers and pricing.
102
-
103
- ```typescript
104
- const {
105
- offers, // Available offers
106
- applyOffer, // Apply offer function
107
- removeOffer, // Remove offer function
108
- total, // Calculated total
109
- } = useOffers();
110
- ```
111
-
112
- ### Utility Functions
113
-
114
- #### setCheckoutInfo()
115
-
116
- Update checkout information with validation.
117
-
118
- ```typescript
119
- await setCheckoutInfo({
120
- customer: {
121
- email: 'user@example.com',
122
- firstName: 'John',
123
- lastName: 'Doe',
124
- },
125
- payment: {
126
- method: 'card',
127
- token: 'pm_token_123',
128
- },
129
- });
130
- ```
131
-
132
- #### Money utilities
133
-
134
- Format and calculate monetary values.
135
-
136
- ```typescript
137
- import { formatMoney, convertCurrency } from '@tagadapay/plugin-sdk';
138
-
139
- const formatted = formatMoney(2999, 'USD'); // "$29.99"
140
- const converted = convertCurrency(2999, 'USD', 'EUR'); // 2699
141
- ```
142
-
143
- ## 🛠️ Development
144
-
145
- ### Local Development
146
-
147
- ```bash
148
- # Install dependencies
149
- npm install
150
-
151
- # Start development server
152
- npm run dev
153
-
154
- # Build for production
155
- npm run build
156
- ```
157
-
158
- ### Testing
159
-
160
- ```bash
161
- # Run tests
162
- npm test
163
-
164
- # Run tests with coverage
165
- npm run test:coverage
166
- ```
167
-
168
- ### Linting
169
-
170
- ```bash
171
- # Check code style
172
- npm run lint
173
-
174
- # Fix linting issues
175
- npm run lint:fix
176
- ```
177
-
178
- ## 📦 Build & Deploy
179
-
180
- ### Building Your Plugin
181
-
182
- ```bash
183
- # Build optimized bundle
184
- npm run build
185
-
186
- # Analyze bundle size
187
- npm run analyze
188
- ```
189
-
190
- ### Deployment
191
-
192
- ```bash
193
- # Deploy using TagadaPay CLI
194
- npx @tagadapay/plugin-cli deploy
195
-
196
- # Deploy specific environment
197
- npx @tagadapay/plugin-cli deploy --env production
198
- ```
199
-
200
- ## 🔧 Configuration
201
-
202
- ### Plugin Configuration
203
-
204
- ```json
205
- {
206
- "name": "My Checkout Plugin",
207
- "version": "1.0.0",
208
- "description": "Custom checkout experience",
209
- "main": "dist/index.js",
210
- "tagadapay": {
211
- "type": "checkout",
212
- "mode": "direct",
213
- "framework": "react"
214
- }
215
- }
216
- ```
217
-
218
- ### Environment Variables
219
-
220
- ```env
221
- TAGADAPAY_API_KEY=your_api_key
222
- TAGADAPAY_ENVIRONMENT=sandbox
223
- TAGADAPAY_STORE_ID=your_store_id
224
- ```
225
-
226
- ## 🎨 Styling & Themes
227
-
228
- ### CSS Custom Properties
229
-
230
- ```css
231
- :root {
232
- --tagada-primary: #007bff;
233
- --tagada-secondary: #6c757d;
234
- --tagada-success: #28a745;
235
- --tagada-danger: #dc3545;
236
- --tagada-border-radius: 4px;
237
- --tagada-font-family: -apple-system, BlinkMacSystemFont, sans-serif;
238
- }
239
- ```
240
-
241
- ### Component Styling
242
-
243
- ```typescript
244
- import { styled } from '@tagadapay/plugin-sdk';
245
-
246
- const StyledButton = styled.button`
247
- background: var(--tagada-primary);
248
- color: white;
249
- border-radius: var(--tagada-border-radius);
250
- padding: 12px 24px;
251
- border: none;
252
- cursor: pointer;
253
-
254
- &:hover {
255
- opacity: 0.9;
256
- }
257
- `;
258
- ```
259
-
260
- ## 🔐 Security
261
-
262
- ### Best Practices
263
-
264
- - Never store sensitive payment data
265
- - Always validate user inputs
266
- - Use HTTPS in production
267
- - Implement proper error handling
268
- - Follow PCI DSS guidelines
269
-
270
- ### Token Management
271
-
272
- ```typescript
273
- // ✅ Good: Use tokenized payments
274
- const paymentToken = await tokenizePayment(cardData);
275
- await processPayment({ token: paymentToken });
276
-
277
- // Bad: Never store raw card data
278
- // const cardNumber = '4111111111111111'; // Don't do this
279
- ```
280
-
281
- ## 📱 Mobile Optimization
282
-
283
- ### Responsive Design
284
-
285
- ```css
286
- .checkout-container {
287
- max-width: 600px;
288
- margin: 0 auto;
289
- padding: 16px;
290
- }
291
-
292
- @media (max-width: 768px) {
293
- .checkout-container {
294
- padding: 8px;
295
- }
296
-
297
- .checkout-form {
298
- font-size: 16px; /* Prevent zoom on iOS */
299
- }
300
- }
301
- ```
302
-
303
- ### Touch Interactions
304
-
305
- ```typescript
306
- const handleTouchStart = (e) => {
307
- // Optimize for touch devices
308
- e.preventDefault();
309
- // Handle touch interaction
310
- };
311
- ```
312
-
313
- ## 🌐 Internationalization
314
-
315
- ### Multi-language Support
316
-
317
- ```typescript
318
- import { useTranslation } from '@tagadapay/plugin-sdk';
319
-
320
- function CheckoutForm() {
321
- const { t } = useTranslation();
322
-
323
- return (
324
- <form>
325
- <label>{t('checkout.email')}</label>
326
- <input type="email" placeholder={t('checkout.email_placeholder')} />
327
- </form>
328
- );
329
- }
330
- ```
331
-
332
- ### Currency Support
333
-
334
- ```typescript
335
- import { useCurrency } from '@tagadapay/plugin-sdk';
336
-
337
- function PriceDisplay({ amount }) {
338
- const { formatPrice, currency } = useCurrency();
339
-
340
- return <span>{formatPrice(amount, currency)}</span>;
341
- }
342
- ```
343
-
344
- ## 📊 Analytics & Monitoring
345
-
346
- ### Event Tracking
347
-
348
- ```typescript
349
- import { trackEvent } from '@tagadapay/plugin-sdk';
350
-
351
- // Track user interactions
352
- trackEvent('checkout_started', {
353
- product_id: 'prod_123',
354
- value: 2999,
355
- currency: 'USD',
356
- });
357
-
358
- // Track conversions
359
- trackEvent('purchase_completed', {
360
- transaction_id: 'txn_456',
361
- value: 2999,
362
- currency: 'USD',
363
- });
364
- ```
365
-
366
- ### Performance Monitoring
367
-
368
- ```typescript
369
- import { performance } from '@tagadapay/plugin-sdk';
370
-
371
- // Measure load times
372
- performance.mark('checkout-start');
373
- // ... checkout logic
374
- performance.mark('checkout-end');
375
- performance.measure('checkout-duration', 'checkout-start', 'checkout-end');
376
- ```
377
-
378
- ## 🤝 Contributing
379
-
380
- ### Development Setup
381
-
382
- ```bash
383
- # Clone the repository
384
- git clone https://github.com/tagadapay/plugin-sdk.git
385
-
386
- # Install dependencies
387
- npm install
388
-
389
- # Start development
390
- npm run dev
391
- ```
392
-
393
- ### Submitting Changes
394
-
395
- 1. Fork the repository
396
- 2. Create a feature branch
397
- 3. Make your changes
398
- 4. Add tests
399
- 5. Submit a pull request
400
-
401
- ## 📄 License
402
-
403
- MIT License - see [LICENSE](./LICENSE) for details.
404
-
405
- ## 🆘 Support
406
-
407
- - **Documentation**: [docs.tagadapay.com](https://docs.tagadapay.com)
408
- - **Discord**: [discord.gg/tagadapay](https://discord.gg/tagadapay)
409
- - **Email**: support@tagadapay.com
410
- - **GitHub Issues**: [github.com/tagadapay/plugin-sdk/issues](https://github.com/tagadapay/plugin-sdk/issues)
411
-
412
- ---
413
-
414
- Built with ❤️ by the TagadaPay team
1
+ # TagadaPay Plugin SDK
2
+
3
+ A comprehensive SDK for building checkout plugins on the TagadaPay platform. Create custom checkout experiences with React components, payment processing, and advanced features.
4
+
5
+ ## 📚 Documentation
6
+
7
+ ### Core APIs
8
+
9
+ - **[useCheckout](./docs/README-useCheckout.md)** - Checkout state management and flow control
10
+ - **[setCheckoutInfo](./docs/README-setCheckoutInfo.md)** - Customer information and validation
11
+ - **[useOffers](./docs/README-useOffers.md)** - Dynamic pricing and promotional offers
12
+ - **[Money utilities](./docs/README-money.md)** - Currency formatting and calculations
13
+ - **[URL utilities](./docs/README-urlUtils.md)** - Navigation and routing helpers
14
+
15
+ ### Plugin Development
16
+
17
+ - **[Plugin Configuration](./docs/PLUGIN_CONFIG.md)** - How to access store context, config, and branding
18
+ - **[Google Autocomplete](./docs/README-google-autocomplete.md)** - Address autocomplete with Google Places API
19
+ - **[ISO Data](./docs/README-iso-data.md)** - Country and region data with Google integration
20
+
21
+ ### Examples
22
+
23
+ - **[Vite Checkout Demo](../checkout-vite)** - Complete checkout implementation
24
+
25
+ ## 🏗️ Building a Plugin
26
+
27
+ ### Plugin Structure
28
+
29
+ Every TagadaPay plugin follows this simple structure:
30
+
31
+ ```
32
+ my-plugin/
33
+ ├── plugin.manifest.json # Plugin metadata & routing
34
+ ├── .local.json # Local dev config (auto-injected in production)
35
+ ├── config/ # Optional deployment configs
36
+ │ ├── theme-green.json # Config variant A
37
+ │ └── theme-blue.json # Config variant B
38
+ ├── src/
39
+ │ └── App.tsx # Your plugin code
40
+ └── dist/ # Built plugin files
41
+ ```
42
+
43
+ ### Configuration Flow
44
+
45
+ ```mermaid
46
+ graph TD
47
+ A[🛠️ Local Development] --> B[.local.json]
48
+ A --> C[config/*.json]
49
+ B --> D[usePluginConfig()]
50
+ C --> D
51
+
52
+ E[🚀 Production] --> F[Platform Injection]
53
+ F --> G[HTTP Headers & Meta Tags]
54
+ G --> D
55
+
56
+ D --> H[Your Plugin Component]
57
+
58
+ style A fill:#e1f5fe
59
+ style E fill:#f3e5f5
60
+ style D fill:#fff3e0
61
+ style H fill:#e8f5e8
62
+ ```
63
+
64
+ ### Essential Files
65
+
66
+ #### 1. **`plugin.manifest.json`** - Plugin Metadata
67
+
68
+ ```json
69
+ {
70
+ "pluginId": "my-awesome-plugin",
71
+ "name": "My Awesome Plugin",
72
+ "version": "1.0.0",
73
+ "mode": "direct-mode",
74
+ "router": {
75
+ "basePath": "/",
76
+ "matcher": ".*",
77
+ "excluder": "/checkout"
78
+ }
79
+ }
80
+ ```
81
+
82
+ #### 2. **`.local.json`** - Local Development Context
83
+
84
+ ```json
85
+ {
86
+ "storeId": "store_abc123",
87
+ "accountId": "acc_xyz789",
88
+ "basePath": "/"
89
+ }
90
+ ```
91
+
92
+ > ⚠️ **Auto-managed**: This file is only for local dev. In production, the platform injects this data automatically.
93
+
94
+ #### 3. **`config/my-theme.json`** - Optional Deployment Config
95
+
96
+ ```json
97
+ {
98
+ "configName": "green-theme",
99
+ "branding": {
100
+ "primaryColor": "#059669",
101
+ "companyName": "My Store",
102
+ "logoUrl": "https://example.com/logo.png"
103
+ },
104
+ "features": {
105
+ "enableChat": true,
106
+ "maxItems": 10
107
+ }
108
+ }
109
+ ```
110
+
111
+ > 📝 **Note**: Config can contain any keys you need - the SDK doesn't enforce a specific structure.
112
+
113
+ ## 🚀 Quick Start
114
+
115
+ ### Installation
116
+
117
+ ```bash
118
+ npm install @tagadapay/plugin-sdk
119
+ ```
120
+
121
+ ### Basic Plugin Setup
122
+
123
+ ```tsx
124
+ import React from 'react';
125
+ import {
126
+ TagadaProvider,
127
+ usePluginConfig,
128
+ useGoogleAutocomplete,
129
+ useISOData,
130
+ } from '@tagadapay/plugin-sdk/react';
131
+
132
+ function MyPlugin() {
133
+ const { storeId, accountId, basePath, config, loading } = usePluginConfig();
134
+
135
+ // Optional: Add address autocomplete
136
+ const { searchPlaces, predictions } = useGoogleAutocomplete({
137
+ apiKey: config?.googleMapsApiKey || 'YOUR_API_KEY',
138
+ });
139
+
140
+ // Optional: Add country/region data
141
+ const { countries } = useISOData('en');
142
+
143
+ if (loading) return <div>Loading...</div>;
144
+
145
+ return (
146
+ <div style={{ '--primary': config?.branding?.primaryColor }}>
147
+ <h1>Welcome to {config?.branding?.companyName}</h1>
148
+ <p>Store: {storeId}</p>
149
+ <p>Base Path: {basePath}</p>
150
+ <p>Available Countries: {Object.keys(countries).length}</p>
151
+ </div>
152
+ );
153
+ }
154
+
155
+ // Wrap your plugin with TagadaProvider
156
+ function App() {
157
+ return (
158
+ <TagadaProvider>
159
+ <MyPlugin />
160
+ </TagadaProvider>
161
+ );
162
+ }
163
+
164
+ export default App;
165
+ ```
166
+
167
+ ### Development vs Production
168
+
169
+ | Environment | Store/Account ID | Deployment Config | How it Works |
170
+ | -------------- | ---------------- | ----------------- | ------------------ |
171
+ | **Local Dev** | `.local.json` | `config/*.json` | Files on disk |
172
+ | **Production** | HTTP Headers | Meta Tags | Platform injection |
173
+
174
+ ```tsx
175
+ // ALWAYS use hooks - works in both environments
176
+ const { storeId, accountId, basePath, config } = usePluginConfig();
177
+
178
+ // NEVER access directly
179
+ // const config = window.__PLUGIN_CONFIG__; // Doesn't exist!
180
+ ```
181
+
182
+ ## 🎯 Key Features
183
+
184
+ ### Payment Processing
185
+
186
+ - Secure tokenized payments
187
+ - Multiple payment method support
188
+ - Real-time validation
189
+ - PCI compliance
190
+
191
+ ### Customer Management
192
+
193
+ - Profile management
194
+ - Address validation
195
+ - Order history
196
+ - Preferences
197
+
198
+ ### Cart & Pricing
199
+
200
+ - Dynamic pricing
201
+ - Promotional offers
202
+ - Tax calculations
203
+ - Currency conversion
204
+
205
+ ### UI Components
206
+
207
+ - Pre-built checkout components
208
+ - Customizable themes
209
+ - Mobile-optimized
210
+ - Accessibility features
211
+
212
+ ## 📖 API Reference
213
+
214
+ ### Core Hooks
215
+
216
+ #### useCheckout()
217
+
218
+ Primary hook for checkout state management.
219
+
220
+ ```typescript
221
+ const {
222
+ customer, // Customer information
223
+ cart, // Shopping cart state
224
+ payment, // Payment details
225
+ shipping, // Shipping information
226
+ loading, // Loading states
227
+ errors, // Error handling
228
+ } = useCheckout();
229
+ ```
230
+
231
+ #### useOffers()
232
+
233
+ Hook for managing dynamic offers and pricing.
234
+
235
+ ```typescript
236
+ const {
237
+ offers, // Available offers
238
+ applyOffer, // Apply offer function
239
+ removeOffer, // Remove offer function
240
+ total, // Calculated total
241
+ } = useOffers();
242
+ ```
243
+
244
+ ### Utility Functions
245
+
246
+ #### setCheckoutInfo()
247
+
248
+ Update checkout information with validation.
249
+
250
+ ```typescript
251
+ await setCheckoutInfo({
252
+ customer: {
253
+ email: 'user@example.com',
254
+ firstName: 'John',
255
+ lastName: 'Doe',
256
+ },
257
+ payment: {
258
+ method: 'card',
259
+ token: 'pm_token_123',
260
+ },
261
+ });
262
+ ```
263
+
264
+ #### Money utilities
265
+
266
+ Format and calculate monetary values.
267
+
268
+ ```typescript
269
+ import { formatMoney, convertCurrency } from '@tagadapay/plugin-sdk';
270
+
271
+ const formatted = formatMoney(2999, 'USD'); // "$29.99"
272
+ const converted = convertCurrency(2999, 'USD', 'EUR'); // 2699
273
+ ```
274
+
275
+ ## 🛠️ Development
276
+
277
+ ### Local Development
278
+
279
+ ```bash
280
+ # Install dependencies
281
+ npm install
282
+
283
+ # Start development server
284
+ npm run dev
285
+
286
+ # Build for production
287
+ npm run build
288
+ ```
289
+
290
+ ### Testing
291
+
292
+ ```bash
293
+ # Run tests
294
+ npm test
295
+
296
+ # Run tests with coverage
297
+ npm run test:coverage
298
+ ```
299
+
300
+ ### Linting
301
+
302
+ ```bash
303
+ # Check code style
304
+ npm run lint
305
+
306
+ # Fix linting issues
307
+ npm run lint:fix
308
+ ```
309
+
310
+ ## 📦 Build & Deploy
311
+
312
+ ### Building Your Plugin
313
+
314
+ ```bash
315
+ # Build optimized bundle
316
+ npm run build
317
+
318
+ # Analyze bundle size
319
+ npm run analyze
320
+ ```
321
+
322
+ ### Deployment
323
+
324
+ ```bash
325
+ # Deploy using TagadaPay CLI
326
+ npx @tagadapay/plugin-cli deploy
327
+
328
+ # Deploy specific environment
329
+ npx @tagadapay/plugin-cli deploy --env production
330
+ ```
331
+
332
+ ## 🔧 Configuration
333
+
334
+ ### Plugin Configuration
335
+
336
+ ```json
337
+ {
338
+ "name": "My Checkout Plugin",
339
+ "version": "1.0.0",
340
+ "description": "Custom checkout experience",
341
+ "main": "dist/index.js",
342
+ "tagadapay": {
343
+ "type": "checkout",
344
+ "mode": "direct",
345
+ "framework": "react"
346
+ }
347
+ }
348
+ ```
349
+
350
+ ## 🔐 Security
351
+
352
+ ### Best Practices
353
+
354
+ - Never store sensitive payment data
355
+ - Always validate user inputs
356
+ - Use HTTPS in production
357
+ - Implement proper error handling
358
+ - Follow PCI DSS guidelines
359
+
360
+ ### Token Management
361
+
362
+ ```typescript
363
+ // ✅ Good: Use tokenized payments
364
+ const paymentToken = await tokenizePayment(cardData);
365
+ await processPayment({ token: paymentToken });
366
+
367
+ // ❌ Bad: Never store raw card data
368
+ // const cardNumber = '4111111111111111'; // Don't do this
369
+ ```
370
+
371
+ ## 📱 Mobile Optimization
372
+
373
+ ### Responsive Design
374
+
375
+ ```css
376
+ .checkout-container {
377
+ max-width: 600px;
378
+ margin: 0 auto;
379
+ padding: 16px;
380
+ }
381
+
382
+ @media (max-width: 768px) {
383
+ .checkout-container {
384
+ padding: 8px;
385
+ }
386
+
387
+ .checkout-form {
388
+ font-size: 16px; /* Prevent zoom on iOS */
389
+ }
390
+ }
391
+ ```
392
+
393
+ ### Touch Interactions
394
+
395
+ ```typescript
396
+ const handleTouchStart = (e) => {
397
+ // Optimize for touch devices
398
+ e.preventDefault();
399
+ // Handle touch interaction
400
+ };
401
+ ```
402
+
403
+ ## 🌐 Internationalization
404
+
405
+ ### Multi-language Support
406
+
407
+ ```typescript
408
+ import { useTranslation } from '@tagadapay/plugin-sdk';
409
+
410
+ function CheckoutForm() {
411
+ const { t } = useTranslation();
412
+
413
+ return (
414
+ <form>
415
+ <label>{t('checkout.email')}</label>
416
+ <input type="email" placeholder={t('checkout.email_placeholder')} />
417
+ </form>
418
+ );
419
+ }
420
+ ```
421
+
422
+ ### Currency Support
423
+
424
+ ```typescript
425
+ import { useCurrency } from '@tagadapay/plugin-sdk';
426
+
427
+ function PriceDisplay({ amount }) {
428
+ const { formatPrice, currency } = useCurrency();
429
+
430
+ return <span>{formatPrice(amount, currency)}</span>;
431
+ }
432
+ ```
433
+
434
+ ## 📊 Analytics & Monitoring
435
+
436
+ ### Event Tracking
437
+
438
+ ```typescript
439
+ import { trackEvent } from '@tagadapay/plugin-sdk';
440
+
441
+ // Track user interactions
442
+ trackEvent('checkout_started', {
443
+ product_id: 'prod_123',
444
+ value: 2999,
445
+ currency: 'USD',
446
+ });
447
+
448
+ // Track conversions
449
+ trackEvent('purchase_completed', {
450
+ transaction_id: 'txn_456',
451
+ value: 2999,
452
+ currency: 'USD',
453
+ });
454
+ ```
455
+
456
+ ### Performance Monitoring
457
+
458
+ ```typescript
459
+ import { performance } from '@tagadapay/plugin-sdk';
460
+
461
+ // Measure load times
462
+ performance.mark('checkout-start');
463
+ // ... checkout logic
464
+ performance.mark('checkout-end');
465
+ performance.measure('checkout-duration', 'checkout-start', 'checkout-end');
466
+ ```
467
+
468
+ ## 🤝 Contributing
469
+
470
+ ### Development Setup
471
+
472
+ ```bash
473
+ # Clone the repository
474
+ git clone https://github.com/tagadapay/plugin-sdk.git
475
+
476
+ # Install dependencies
477
+ npm install
478
+
479
+ # Start development
480
+ npm run dev
481
+ ```
482
+
483
+ ### Submitting Changes
484
+
485
+ 1. Fork the repository
486
+ 2. Create a feature branch
487
+ 3. Make your changes
488
+ 4. Add tests
489
+ 5. Submit a pull request
490
+
491
+ ## 📄 License
492
+
493
+ MIT License - see [LICENSE](./LICENSE) for details.
494
+
495
+ ## 🆘 Support
496
+
497
+ - **Documentation**: [docs.tagadapay.com](https://docs.tagadapay.com)
498
+ - **Discord**: [discord.gg/tagadapay](https://discord.gg/tagadapay)
499
+ - **Email**: support@tagadapay.com
500
+ - **GitHub Issues**: [github.com/tagadapay/plugin-sdk/issues](https://github.com/tagadapay/plugin-sdk/issues)
501
+
502
+ ---
503
+
504
+ Built with ❤️ by the TagadaPay team