paperless-client 1.0.0 → 1.0.1
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/dist/index.d.ts +2 -2
- package/dist/index.js +2 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ import { type InitiatePaymentOptionsType } from './initiate_payment.ts';
|
|
|
2
2
|
import { formatDescription } from './format_description.ts';
|
|
3
3
|
export { formatDescription };
|
|
4
4
|
export { type CallbackDataType } from './callback_data.ts';
|
|
5
|
-
export type GetPaymentUrlOptionsType = Omit<InitiatePaymentOptionsType, 'muid' | 'access_app_key'
|
|
5
|
+
export type GetPaymentUrlOptionsType = Omit<InitiatePaymentOptionsType, 'muid' | 'access_app_key'>;
|
|
6
6
|
export default class PaperlessClient {
|
|
7
7
|
#private;
|
|
8
|
-
constructor(muid: string, app_access_key: string,
|
|
8
|
+
constructor(muid: string, app_access_key: string, host: string);
|
|
9
9
|
getPaymentUrl(options: GetPaymentUrlOptionsType): Promise<string>;
|
|
10
10
|
checkPaymentStatus(token: string): Promise<{
|
|
11
11
|
muid: string;
|
package/dist/index.js
CHANGED
|
@@ -8,12 +8,10 @@ export {} from "./callback_data.js";
|
|
|
8
8
|
export default class PaperlessClient {
|
|
9
9
|
#muid;
|
|
10
10
|
#app_access_key;
|
|
11
|
-
#merchant_ref_id;
|
|
12
11
|
#host;
|
|
13
|
-
constructor(muid, app_access_key,
|
|
12
|
+
constructor(muid, app_access_key, host) {
|
|
14
13
|
this.#muid = muid;
|
|
15
14
|
this.#app_access_key = app_access_key;
|
|
16
|
-
this.#merchant_ref_id = merchant_ref_id;
|
|
17
15
|
this.#host = host;
|
|
18
16
|
}
|
|
19
17
|
async getPaymentUrl(options) {
|
|
@@ -26,8 +24,7 @@ export default class PaperlessClient {
|
|
|
26
24
|
const initiatePaymentResponse = await initiatePayment(checkServerResponse.data.initiate_payment_url, {
|
|
27
25
|
...options,
|
|
28
26
|
muid: this.#muid,
|
|
29
|
-
access_app_key: this.#app_access_key
|
|
30
|
-
merchant_ref_id: this.#merchant_ref_id
|
|
27
|
+
access_app_key: this.#app_access_key
|
|
31
28
|
});
|
|
32
29
|
if (!initiatePaymentResponse.success) {
|
|
33
30
|
throw new Error('Payment initiation failed', {
|