angular-klasha 0.0.1 → 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/index.d.ts ADDED
@@ -0,0 +1,422 @@
1
+ import * as i0 from '@angular/core';
2
+ import { OnDestroy, EventEmitter, ModuleWithProviders, InjectionToken, Provider, EnvironmentProviders } from '@angular/core';
3
+
4
+ /**
5
+ * The `kit` payload that is handed to `KlashaClient` as the 8th constructor
6
+ * argument.
7
+ *
8
+ * IMPORTANT: `pay.js` **mutates** the object it is given (it assigns
9
+ * `businessId`, `currency` and `redirect_url` onto it). `AngularKlashaService`
10
+ * therefore builds a brand new `kit` object for every payment — never reuse or
11
+ * share a kit between payments.
12
+ */
13
+ interface KlashaKitOptions {
14
+ /**
15
+ * The currency the customer is charged in. Defaults to `sourceCurrency`.
16
+ */
17
+ currency?: string;
18
+ /**
19
+ * The customer's phone number.
20
+ *
21
+ * This is the field `pay.js` actually reads. Always set it.
22
+ */
23
+ phone?: string;
24
+ /**
25
+ * @deprecated `pay.js` never reads `phone_number` — it reads {@link phone}.
26
+ * The service populates both so that existing integrations keep working,
27
+ * but new code should use `phone`.
28
+ */
29
+ phone_number?: string;
30
+ /**
31
+ * The customer's email address.
32
+ */
33
+ email?: string;
34
+ /**
35
+ * The customer's full name.
36
+ */
37
+ fullname?: string;
38
+ /**
39
+ * Unique transaction reference. Generated automatically when omitted.
40
+ */
41
+ tx_ref?: string;
42
+ /**
43
+ * The product type, as read by `pay.js`.
44
+ */
45
+ productType?: string;
46
+ /**
47
+ * @deprecated Alias of {@link productType} kept for backwards compatibility.
48
+ */
49
+ paymentType?: string;
50
+ /**
51
+ * The amount for this transaction. Defaults to the top level `amount`.
52
+ */
53
+ amount?: number;
54
+ /**
55
+ * The amount in the source currency, when it differs from `amount`.
56
+ */
57
+ sourceAmount?: number;
58
+ /**
59
+ * Assigned by `pay.js` — do not set it yourself.
60
+ */
61
+ businessId?: string | number;
62
+ /**
63
+ * Assigned by `pay.js` — do not set it yourself.
64
+ */
65
+ redirect_url?: string;
66
+ /**
67
+ * Called by `pay.js` once the payment flow completes. The component and the
68
+ * directive wire this up to their `(callBack)` output for you.
69
+ */
70
+ callBack?: (response?: unknown) => void;
71
+ [key: string]: unknown;
72
+ }
73
+ interface KlashaOptions {
74
+ /**
75
+ * `true` targets the Klasha sandbox, `false` targets the live gateway.
76
+ *
77
+ * This flag is the **only** thing that selects the environment: it is
78
+ * forwarded to `KlashaClient` as the 9th constructor argument. Versions
79
+ * 0.0.x of this library never forwarded it, so test mode silently used the
80
+ * live gateway.
81
+ */
82
+ isTestMode?: boolean;
83
+ /**
84
+ * Merchant's API key (found on the Klasha dashboard).
85
+ */
86
+ merchantKey: string;
87
+ /**
88
+ * Merchant's business id (found on the Klasha dashboard).
89
+ */
90
+ businessId: string;
91
+ /**
92
+ * The amount to be paid by the customer.
93
+ */
94
+ amount: number;
95
+ /**
96
+ * The country/destination currency of the transaction, e.g. `NGN`.
97
+ * Defaults to `NGN`.
98
+ */
99
+ destinationCurrency?: string;
100
+ /**
101
+ * The currency the merchant prices in, e.g. `NGN`. Defaults to `NGN`.
102
+ */
103
+ sourceCurrency?: string;
104
+ /**
105
+ * Unique transaction reference. Generated automatically when omitted.
106
+ */
107
+ tx_ref?: string;
108
+ /**
109
+ * Full name of the customer.
110
+ */
111
+ fullname?: string;
112
+ /**
113
+ * Email address of the customer.
114
+ */
115
+ email: string;
116
+ /**
117
+ * Phone number of the customer. Either `phone` or `phone_number` may be
118
+ * supplied; both end up on `kit.phone`.
119
+ */
120
+ phone?: string;
121
+ /**
122
+ * @deprecated Use {@link phone}. Kept so existing integrations keep working.
123
+ */
124
+ phone_number?: string;
125
+ /**
126
+ * URL the customer is redirected to after the payment completes.
127
+ */
128
+ callbackUrl?: string;
129
+ /**
130
+ * Free-form extra data. Not sent to Klasha.
131
+ */
132
+ metadata?: unknown;
133
+ /**
134
+ * Human readable description of what is being paid for.
135
+ */
136
+ paymentDescription?: string;
137
+ /**
138
+ * Extra payload handed to `KlashaClient`. Populated automatically from the
139
+ * options above when omitted.
140
+ */
141
+ kit?: KlashaKitOptions;
142
+ }
143
+ /**
144
+ * The fully resolved option set that is handed to `KlashaClient`. Produced by
145
+ * {@link AngularKlashaService.getKlashaOptions}.
146
+ */
147
+ interface ResolvedKlashaOptions extends KlashaOptions {
148
+ isTestMode: boolean;
149
+ destinationCurrency: string;
150
+ sourceCurrency: string;
151
+ tx_ref: string;
152
+ phone: string;
153
+ kit: KlashaKitOptions;
154
+ callBack?: (response?: unknown) => void;
155
+ }
156
+ /**
157
+ * @deprecated Use {@link ResolvedKlashaOptions}.
158
+ */
159
+ type PrivateKlashaOptions = ResolvedKlashaOptions;
160
+ /**
161
+ * Configuration accepted by `provideKlasha()` and
162
+ * `AngularKlashaModule.forRoot()`.
163
+ */
164
+ interface KlashaConfig {
165
+ merchantKey: string;
166
+ businessId: string;
167
+ /**
168
+ * Defaults to `false` (live gateway). Set to `true` for the sandbox.
169
+ */
170
+ isTestMode?: boolean;
171
+ }
172
+
173
+ /**
174
+ * Shape of the global installed by `https://js.klasha.com/pay.js`.
175
+ *
176
+ * ```js
177
+ * function KlashaClient(merchantKey, businessId, amount, containerId,
178
+ * callbackUrl, countryCode, sourceCurrency, kit, isTestMode)
179
+ * ```
180
+ */
181
+ type KlashaClientConstructor = new (merchantKey: string, businessId: string | number, amount: number, containerId: string, callbackUrl: string, countryCode: string, sourceCurrency: string, kit: KlashaKitOptions, isTestMode: boolean) => {
182
+ init: () => void;
183
+ };
184
+ /**
185
+ * Returns a process-unique DOM id for a checkout container. Each component or
186
+ * directive instance owns exactly one, so two payment buttons on the same page
187
+ * can never collide (0.0.x hardcoded `ktest` for every instance).
188
+ */
189
+ declare function nextKlashaContainerId(): string;
190
+ declare class AngularKlashaService {
191
+ private readonly merchantKey;
192
+ private readonly businessId;
193
+ private readonly isTestMode;
194
+ private readonly document;
195
+ private readonly isBrowser;
196
+ private scriptPromise;
197
+ /**
198
+ * The window the checkout script is loaded into. `null` on the server.
199
+ */
200
+ private get window();
201
+ /**
202
+ * Loads `https://js.klasha.com/pay.js` exactly once and resolves when
203
+ * `window.KlashaClient` is available.
204
+ *
205
+ * jQuery is deliberately not loaded: `pay.js` does not use it.
206
+ */
207
+ loadScript(): Promise<void>;
208
+ /**
209
+ * Returns the checkout container for `containerId`, creating it only when it
210
+ * does not already exist. Repeated calls never append a second element with
211
+ * the same id.
212
+ */
213
+ ensureContainer(containerId: string): HTMLElement | null;
214
+ /**
215
+ * Removes a container previously created by {@link ensureContainer}. Called
216
+ * from `ngOnDestroy` so remounting does not leak DOM nodes.
217
+ */
218
+ removeContainer(containerId: string): void;
219
+ /**
220
+ * Instantiates `KlashaClient` and opens the checkout.
221
+ *
222
+ * The 9th argument (`isTestMode`) is the fix for the headline bug in
223
+ * `angular-klasha@0.0.x`: it was never passed, so `isTestMode` was
224
+ * `undefined` inside `pay.js` and every sandbox payment hit the LIVE gateway.
225
+ * It is coerced with `Boolean()` because `pay.js` only branches on
226
+ * truthiness — the string `'false'` would otherwise select production.
227
+ */
228
+ launch(options: ResolvedKlashaOptions, containerId: string): {
229
+ init: () => void;
230
+ };
231
+ /**
232
+ * Validates the merchant supplied options. Returns an empty string when the
233
+ * options are usable, otherwise a human readable error message.
234
+ */
235
+ checkInput(obj: Partial<KlashaOptions>): string;
236
+ /**
237
+ * Resolves merchant supplied options against the globally configured
238
+ * merchant key / business id / test mode, and builds a **fresh** `kit`
239
+ * object (`pay.js` mutates the kit it is given).
240
+ */
241
+ getKlashaOptions(obj: Partial<KlashaOptions>): ResolvedKlashaOptions;
242
+ /**
243
+ * Removes `null`/`undefined` entries so they are not serialised into the
244
+ * request `pay.js` makes.
245
+ */
246
+ clean<T extends object>(obj: T): T;
247
+ /** Generates a random alphanumeric transaction reference. */
248
+ makeId(length?: number): string;
249
+ static ɵfac: i0.ɵɵFactoryDeclaration<AngularKlashaService, never>;
250
+ static ɵprov: i0.ɵɵInjectableDeclaration<AngularKlashaService>;
251
+ }
252
+
253
+ /**
254
+ * Shared implementation behind {@link AngularKlashaComponent} and
255
+ * {@link AngularKlashaDirective}. Not usable on its own — it has no selector.
256
+ */
257
+ declare abstract class AngularKlashaBase implements OnDestroy {
258
+ /** Merchant API key. Overrides the value given to `provideKlasha()`/`forRoot()`. */
259
+ merchantKey?: string;
260
+ /** `true` uses the Klasha sandbox, `false` the live gateway. */
261
+ isTestMode?: boolean;
262
+ /** Merchant business id. Overrides the globally configured one. */
263
+ businessId?: string;
264
+ /** Amount to charge. */
265
+ amount?: number;
266
+ /** Free-form extra data. */
267
+ metadata?: unknown;
268
+ /** Unique transaction reference. Generated when omitted. */
269
+ tx_ref?: string;
270
+ /** @deprecated Use `sourceCurrency`/`destinationCurrency`. */
271
+ currency?: string;
272
+ /** Customer full name. */
273
+ fullname?: string;
274
+ /** Customer email address. */
275
+ email?: string;
276
+ /** Customer phone number. */
277
+ phone?: string;
278
+ /** @deprecated Use `phone`. */
279
+ phone_number?: string;
280
+ /** Currency the merchant prices in. Defaults to `NGN`. */
281
+ sourceCurrency?: string;
282
+ /** Currency the customer is charged in. Defaults to `NGN`. */
283
+ destinationCurrency?: string;
284
+ /** Human readable description of the payment. */
285
+ paymentDescription?: string;
286
+ /** URL the customer returns to after paying. */
287
+ callbackUrl?: string;
288
+ /** @deprecated Use `callbackUrl`. */
289
+ redirectUrl?: string;
290
+ /** Supply every option in one object instead of as individual inputs. */
291
+ klashaOptions?: KlashaOptions;
292
+ /** CSS classes applied to the rendered button (component only). */
293
+ class?: string;
294
+ /** Inline styles applied to the rendered button (component only). */
295
+ style?: Record<string, unknown> | null;
296
+ /** Emitted right before the Klasha checkout is opened. */
297
+ paymentInit: EventEmitter<unknown>;
298
+ /** Emitted with the Klasha response once the payment flow finishes. */
299
+ callBack: EventEmitter<unknown>;
300
+ /**
301
+ * DOM id of the checkout container owned by this instance. Unique per
302
+ * instance, so several payment buttons can coexist on one page.
303
+ */
304
+ readonly containerId: string;
305
+ protected readonly klashaService: AngularKlashaService;
306
+ /** The options last handed to `KlashaClient`. Exposed for debugging/tests. */
307
+ _KlashaOptions?: ResolvedKlashaOptions;
308
+ /**
309
+ * Validates, loads `pay.js`, then opens the Klasha checkout.
310
+ *
311
+ * @returns `undefined` on success, or the validation error message.
312
+ */
313
+ pay(): Promise<string | undefined>;
314
+ /** @internal */
315
+ validateInput(obj: Partial<KlashaOptions>): string;
316
+ /** @internal */
317
+ protected buildOptions(obj: Partial<KlashaOptions>): ResolvedKlashaOptions;
318
+ ngOnDestroy(): void;
319
+ static ɵfac: i0.ɵɵFactoryDeclaration<AngularKlashaBase, never>;
320
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AngularKlashaBase, never, never, { "merchantKey": { "alias": "merchantKey"; "required": false; }; "isTestMode": { "alias": "isTestMode"; "required": false; }; "businessId": { "alias": "businessId"; "required": false; }; "amount": { "alias": "amount"; "required": false; }; "metadata": { "alias": "metadata"; "required": false; }; "tx_ref": { "alias": "tx_ref"; "required": false; }; "currency": { "alias": "currency"; "required": false; }; "fullname": { "alias": "fullname"; "required": false; }; "email": { "alias": "email"; "required": false; }; "phone": { "alias": "phone"; "required": false; }; "phone_number": { "alias": "phone_number"; "required": false; }; "sourceCurrency": { "alias": "sourceCurrency"; "required": false; }; "destinationCurrency": { "alias": "destinationCurrency"; "required": false; }; "paymentDescription": { "alias": "paymentDescription"; "required": false; }; "callbackUrl": { "alias": "callbackUrl"; "required": false; }; "redirectUrl": { "alias": "redirectUrl"; "required": false; }; "klashaOptions": { "alias": "klashaOptions"; "required": false; }; "class": { "alias": "class"; "required": false; }; "style": { "alias": "style"; "required": false; }; }, { "paymentInit": "paymentInit"; "callBack": "callBack"; }, never, never, true, never>;
321
+ }
322
+
323
+ /**
324
+ * Renders a button that opens the Klasha inline checkout when clicked.
325
+ *
326
+ * Standalone — import it directly:
327
+ *
328
+ * ```ts
329
+ * @Component({ imports: [AngularKlashaComponent], ... })
330
+ * ```
331
+ */
332
+ declare class AngularKlashaComponent extends AngularKlashaBase {
333
+ static ɵfac: i0.ɵɵFactoryDeclaration<AngularKlashaComponent, never>;
334
+ static ɵcmp: i0.ɵɵComponentDeclaration<AngularKlashaComponent, "angular-klasha", never, {}, {}, never, ["*"], true, never>;
335
+ }
336
+
337
+ /**
338
+ * Opens the Klasha inline checkout when the host element is clicked. Use it on
339
+ * your own button so you keep full control of the markup.
340
+ *
341
+ * Standalone — import it directly:
342
+ *
343
+ * ```ts
344
+ * @Component({ imports: [AngularKlashaDirective], ... })
345
+ * ```
346
+ */
347
+ declare class AngularKlashaDirective extends AngularKlashaBase {
348
+ onHostClick(): void;
349
+ static ɵfac: i0.ɵɵFactoryDeclaration<AngularKlashaDirective, never>;
350
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AngularKlashaDirective, "[angular-klasha]", never, {}, {}, never, never, true, never>;
351
+ }
352
+
353
+ /**
354
+ * NgModule wrapper around the standalone {@link AngularKlashaComponent} and
355
+ * {@link AngularKlashaDirective}.
356
+ *
357
+ * New applications can skip this entirely and use `provideKlasha()` plus the
358
+ * standalone component/directive imports.
359
+ */
360
+ declare class AngularKlashaModule {
361
+ /**
362
+ * Registers the merchant credentials for the whole application.
363
+ *
364
+ * ```ts
365
+ * AngularKlashaModule.forRoot('merchantKey', 'businessId', true)
366
+ * // or
367
+ * AngularKlashaModule.forRoot({ merchantKey: 'x', businessId: '1', isTestMode: true })
368
+ * ```
369
+ *
370
+ * @param merchantKeyOrConfig Merchant API key, or a {@link KlashaConfig}.
371
+ * @param businessId Merchant business id (when passing positional arguments).
372
+ * @param isTestMode `true` for the Klasha sandbox. Defaults to `false`.
373
+ */
374
+ static forRoot(merchantKeyOrConfig: string | KlashaConfig, businessId?: string, isTestMode?: boolean): ModuleWithProviders<AngularKlashaModule>;
375
+ static ɵfac: i0.ɵɵFactoryDeclaration<AngularKlashaModule, never>;
376
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AngularKlashaModule, never, [typeof AngularKlashaComponent, typeof AngularKlashaDirective], [typeof AngularKlashaComponent, typeof AngularKlashaDirective]>;
377
+ static ɵinj: i0.ɵɵInjectorDeclaration<AngularKlashaModule>;
378
+ }
379
+
380
+ /**
381
+ * The URL of the Klasha inline checkout script.
382
+ *
383
+ * The buckets used by `angular-klasha@0.0.x`
384
+ * (`https://klastatic.fra1.digitaloceanspaces.com/{test,prod}/js/klasha-integration.js`)
385
+ * have been deleted and return `NoSuchBucket`. There is now a single script for
386
+ * both environments; the environment is selected by the `isTestMode`
387
+ * constructor argument instead of by the script URL.
388
+ */
389
+ declare const KLASHA_SCRIPT_URL = "https://js.klasha.com/pay.js";
390
+ /**
391
+ * Merchant API key used when a component/directive does not supply its own.
392
+ */
393
+ declare const MERCHANT_KEY: InjectionToken<string>;
394
+ /**
395
+ * Merchant business id used when a component/directive does not supply its own.
396
+ */
397
+ declare const BUSINESS_ID: InjectionToken<string>;
398
+ /**
399
+ * Whether to use the Klasha sandbox. Defaults to `false` (live gateway).
400
+ */
401
+ declare const IS_TEST_MODE: InjectionToken<boolean>;
402
+
403
+ /** @internal Shared by `provideKlasha()` and `AngularKlashaModule.forRoot()`. */
404
+ declare function klashaProviders(config: KlashaConfig): Provider[];
405
+ /**
406
+ * Configures Klasha for a standalone application.
407
+ *
408
+ * ```ts
409
+ * bootstrapApplication(AppComponent, {
410
+ * providers: [
411
+ * provideKlasha({ merchantKey: 'xxx', businessId: '1', isTestMode: true }),
412
+ * ],
413
+ * });
414
+ * ```
415
+ *
416
+ * `isTestMode` is forwarded to `KlashaClient` as its 9th constructor argument
417
+ * and is the only thing that selects the sandbox over the live gateway.
418
+ */
419
+ declare function provideKlasha(config: KlashaConfig): EnvironmentProviders;
420
+
421
+ export { AngularKlashaBase, AngularKlashaComponent, AngularKlashaDirective, AngularKlashaModule, AngularKlashaService, BUSINESS_ID, IS_TEST_MODE, KLASHA_SCRIPT_URL, MERCHANT_KEY, klashaProviders, nextKlashaContainerId, provideKlasha };
422
+ export type { KlashaClientConstructor, KlashaConfig, KlashaKitOptions, KlashaOptions, PrivateKlashaOptions, ResolvedKlashaOptions };
package/package.json CHANGED
@@ -1,49 +1,51 @@
1
1
  {
2
2
  "name": "angular-klasha",
3
- "version": "0.0.1",
4
- "peerDependencies": {
5
- "@angular/common": "~12.0.1",
6
- "@angular/core": "~12.0.1",
7
- "ng-packagr": "^12.1.0"
8
- },
3
+ "version": "1.0.0",
4
+ "description": "Angular wrapper for accepting Klasha payments (component, directive and service). Supports standalone APIs and NgModule.",
9
5
  "keywords": [
10
6
  "angular",
11
7
  "klasha",
12
8
  "payment",
9
+ "payments",
13
10
  "transactions",
14
11
  "card",
15
12
  "ussd",
16
13
  "bank",
17
14
  "qr_pay",
18
- "mobilemoney"
15
+ "mobilemoney",
16
+ "africa"
19
17
  ],
18
+ "peerDependencies": {
19
+ "@angular/common": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0",
20
+ "@angular/core": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0"
21
+ },
22
+ "dependencies": {
23
+ "tslib": "^2.3.0"
24
+ },
25
+ "sideEffects": false,
20
26
  "author": {
21
- "email": "danstevea@gmail.com",
22
27
  "name": "Dansteve Adekanbi",
23
- "url": "https://github.com/dansteve",
24
- "website": "https://meetdansteve.com/"
28
+ "email": "danstevea@gmail.com",
29
+ "url": "https://dansteve.com"
25
30
  },
26
31
  "repository": {
27
32
  "type": "git",
28
- "url": "git+https://github.com/dansteve/angular-klasha.git"
33
+ "url": "git+https://github.com/Dansteve/angular-klasha.git"
29
34
  },
30
35
  "license": "MIT",
31
36
  "bugs": {
32
- "url": "https://github.com/dansteve/angular-klasha/issues"
37
+ "url": "https://github.com/Dansteve/angular-klasha/issues"
33
38
  },
34
- "homepage": "https://github.com/dansteve/angular-klasha#readme",
35
- "description": "Angular wrapper for integrating klasha transactions",
36
- "main": "bundles/angular-klasha.umd.js",
37
- "module": "fesm2015/angular-klasha.js",
38
- "es2015": "fesm2015/angular-klasha.js",
39
- "esm5": "esm5/angular-klasha.js",
40
- "esm2015": "esm2015/angular-klasha.js",
41
- "fesm5": "fesm5/angular-klasha.js",
42
- "fesm2015": "fesm2015/angular-klasha.js",
43
- "typings": "angular-klasha.d.ts",
44
- "metadata": "angular-klasha.metadata.json",
45
- "sideEffects": false,
46
- "dependencies": {
47
- "tslib": "^2.3.0"
39
+ "homepage": "https://github.com/Dansteve/angular-klasha#readme",
40
+ "module": "fesm2022/angular-klasha.mjs",
41
+ "typings": "index.d.ts",
42
+ "exports": {
43
+ "./package.json": {
44
+ "default": "./package.json"
45
+ },
46
+ ".": {
47
+ "types": "./index.d.ts",
48
+ "default": "./fesm2022/angular-klasha.mjs"
49
+ }
48
50
  }
49
51
  }
@@ -1,6 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './public_api';
5
- export { AngularKlashaService as ɵa } from './lib/angular-klasha.service';
6
- export { BUSINESS_ID as ɵc, IS_TEST_MODE as ɵd, MERCHANT_KEY as ɵb } from './lib/klasha-keys';
@@ -1 +0,0 @@
1
- {"__symbolic":"module","version":4,"metadata":{"AngularKlashaComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":12,"character":1},"arguments":[{"selector":"angular-klasha","template":"<button [ngClass]=\"class\" [ngStyle]=\"style\" (click)=\"pay()\"><ng-content></ng-content></button>"}]}],"members":{"merchantKey":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}}]}],"isTestMode":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":3}}]}],"businessId":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":3}}]}],"amount":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":22,"character":3}}]}],"metadata":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":23,"character":3}}]}],"tx_ref":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":3}}]}],"currency":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":25,"character":3}}]}],"fullname":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":26,"character":3}}]}],"email":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}}]}],"phone_number":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":28,"character":3}}]}],"paymentDescription":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":29,"character":3}}]}],"redirectUrl":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":3}}]}],"klashaOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":31,"character":3}}]}],"class":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":32,"character":3}}]}],"style":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":33,"character":3}}]}],"paymentInit":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":34,"character":3}}]}],"callBack":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":35,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵa"}]}],"pay":[{"__symbolic":"method"}],"validateInput":[{"__symbolic":"method"}],"generateOptions":[{"__symbolic":"method"}]}},"AngularKlashaDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":12,"character":1},"arguments":[{"selector":"[angular-klasha]"}]}],"members":{"merchantKey":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":3}}]}],"isTestMode":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":3}}]}],"businessId":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}}]}],"amount":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":3}}]}],"metadata":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":3}}]}],"tx_ref":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":22,"character":3}}]}],"currency":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":23,"character":3}}]}],"fullname":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":3}}]}],"email":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":25,"character":3}}]}],"phone_number":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":26,"character":3}}]}],"paymentDescription":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}}]}],"redirectUrl":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":28,"character":3}}]}],"klashaOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":29,"character":3}}]}],"class":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":3}}]}],"style":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":31,"character":3}}]}],"paymentInit":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":32,"character":3}}]}],"callBack":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":33,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵa"}]}],"pay":[{"__symbolic":"method"}],"validateInput":[{"__symbolic":"method"}],"generateOptions":[{"__symbolic":"method"}],"buttonClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":88,"character":3},"arguments":["click"]}]}]}},"AngularKlashaModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":7,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":8,"character":12}],"exports":[{"__symbolic":"reference","name":"AngularKlashaComponent"},{"__symbolic":"reference","name":"AngularKlashaDirective"}],"declarations":[{"__symbolic":"reference","name":"AngularKlashaComponent"},{"__symbolic":"reference","name":"AngularKlashaDirective"}],"providers":[]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["merchantKey","businessId","isTestMode"],"defaults":[null,null,false],"value":{"ngModule":{"__symbolic":"reference","name":"AngularKlashaModule"},"providers":[{"__symbolic":"reference","name":"ɵa"},{"provide":{"__symbolic":"reference","name":"ɵb"},"useValue":{"__symbolic":"reference","name":"merchantKey"}},{"provide":{"__symbolic":"reference","name":"ɵd"},"useValue":{"__symbolic":"reference","name":"isTestMode"}},{"provide":{"__symbolic":"reference","name":"ɵc"},"useValue":{"__symbolic":"reference","name":"businessId"}}]}}}},"KlashaOptions":{"__symbolic":"interface"},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":12,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":17,"character":15},"arguments":[{"__symbolic":"reference","name":"ɵb"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":18,"character":5},"arguments":[{"__symbolic":"reference","name":"ɵc"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":19,"character":5},"arguments":[{"__symbolic":"reference","name":"ɵd"}]}]],"parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"boolean"}]}],"loadScript":[{"__symbolic":"method"}],"checkInput":[{"__symbolic":"method"}],"getKlashaOptions":[{"__symbolic":"method"}],"clean":[{"__symbolic":"method"}],"makeId":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"ɵb":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":32},"arguments":["klasha.merchantKey"]},"ɵc":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":31},"arguments":["klasha.businessId"]},"ɵd":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":4,"character":32},"arguments":["klasha.isTestMode"]}},"origins":{"AngularKlashaComponent":"./lib/angular-klasha.component","AngularKlashaDirective":"./lib/angular-klasha.directive","AngularKlashaModule":"./lib/angular-klasha.module","KlashaOptions":"./model/klasha-options","ɵa":"./lib/angular-klasha.service","ɵb":"./lib/klasha-keys","ɵc":"./lib/klasha-keys","ɵd":"./lib/klasha-keys"},"importAs":"angular-klasha"}