pakasir-js 1.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/LICENSE +5 -0
- package/README.md +148 -0
- package/dist/index.cjs +2 -0
- package/dist/index.d.cts +91 -0
- package/dist/index.d.ts +91 -0
- package/dist/index.js +2 -0
- package/package.json +39 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
Copyright 2026 FANNYMU
|
|
2
|
+
|
|
3
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
|
|
4
|
+
|
|
5
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# pakasir-js
|
|
2
|
+
|
|
3
|
+
The fastest Pakasir SDK. 4KB. Zero dependencies.
|
|
4
|
+
|
|
5
|
+
Ultra-lean TypeScript payment library for Pakasir API. Works on Node 18+, Bun, and Deno.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm i pakasir-js
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
### Initialize
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { Pakasir } from 'pakasir-js';
|
|
19
|
+
|
|
20
|
+
const pakasir = new Pakasir({
|
|
21
|
+
project: 'myshop',
|
|
22
|
+
apiKey: 'sk_live_xxxxx'
|
|
23
|
+
});
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Create Payment URL (Instant)
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
const paymentUrl = pakasir.createPaymentUrl({
|
|
30
|
+
amount: 50000,
|
|
31
|
+
order_id: 'ORD123',
|
|
32
|
+
redirect_url: 'https://myshop.com/success'
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
// Redirect user: window.location.href = paymentUrl
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Create Transaction (QRIS)
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
const result = await pakasir.createTransaction('qris', {
|
|
42
|
+
amount: 50000,
|
|
43
|
+
order_id: 'ORD456',
|
|
44
|
+
customer_email: 'user@example.com',
|
|
45
|
+
customer_phone: '08123456789'
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
console.log(result.data?.payment_url);
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Check Transaction Status
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
const txn = await pakasir.getTransaction({ order_id: 'ORD456' });
|
|
55
|
+
console.log(txn.data?.status); // 'pending' | 'success' | 'failed'
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## API Reference
|
|
59
|
+
|
|
60
|
+
| Method | Params | Returns |
|
|
61
|
+
| ----------------------------------- | ------------------------------------------------------------ | ------------------------------ |
|
|
62
|
+
| `createPaymentUrl(params)` | `amount, order_id, redirect_url?, qris_only?` | `string` (URL) |
|
|
63
|
+
| `createTransaction(method, params)` | `method: 'qris' \| 'bni_va' \| ...`, `amount, order_id, ...` | `Promise<TransactionResponse>` |
|
|
64
|
+
| `getTransaction(params)` | `order_id` | `Promise<TransactionResponse>` |
|
|
65
|
+
| `cancelTransaction(params)` | `order_id` | `Promise<TransactionResponse>` |
|
|
66
|
+
| `simulatePayment(params)` | `order_id` | `Promise<TransactionResponse>` |
|
|
67
|
+
| `validateWebhook(payload)` | webhook payload object | `boolean` |
|
|
68
|
+
|
|
69
|
+
## Payment Methods
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
import { PaymentMethod } from 'pakasir-js';
|
|
73
|
+
|
|
74
|
+
PaymentMethod.QRIS;
|
|
75
|
+
PaymentMethod.BNI_VA;
|
|
76
|
+
PaymentMethod.BRI_VA;
|
|
77
|
+
PaymentMethod.CIMB_VA;
|
|
78
|
+
PaymentMethod.PERMATA_VA;
|
|
79
|
+
PaymentMethod.MAYBANK_VA;
|
|
80
|
+
PaymentMethod.PAYPAL;
|
|
81
|
+
// ... and 4 more
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Webhook Handling
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
app.post('/webhook', (req, res) => {
|
|
88
|
+
const payload = req.body;
|
|
89
|
+
|
|
90
|
+
if (!pakasir.validateWebhook(payload)) {
|
|
91
|
+
return res.status(401).json({ error: 'Invalid signature' });
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Process payment based on payload.status
|
|
95
|
+
if (payload.status === 'success') {
|
|
96
|
+
// Update order status in database
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
res.json({ ok: true });
|
|
100
|
+
});
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Error Handling
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
import { PakasirError, HttpError } from 'pakasir-js';
|
|
107
|
+
|
|
108
|
+
try {
|
|
109
|
+
await pakasir.getTransaction({ order_id: 'ORD999' });
|
|
110
|
+
} catch (err) {
|
|
111
|
+
if (err instanceof HttpError) {
|
|
112
|
+
console.error(`HTTP ${err.status}: ${err.body}`);
|
|
113
|
+
} else if (err instanceof PakasirError) {
|
|
114
|
+
console.error(err.message);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Sandbox Mode
|
|
120
|
+
|
|
121
|
+
Automatically detected from API key prefix:
|
|
122
|
+
|
|
123
|
+
```typescript
|
|
124
|
+
// Sandbox mode (auto-detected)
|
|
125
|
+
const pakasir = new Pakasir({
|
|
126
|
+
project: 'myshop',
|
|
127
|
+
apiKey: 'sk_test_xxxxx' // Triggers sandbox
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
// Or explicit
|
|
131
|
+
const pakasir = new Pakasir({
|
|
132
|
+
project: 'myshop',
|
|
133
|
+
apiKey: 'sk_live_xxxxx',
|
|
134
|
+
sandbox: true // Force sandbox
|
|
135
|
+
});
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Performance
|
|
139
|
+
|
|
140
|
+
- **Bundle Size**: ~4KB minified + gzipped
|
|
141
|
+
- **Zero Dependencies**: No external packages
|
|
142
|
+
- **Tree-Shakeable**: Import only what you need
|
|
143
|
+
- **Payment URL**: <1ms (no network call)
|
|
144
|
+
- **API Calls**: Minimal overhead
|
|
145
|
+
|
|
146
|
+
## License
|
|
147
|
+
|
|
148
|
+
ISC
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var i=class r extends Error{constructor(t){super(t),this.name="PakasirError",Object.setPrototypeOf(this,r.prototype);}},n=class r extends i{constructor(e,a){super(`HTTP ${e}: ${a}`);this.status=e;this.body=a;this.name="HttpError",Object.setPrototypeOf(this,r.prototype);}};async function o(r,t){let e=await fetch(r,t),a=await e.text();if(!e.ok)throw new n(e.status,a);try{return JSON.parse(a)}catch{return a}}var y="https://app.pakasir.com";function u(r,t,e="qris"){let{amount:a,order_id:p,redirect_url:d,qris_only:_}=t,h=e==="paypal"?`/paypal/${r}/${a}`:`/pay/${r}/${a}`,s=new URLSearchParams;return s.set("order_id",p),d&&s.set("redirect",d),_&&e!=="paypal"&&s.set("qris_only","1"),`${y}${h}?${s.toString()}`}function l(r,t,e){return `${y}/api/transactiondetail?project=${encodeURIComponent(t)}&order_id=${encodeURIComponent(e)}`}function P(r,t){return !r||typeof r!="object"?false:["project","order_id","amount","status","method"].every(p=>Object.prototype.hasOwnProperty.call(r,p))}var c="https://app.pakasir.com",m=class{constructor(t){this.project=t.project,this.apiKey=t.apiKey,this.sandbox=t.sandbox??this.apiKey.startsWith("sk_test_");}createPaymentUrl(t){return u(this.project,t)}async createTransaction(t,e){let a={amount:e.amount,order_id:e.order_id,customer_phone:e.customer_phone||"",customer_email:e.customer_email||"",customer_name:e.customer_name||"",customer_bank:e.customer_bank||"",return_url:e.return_url||"",expired_time:e.expired_time||3600};return o(`${c}/api/transactioncreate/${t}`,{method:"POST",headers:{"Content-Type":"application/json",apikey:this.apiKey},body:JSON.stringify(a)})}async getTransaction(t){let e=l("transactiondetail",this.project,t.order_id);return o(e,{headers:{apikey:this.apiKey}})}async cancelTransaction(t){return o(`${c}/api/transactioncancel`,{method:"POST",headers:{"Content-Type":"application/json",apikey:this.apiKey},body:JSON.stringify({project:this.project,order_id:t.order_id})})}async simulatePayment(t){return o(`${c}/api/paymentsimulation`,{method:"POST",headers:{"Content-Type":"application/json",apikey:this.apiKey},body:JSON.stringify({project:this.project,order_id:t.order_id})})}validateWebhook(t){return P(t,this.apiKey)}};var g={QRIS:"qris",CIMB_VA:"cimb_niaga_va",BNI_VA:"bni_va",BRI_VA:"bri_va",PERMATA_VA:"permata_va",MAYBANK_VA:"maybank_va",ATM_BERSAMA_VA:"atm_bersama_va",ARTHA_GRAHA_VA:"artha_graha_va",SAMPOERNA_VA:"sampoerna_va",BNC_VA:"bnc_va",PAYPAL:"paypal"};
|
|
2
|
+
exports.HttpError=n;exports.Pakasir=m;exports.PakasirError=i;exports.PaymentMethod=g;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
declare const PaymentMethod: {
|
|
2
|
+
readonly QRIS: "qris";
|
|
3
|
+
readonly CIMB_VA: "cimb_niaga_va";
|
|
4
|
+
readonly BNI_VA: "bni_va";
|
|
5
|
+
readonly BRI_VA: "bri_va";
|
|
6
|
+
readonly PERMATA_VA: "permata_va";
|
|
7
|
+
readonly MAYBANK_VA: "maybank_va";
|
|
8
|
+
readonly ATM_BERSAMA_VA: "atm_bersama_va";
|
|
9
|
+
readonly ARTHA_GRAHA_VA: "artha_graha_va";
|
|
10
|
+
readonly SAMPOERNA_VA: "sampoerna_va";
|
|
11
|
+
readonly BNC_VA: "bnc_va";
|
|
12
|
+
readonly PAYPAL: "paypal";
|
|
13
|
+
};
|
|
14
|
+
type PaymentMethodType = (typeof PaymentMethod)[keyof typeof PaymentMethod];
|
|
15
|
+
interface PakasirConfig {
|
|
16
|
+
project: string;
|
|
17
|
+
apiKey: string;
|
|
18
|
+
sandbox?: boolean;
|
|
19
|
+
}
|
|
20
|
+
interface CreateTransactionParams {
|
|
21
|
+
amount: number;
|
|
22
|
+
order_id: string;
|
|
23
|
+
method: PaymentMethodType;
|
|
24
|
+
customer_phone?: string;
|
|
25
|
+
customer_email?: string;
|
|
26
|
+
customer_name?: string;
|
|
27
|
+
customer_bank?: string;
|
|
28
|
+
return_url?: string;
|
|
29
|
+
expired_time?: number;
|
|
30
|
+
}
|
|
31
|
+
interface GetTransactionParams {
|
|
32
|
+
order_id: string;
|
|
33
|
+
}
|
|
34
|
+
interface CancelTransactionParams {
|
|
35
|
+
order_id: string;
|
|
36
|
+
}
|
|
37
|
+
interface SimulatePaymentParams {
|
|
38
|
+
order_id: string;
|
|
39
|
+
}
|
|
40
|
+
interface CreatePaymentUrlParams {
|
|
41
|
+
amount: number;
|
|
42
|
+
order_id: string;
|
|
43
|
+
redirect_url?: string;
|
|
44
|
+
qris_only?: boolean;
|
|
45
|
+
}
|
|
46
|
+
interface TransactionResponse {
|
|
47
|
+
status: string;
|
|
48
|
+
message: string;
|
|
49
|
+
data?: {
|
|
50
|
+
transaction_id?: string;
|
|
51
|
+
order_id: string;
|
|
52
|
+
amount: number;
|
|
53
|
+
status: string;
|
|
54
|
+
payment_url?: string;
|
|
55
|
+
method?: PaymentMethodType;
|
|
56
|
+
expired_time?: string;
|
|
57
|
+
created_at?: string;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
interface WebhookPayload {
|
|
61
|
+
project: string;
|
|
62
|
+
order_id: string;
|
|
63
|
+
amount: number;
|
|
64
|
+
status: string;
|
|
65
|
+
method: PaymentMethodType;
|
|
66
|
+
[key: string]: any;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
declare class Pakasir {
|
|
70
|
+
private project;
|
|
71
|
+
private apiKey;
|
|
72
|
+
private sandbox;
|
|
73
|
+
constructor(config: PakasirConfig);
|
|
74
|
+
createPaymentUrl(params: CreatePaymentUrlParams): string;
|
|
75
|
+
createTransaction(method: string, params: CreateTransactionParams): Promise<TransactionResponse>;
|
|
76
|
+
getTransaction(params: GetTransactionParams): Promise<TransactionResponse>;
|
|
77
|
+
cancelTransaction(params: CancelTransactionParams): Promise<TransactionResponse>;
|
|
78
|
+
simulatePayment(params: SimulatePaymentParams): Promise<TransactionResponse>;
|
|
79
|
+
validateWebhook(payload: WebhookPayload): boolean;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
declare class PakasirError extends Error {
|
|
83
|
+
constructor(message: string);
|
|
84
|
+
}
|
|
85
|
+
declare class HttpError extends PakasirError {
|
|
86
|
+
status: number;
|
|
87
|
+
body: string;
|
|
88
|
+
constructor(status: number, body: string);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export { type CancelTransactionParams, type CreatePaymentUrlParams, type CreateTransactionParams, type GetTransactionParams, HttpError, Pakasir, type PakasirConfig, PakasirError, PaymentMethod, type PaymentMethodType, type SimulatePaymentParams, type TransactionResponse, type WebhookPayload };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
declare const PaymentMethod: {
|
|
2
|
+
readonly QRIS: "qris";
|
|
3
|
+
readonly CIMB_VA: "cimb_niaga_va";
|
|
4
|
+
readonly BNI_VA: "bni_va";
|
|
5
|
+
readonly BRI_VA: "bri_va";
|
|
6
|
+
readonly PERMATA_VA: "permata_va";
|
|
7
|
+
readonly MAYBANK_VA: "maybank_va";
|
|
8
|
+
readonly ATM_BERSAMA_VA: "atm_bersama_va";
|
|
9
|
+
readonly ARTHA_GRAHA_VA: "artha_graha_va";
|
|
10
|
+
readonly SAMPOERNA_VA: "sampoerna_va";
|
|
11
|
+
readonly BNC_VA: "bnc_va";
|
|
12
|
+
readonly PAYPAL: "paypal";
|
|
13
|
+
};
|
|
14
|
+
type PaymentMethodType = (typeof PaymentMethod)[keyof typeof PaymentMethod];
|
|
15
|
+
interface PakasirConfig {
|
|
16
|
+
project: string;
|
|
17
|
+
apiKey: string;
|
|
18
|
+
sandbox?: boolean;
|
|
19
|
+
}
|
|
20
|
+
interface CreateTransactionParams {
|
|
21
|
+
amount: number;
|
|
22
|
+
order_id: string;
|
|
23
|
+
method: PaymentMethodType;
|
|
24
|
+
customer_phone?: string;
|
|
25
|
+
customer_email?: string;
|
|
26
|
+
customer_name?: string;
|
|
27
|
+
customer_bank?: string;
|
|
28
|
+
return_url?: string;
|
|
29
|
+
expired_time?: number;
|
|
30
|
+
}
|
|
31
|
+
interface GetTransactionParams {
|
|
32
|
+
order_id: string;
|
|
33
|
+
}
|
|
34
|
+
interface CancelTransactionParams {
|
|
35
|
+
order_id: string;
|
|
36
|
+
}
|
|
37
|
+
interface SimulatePaymentParams {
|
|
38
|
+
order_id: string;
|
|
39
|
+
}
|
|
40
|
+
interface CreatePaymentUrlParams {
|
|
41
|
+
amount: number;
|
|
42
|
+
order_id: string;
|
|
43
|
+
redirect_url?: string;
|
|
44
|
+
qris_only?: boolean;
|
|
45
|
+
}
|
|
46
|
+
interface TransactionResponse {
|
|
47
|
+
status: string;
|
|
48
|
+
message: string;
|
|
49
|
+
data?: {
|
|
50
|
+
transaction_id?: string;
|
|
51
|
+
order_id: string;
|
|
52
|
+
amount: number;
|
|
53
|
+
status: string;
|
|
54
|
+
payment_url?: string;
|
|
55
|
+
method?: PaymentMethodType;
|
|
56
|
+
expired_time?: string;
|
|
57
|
+
created_at?: string;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
interface WebhookPayload {
|
|
61
|
+
project: string;
|
|
62
|
+
order_id: string;
|
|
63
|
+
amount: number;
|
|
64
|
+
status: string;
|
|
65
|
+
method: PaymentMethodType;
|
|
66
|
+
[key: string]: any;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
declare class Pakasir {
|
|
70
|
+
private project;
|
|
71
|
+
private apiKey;
|
|
72
|
+
private sandbox;
|
|
73
|
+
constructor(config: PakasirConfig);
|
|
74
|
+
createPaymentUrl(params: CreatePaymentUrlParams): string;
|
|
75
|
+
createTransaction(method: string, params: CreateTransactionParams): Promise<TransactionResponse>;
|
|
76
|
+
getTransaction(params: GetTransactionParams): Promise<TransactionResponse>;
|
|
77
|
+
cancelTransaction(params: CancelTransactionParams): Promise<TransactionResponse>;
|
|
78
|
+
simulatePayment(params: SimulatePaymentParams): Promise<TransactionResponse>;
|
|
79
|
+
validateWebhook(payload: WebhookPayload): boolean;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
declare class PakasirError extends Error {
|
|
83
|
+
constructor(message: string);
|
|
84
|
+
}
|
|
85
|
+
declare class HttpError extends PakasirError {
|
|
86
|
+
status: number;
|
|
87
|
+
body: string;
|
|
88
|
+
constructor(status: number, body: string);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export { type CancelTransactionParams, type CreatePaymentUrlParams, type CreateTransactionParams, type GetTransactionParams, HttpError, Pakasir, type PakasirConfig, PakasirError, PaymentMethod, type PaymentMethodType, type SimulatePaymentParams, type TransactionResponse, type WebhookPayload };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var i=class r extends Error{constructor(t){super(t),this.name="PakasirError",Object.setPrototypeOf(this,r.prototype);}},n=class r extends i{constructor(e,a){super(`HTTP ${e}: ${a}`);this.status=e;this.body=a;this.name="HttpError",Object.setPrototypeOf(this,r.prototype);}};async function o(r,t){let e=await fetch(r,t),a=await e.text();if(!e.ok)throw new n(e.status,a);try{return JSON.parse(a)}catch{return a}}var y="https://app.pakasir.com";function u(r,t,e="qris"){let{amount:a,order_id:p,redirect_url:d,qris_only:_}=t,h=e==="paypal"?`/paypal/${r}/${a}`:`/pay/${r}/${a}`,s=new URLSearchParams;return s.set("order_id",p),d&&s.set("redirect",d),_&&e!=="paypal"&&s.set("qris_only","1"),`${y}${h}?${s.toString()}`}function l(r,t,e){return `${y}/api/transactiondetail?project=${encodeURIComponent(t)}&order_id=${encodeURIComponent(e)}`}function P(r,t){return !r||typeof r!="object"?false:["project","order_id","amount","status","method"].every(p=>Object.prototype.hasOwnProperty.call(r,p))}var c="https://app.pakasir.com",m=class{constructor(t){this.project=t.project,this.apiKey=t.apiKey,this.sandbox=t.sandbox??this.apiKey.startsWith("sk_test_");}createPaymentUrl(t){return u(this.project,t)}async createTransaction(t,e){let a={amount:e.amount,order_id:e.order_id,customer_phone:e.customer_phone||"",customer_email:e.customer_email||"",customer_name:e.customer_name||"",customer_bank:e.customer_bank||"",return_url:e.return_url||"",expired_time:e.expired_time||3600};return o(`${c}/api/transactioncreate/${t}`,{method:"POST",headers:{"Content-Type":"application/json",apikey:this.apiKey},body:JSON.stringify(a)})}async getTransaction(t){let e=l("transactiondetail",this.project,t.order_id);return o(e,{headers:{apikey:this.apiKey}})}async cancelTransaction(t){return o(`${c}/api/transactioncancel`,{method:"POST",headers:{"Content-Type":"application/json",apikey:this.apiKey},body:JSON.stringify({project:this.project,order_id:t.order_id})})}async simulatePayment(t){return o(`${c}/api/paymentsimulation`,{method:"POST",headers:{"Content-Type":"application/json",apikey:this.apiKey},body:JSON.stringify({project:this.project,order_id:t.order_id})})}validateWebhook(t){return P(t,this.apiKey)}};var g={QRIS:"qris",CIMB_VA:"cimb_niaga_va",BNI_VA:"bni_va",BRI_VA:"bri_va",PERMATA_VA:"permata_va",MAYBANK_VA:"maybank_va",ATM_BERSAMA_VA:"atm_bersama_va",ARTHA_GRAHA_VA:"artha_graha_va",SAMPOERNA_VA:"sampoerna_va",BNC_VA:"bnc_va",PAYPAL:"paypal"};
|
|
2
|
+
export{n as HttpError,m as Pakasir,i as PakasirError,g as PaymentMethod};
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pakasir-js",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "The fastest Pakasir SDK. 4KB. Zero dependencies.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"sideEffects": false,
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsup",
|
|
19
|
+
"prepublishOnly": "npm run build"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"payment",
|
|
23
|
+
"pakasir",
|
|
24
|
+
"indonesia",
|
|
25
|
+
"qris",
|
|
26
|
+
"va",
|
|
27
|
+
"virtual-account",
|
|
28
|
+
"payment-gateway"
|
|
29
|
+
],
|
|
30
|
+
"author": "",
|
|
31
|
+
"license": "ISC",
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"tsup": "^8.0.0",
|
|
34
|
+
"typescript": "^5.3.0"
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"dist"
|
|
38
|
+
]
|
|
39
|
+
}
|