@bloonio/lokotro-pay 1.0.0 → 1.1.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 CHANGED
@@ -1,11 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnInit, OnDestroy, EventEmitter, ModuleWithProviders, InjectionToken } from '@angular/core';
3
- import * as i1 from '@angular/common';
4
- import * as i2 from '@angular/common/http';
5
- import { HttpClient } from '@angular/common/http';
6
- import * as i3 from '@angular/forms';
7
- import { FormGroup, FormBuilder, ControlValueAccessor, Validator, AbstractControl, ValidationErrors } from '@angular/forms';
2
+ import { OnInit, OnDestroy, EventEmitter, InjectionToken, ModuleWithProviders } from '@angular/core';
3
+ import * as i1 from '@angular/forms';
4
+ import { FormGroup, FormBuilder } from '@angular/forms';
8
5
  import { Observable } from 'rxjs';
6
+ import { HttpClient } from '@angular/common/http';
9
7
 
10
8
  /**
11
9
  * Lokotro Pay - Enums
@@ -119,12 +117,8 @@ declare const LokotroPayApiResponseCodeInfo: {
119
117
  declare enum LokotroPayLanguage {
120
118
  English = "en",
121
119
  French = "fr",
122
- German = "de",
123
120
  Spanish = "es",
124
- Italian = "it",
125
121
  Russian = "ru",
126
- Hindi = "hi",
127
- Japanese = "ja",
128
122
  Chinese = "zh",
129
123
  Lingala = "ln"
130
124
  }
@@ -173,93 +167,6 @@ interface LokotroCountry {
173
167
  countryCodes: LokotroCountryCode[];
174
168
  phoneNumberPrefixes: LokotroPhonePrefix[];
175
169
  }
176
- /**
177
- * Country helper utilities
178
- */
179
- declare class LokotroCountryUtils {
180
- /**
181
- * Get the primary country code (first in the list)
182
- */
183
- static getPrimaryCountryCode(country: LokotroCountry): string;
184
- /**
185
- * Get the country flag emoji
186
- */
187
- static getFlag(country: LokotroCountry): string;
188
- /**
189
- * Get all valid phone prefixes as strings
190
- */
191
- static getValidPrefixes(country: LokotroCountry): string[];
192
- /**
193
- * Get min phone chars
194
- */
195
- static getMinPhoneChars(country: LokotroCountry): number;
196
- /**
197
- * Get max phone chars
198
- */
199
- static getMaxPhoneChars(country: LokotroCountry): number;
200
- /**
201
- * Check if a phone number has a valid prefix for this country
202
- */
203
- static hasValidPrefix(country: LokotroCountry, phoneNumber: string): boolean;
204
- /**
205
- * Check if phone number length is valid
206
- */
207
- static isValidPhoneLength(country: LokotroCountry, phoneNumber: string): boolean;
208
- /**
209
- * Validate phone number completely
210
- */
211
- static validatePhoneNumber(country: LokotroCountry, phoneNumber: string): {
212
- isValid: boolean;
213
- errorType?: 'empty' | 'invalidPrefix' | 'tooShort' | 'tooLong';
214
- };
215
- /**
216
- * Parse country from API response
217
- */
218
- static fromJson(json: Record<string, unknown>): LokotroCountry;
219
- }
220
-
221
- /**
222
- * Bank entity (city) model
223
- */
224
- interface LokotroBankEntity {
225
- id: string;
226
- name: string;
227
- countryFlag?: string;
228
- }
229
- /**
230
- * Bank currency model
231
- */
232
- interface LokotroBankCurrency {
233
- id: string;
234
- name: string;
235
- code: string;
236
- symbol?: string;
237
- }
238
- /**
239
- * Bank account model
240
- */
241
- interface LokotroBankAccount {
242
- id: string;
243
- identifier: string;
244
- accountNumber: string;
245
- accountLabel: string;
246
- createdAt?: string;
247
- refBank?: LokotroBank;
248
- refCurrency?: LokotroBankCurrency;
249
- }
250
- /**
251
- * Bank model
252
- */
253
- interface LokotroBank {
254
- id: string;
255
- name: string;
256
- abreviation: string;
257
- bankLogoUrl: string;
258
- hasRibNomenclatureConstraint: boolean;
259
- ribAccountNumberFormatStr: string;
260
- bankAccounts: LokotroBankAccount[];
261
- entityAvailables: LokotroBankEntity[];
262
- }
263
170
 
264
171
  /**
265
172
  * Lokotro Pay - Core Models and Interfaces
@@ -372,6 +279,7 @@ interface LokotroPaymentInfo {
372
279
  showUserInfoForm: boolean;
373
280
  showPaymentMethodForm: boolean;
374
281
  fillingInfo?: string;
282
+ channelInfo?: string;
375
283
  }
376
284
  /**
377
285
  * Payment method model
@@ -473,8 +381,14 @@ interface LokotroTransactionDetails {
473
381
  * Payment submit request
474
382
  */
475
383
  interface LokotroPaymentSubmitRequest {
476
- transactionId: string;
477
- paymentMethod: string;
384
+ transactionId?: string;
385
+ paymentId?: string;
386
+ paymentMethod?: string;
387
+ paymentMethodId?: string;
388
+ firstName?: string;
389
+ lastName?: string;
390
+ email?: string;
391
+ phoneNumber?: string;
478
392
  walletNumber?: string;
479
393
  walletPin?: string;
480
394
  mobileMoneyPhoneNumber?: string;
@@ -485,6 +399,15 @@ interface LokotroPaymentSubmitRequest {
485
399
  cardCvv?: string;
486
400
  cardHolderName?: string;
487
401
  bankTransferAccountId?: string;
402
+ bankAccountId?: string;
403
+ bankAccountNumber?: string;
404
+ bankAccountLabel?: string;
405
+ bankId?: string;
406
+ bankEntityId?: string;
407
+ mastercardPaymentMethod?: 'HOSTED_SESSION' | 'DIRECT_CAPTURE';
408
+ sessionId?: string;
409
+ cardData?: Record<string, unknown>;
410
+ savePaymentMethod?: boolean;
488
411
  }
489
412
  /**
490
413
  * Payment submit response
@@ -502,8 +425,10 @@ interface LokotroPaymentSubmitResponse {
502
425
  * OTP verification request
503
426
  */
504
427
  interface LokotroOtpVerifyRequest {
505
- transactionId: string;
506
- otp: string;
428
+ transactionId?: string;
429
+ paymentId?: string;
430
+ otp?: string;
431
+ otpCode?: string;
507
432
  }
508
433
  /**
509
434
  * OTP verification response
@@ -518,7 +443,8 @@ interface LokotroOtpVerifyResponse {
518
443
  * OTP resend request
519
444
  */
520
445
  interface LokotroOtpResendRequest {
521
- transactionId: string;
446
+ transactionId?: string;
447
+ paymentId?: string;
522
448
  }
523
449
  /**
524
450
  * Theme configuration
@@ -564,6 +490,8 @@ interface LokotroHttpClientConfig {
564
490
  */
565
491
  declare class LokotroHttpClientService {
566
492
  private http;
493
+ private static instanceCounter;
494
+ private instanceId;
567
495
  private appKey?;
568
496
  private acceptLanguage;
569
497
  private customHeaders;
@@ -628,6 +556,7 @@ declare class LokotroHttpClientService {
628
556
  static ɵprov: i0.ɵɵInjectableDeclaration<LokotroHttpClientService>;
629
557
  }
630
558
 
559
+ type JsonRecord = Record<string, unknown>;
631
560
  /**
632
561
  * Payment state for reactive updates
633
562
  */
@@ -644,6 +573,11 @@ declare class LokotroPaymentService {
644
573
  private httpClient;
645
574
  private stateSubject;
646
575
  state$: Observable<LokotroPaymentState>;
576
+ private currentPaymentBody?;
577
+ private mobileMoneyPollingTimer?;
578
+ private mobileMoneyPollingAttempts;
579
+ private static readonly MOBILE_MONEY_POLL_INTERVAL;
580
+ private static readonly MOBILE_MONEY_MAX_ATTEMPTS;
647
581
  constructor(httpClient: LokotroHttpClientService);
648
582
  /**
649
583
  * Get current state
@@ -690,11 +624,6 @@ declare class LokotroPaymentService {
690
624
  * POST /payments/resend-otp
691
625
  */
692
626
  resendOtp(request: LokotroOtpResendRequest): Observable<LokotroHttpResponse<OtpResendResponse>>;
693
- /**
694
- * Fetch available banks configuration
695
- * GET /payments/get-config-bank
696
- */
697
- fetchAvailableBanks(): Observable<LokotroHttpResponse<LokotroBank[]>>;
698
627
  /**
699
628
  * Select payment method
700
629
  */
@@ -703,6 +632,14 @@ declare class LokotroPaymentService {
703
632
  * Navigate to screen
704
633
  */
705
634
  navigateToScreen(screen: LokotroPayScreenNavigation): void;
635
+ /**
636
+ * Start polling for mobile money payment status
637
+ */
638
+ private startMobileMoneyPolling;
639
+ /**
640
+ * Stop mobile money status polling
641
+ */
642
+ private stopMobileMoneyPolling;
706
643
  /**
707
644
  * Handle payment success
708
645
  */
@@ -711,6 +648,14 @@ declare class LokotroPaymentService {
711
648
  * Handle payment failure
712
649
  */
713
650
  private handlePaymentFailure;
651
+ /**
652
+ * Resolve the collect response into the same flow the Flutter SDK uses.
653
+ */
654
+ private resolveCollectResponse;
655
+ /**
656
+ * Resolve transaction details into the correct screen or auto-submit flow.
657
+ */
658
+ private resolveTransactionResponse;
714
659
  /**
715
660
  * Get form screen for payment channel
716
661
  */
@@ -724,79 +669,100 @@ declare class LokotroPaymentService {
724
669
  */
725
670
  private convertSubmitRequestToData;
726
671
  /**
727
- * Parse payment info from API response
672
+ * Parse payment info from collect response.
728
673
  */
729
674
  private parsePaymentInfo;
730
675
  /**
731
- * Parse payment method from API response
676
+ * Parse payment info from transaction details response.
732
677
  */
733
- private parsePaymentMethod;
678
+ private parseTransactionPaymentInfo;
734
679
  /**
735
- * Parse submit response from API
680
+ * Parse payment method from API response.
736
681
  */
737
- private parseSubmitResponse;
682
+ private parsePaymentMethod;
738
683
  /**
739
- * Parse bank from API response
684
+ * Parse submit response from API.
740
685
  */
741
- private parseBank;
686
+ private parseSubmitResponse;
742
687
  /**
743
- * Parse bank account
688
+ * Build an auto-submit request using the original payment body.
744
689
  */
745
- private parseBankAccount;
690
+ private buildAutoSubmitRequest;
746
691
  /**
747
- * Parse bank entity
692
+ * Resolve the selected payment method from transaction details.
748
693
  */
749
- private parseBankEntity;
694
+ private resolveSelectedPaymentMethod;
750
695
  /**
751
- * Parse bank currency
696
+ * Normalize payloads that sometimes return data nested inside data.
752
697
  */
753
- private parseBankCurrency;
698
+ private unwrapPayload;
699
+ private resolvePaymentId;
700
+ private parseChannel;
701
+ private normalizeMethodKey;
702
+ private getNumber;
703
+ private getString;
704
+ private getBoolean;
705
+ private asRecord;
706
+ private getRecordArray;
754
707
  static ɵfac: i0.ɵɵFactoryDeclaration<LokotroPaymentService, never>;
755
708
  static ɵprov: i0.ɵɵInjectableDeclaration<LokotroPaymentService>;
756
709
  }
757
710
  interface CreatePaymentResponse {
758
711
  transaction_id?: string;
759
- amount?: string;
712
+ payment_id?: string;
713
+ amount?: number | string;
760
714
  currency?: string;
761
715
  description?: string;
762
716
  merchant_name?: string;
763
717
  merchant_id?: string;
764
- available_payment_methods?: Record<string, unknown>[];
718
+ available_payment_methods?: JsonRecord[];
765
719
  created_at?: string;
766
720
  expires_at?: string;
767
- metadata?: Record<string, unknown>;
721
+ metadata?: JsonRecord;
768
722
  payment_url?: string;
769
- show_user_info_form?: boolean;
770
- show_payment_method_form?: boolean;
771
- filling_info?: string;
723
+ status?: string;
724
+ additional_data?: JsonRecord;
772
725
  }
773
726
  interface TransactionDetailsResponse {
774
- identifier?: string;
727
+ payment_id?: string;
775
728
  transaction_id?: string;
729
+ transactional_amount?: number | string;
776
730
  amount?: number | string;
731
+ transactional_currency?: string;
777
732
  currency_str?: string;
778
- currency?: string;
779
733
  status?: string;
780
- payment_method?: string;
734
+ channel?: string;
735
+ payment_method_id?: string;
736
+ payment_method_str?: string;
737
+ filling_info?: string;
738
+ channel_info?: string;
739
+ payment_methods?: JsonRecord[];
781
740
  customer_reference?: string;
782
- system_reference?: string;
783
741
  created_at?: string;
784
742
  updated_at?: string;
785
- metadata?: Record<string, unknown>;
743
+ metadata?: JsonRecord;
744
+ success_redirect_url?: string;
745
+ fail_redirect_url?: string;
746
+ mastercardUrl?: string;
747
+ redirect_url?: string;
786
748
  }
787
749
  interface PaymentSubmitResponse {
788
750
  success?: boolean;
789
751
  message?: string;
752
+ payment_id?: string;
790
753
  transaction_id?: string;
791
754
  status?: string;
792
755
  requires_otp?: boolean;
793
756
  otp_destination?: string;
757
+ otp_sent_to?: string;
794
758
  redirect_url?: string;
759
+ mastercardUrl?: string;
795
760
  [key: string]: unknown;
796
761
  }
797
762
  interface OtpVerifyResponse {
798
763
  success?: boolean;
799
764
  message?: string;
765
+ payment_id?: string;
800
766
  transaction_id?: string;
801
767
  status?: string;
802
768
  [key: string]: unknown;
@@ -804,7 +770,9 @@ interface OtpVerifyResponse {
804
770
  interface OtpResendResponse {
805
771
  success?: boolean;
806
772
  message?: string;
773
+ payment_id?: string;
807
774
  otp_destination?: string;
775
+ otp_sent_to?: string;
808
776
  }
809
777
 
810
778
  /**
@@ -898,6 +866,8 @@ interface LokotroTranslations {
898
866
  accountLabel: string;
899
867
  bankTransferProofInstructions: string;
900
868
  confirmBankTransfer: string;
869
+ redirectingIn: string;
870
+ tapToCancel: string;
901
871
  }
902
872
  declare class LokotroLocalizationService {
903
873
  private currentLanguageSubject;
@@ -927,9 +897,11 @@ declare class LokotroLocalizationService {
927
897
  */
928
898
  setLanguageByCode(code: string): void;
929
899
  /**
930
- * Get translation by key
900
+ * Get translation by key with optional interpolation
901
+ * @param key - Translation key
902
+ * @param params - Optional parameters for interpolation (e.g., { seconds: 3 })
931
903
  */
932
- translate(key: keyof LokotroTranslations): string;
904
+ translate(key: keyof LokotroTranslations, params?: Record<string, string | number>): string;
933
905
  /**
934
906
  * Get all supported languages
935
907
  */
@@ -973,8 +945,12 @@ declare class LokotroPayCheckoutComponent implements OnInit, OnDestroy {
973
945
  closed: EventEmitter<void>;
974
946
  state?: LokotroPaymentState;
975
947
  isDarkTheme: boolean;
948
+ private static readonly MAX_RETRY_ATTEMPTS;
949
+ private retryAttempts;
976
950
  private stateSubscription?;
977
951
  constructor(paymentService: LokotroPaymentService, localization: LokotroLocalizationService);
952
+ /** Check if user has retries left */
953
+ get hasRetriesLeft(): boolean;
978
954
  ngOnInit(): void;
979
955
  ngOnDestroy(): void;
980
956
  private initializeEnvironment;
@@ -998,6 +974,10 @@ declare class LokotroPayCheckoutComponent implements OnInit, OnDestroy {
998
974
  onRetry(): void;
999
975
  onDone(): void;
1000
976
  onContinue(): void;
977
+ /** Handle auto-redirect from success screen */
978
+ onSuccessAutoRedirect(): void;
979
+ /** Handle auto-redirect from error screen (after retries exhausted) */
980
+ onErrorAutoRedirect(): void;
1001
981
  static ɵfac: i0.ɵɵFactoryDeclaration<LokotroPayCheckoutComponent, never>;
1002
982
  static ɵcmp: i0.ɵɵComponentDeclaration<LokotroPayCheckoutComponent, "lokotro-pay-checkout", never, { "title": { "alias": "title"; "required": false; }; "titleStyle": { "alias": "titleStyle"; "required": false; }; "titleBackgroundColor": { "alias": "titleBackgroundColor"; "required": false; }; "configs": { "alias": "configs"; "required": false; }; "paymentBody": { "alias": "paymentBody"; "required": false; }; "enableHapticFeedback": { "alias": "enableHapticFeedback"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "padding": { "alias": "padding"; "required": false; }; "themeConfig": { "alias": "themeConfig"; "required": false; }; "language": { "alias": "language"; "required": false; }; }, { "response": "response"; "error": "error"; "closed": "closed"; }, never, never, true, never>;
1003
983
  }
@@ -1111,7 +1091,7 @@ declare class LokotroProcessingComponent {
1111
1091
  */
1112
1092
 
1113
1093
  type ResultType = 'success' | 'error' | 'warning' | 'info';
1114
- declare class LokotroResultComponent {
1094
+ declare class LokotroResultComponent implements OnInit, OnDestroy {
1115
1095
  localization: LokotroLocalizationService;
1116
1096
  type: ResultType;
1117
1097
  title: string;
@@ -1121,14 +1101,28 @@ declare class LokotroResultComponent {
1121
1101
  transactionId?: string;
1122
1102
  primaryActionLabel?: string;
1123
1103
  secondaryActionLabel?: string;
1104
+ /** Auto-redirect duration in seconds. If > 0, will auto-call onAutoRedirect after countdown. */
1105
+ autoRedirectSeconds: number;
1124
1106
  primaryAction: EventEmitter<void>;
1125
1107
  secondaryAction: EventEmitter<void>;
1108
+ /** Emitted when auto-redirect triggers after countdown completes. */
1109
+ autoRedirect: EventEmitter<void>;
1110
+ countdownSeconds: number;
1111
+ isCountdownCancelled: boolean;
1112
+ private countdownInterval?;
1126
1113
  constructor(localization: LokotroLocalizationService);
1114
+ ngOnInit(): void;
1115
+ ngOnDestroy(): void;
1116
+ private startAutoRedirectCountdown;
1117
+ cancelCountdown(): void;
1118
+ private clearCountdown;
1119
+ private triggerAutoRedirect;
1120
+ getCountdownProgress(): number;
1127
1121
  formatAmount(amount: number, currency?: string): string;
1128
1122
  onPrimaryClick(): void;
1129
1123
  onSecondaryClick(): void;
1130
1124
  static ɵfac: i0.ɵɵFactoryDeclaration<LokotroResultComponent, never>;
1131
- static ɵcmp: i0.ɵɵComponentDeclaration<LokotroResultComponent, "lokotro-result", never, { "type": { "alias": "type"; "required": false; }; "title": { "alias": "title"; "required": false; }; "message": { "alias": "message"; "required": false; }; "amount": { "alias": "amount"; "required": false; }; "currency": { "alias": "currency"; "required": false; }; "transactionId": { "alias": "transactionId"; "required": false; }; "primaryActionLabel": { "alias": "primaryActionLabel"; "required": false; }; "secondaryActionLabel": { "alias": "secondaryActionLabel"; "required": false; }; }, { "primaryAction": "primaryAction"; "secondaryAction": "secondaryAction"; }, never, never, true, never>;
1125
+ static ɵcmp: i0.ɵɵComponentDeclaration<LokotroResultComponent, "lokotro-result", never, { "type": { "alias": "type"; "required": false; }; "title": { "alias": "title"; "required": false; }; "message": { "alias": "message"; "required": false; }; "amount": { "alias": "amount"; "required": false; }; "currency": { "alias": "currency"; "required": false; }; "transactionId": { "alias": "transactionId"; "required": false; }; "primaryActionLabel": { "alias": "primaryActionLabel"; "required": false; }; "secondaryActionLabel": { "alias": "secondaryActionLabel"; "required": false; }; "autoRedirectSeconds": { "alias": "autoRedirectSeconds"; "required": false; }; }, { "primaryAction": "primaryAction"; "secondaryAction": "secondaryAction"; "autoRedirect": "autoRedirect"; }, never, never, true, never>;
1132
1126
  }
1133
1127
 
1134
1128
  declare class LokotroLoadingComponent {
@@ -1137,139 +1131,6 @@ declare class LokotroLoadingComponent {
1137
1131
  static ɵcmp: i0.ɵɵComponentDeclaration<LokotroLoadingComponent, "lokotro-loading", never, { "message": { "alias": "message"; "required": false; }; }, {}, never, never, true, never>;
1138
1132
  }
1139
1133
 
1140
- /**
1141
- * Service for fetching and caching country data
1142
- */
1143
- declare class LokotroCountryService {
1144
- private httpClient;
1145
- private countriesCache?;
1146
- private countriesSubject;
1147
- private loadingRequest?;
1148
- /** Cache validity duration: 30 minutes */
1149
- private readonly cacheValidityMs;
1150
- /** Observable of countries list */
1151
- countries$: Observable<LokotroCountry[]>;
1152
- constructor(httpClient: LokotroHttpClientService);
1153
- /**
1154
- * Fetch countries from API with caching
1155
- */
1156
- fetchCountries(forceRefresh?: boolean): Observable<LokotroCountry[]>;
1157
- /**
1158
- * Check if cache is still valid
1159
- */
1160
- private isCacheValid;
1161
- /**
1162
- * Get cached countries synchronously
1163
- */
1164
- getCachedCountries(): LokotroCountry[];
1165
- /**
1166
- * Get country by country code (e.g., "243")
1167
- */
1168
- getCountryByCode(countryCode: string): LokotroCountry | undefined;
1169
- /**
1170
- * Get country by ID
1171
- */
1172
- getCountryById(id: string): LokotroCountry | undefined;
1173
- /**
1174
- * Get default country (DRC or first available)
1175
- */
1176
- getDefaultCountry(): LokotroCountry | undefined;
1177
- /**
1178
- * Clear the cache
1179
- */
1180
- clearCache(): void;
1181
- static ɵfac: i0.ɵɵFactoryDeclaration<LokotroCountryService, never>;
1182
- static ɵprov: i0.ɵɵInjectableDeclaration<LokotroCountryService>;
1183
- }
1184
-
1185
- /**
1186
- * Lokotro Pay - Mobile Money Phone Input Component
1187
- * Phone input with country code selector and prefix validation
1188
- */
1189
-
1190
- declare class LokotroMobileMoneyPhoneInputComponent implements OnInit, OnDestroy, ControlValueAccessor, Validator {
1191
- private countryService;
1192
- localization: LokotroLocalizationService;
1193
- label?: string;
1194
- placeholder: string;
1195
- initialCountryCode: string;
1196
- showPrefixHints: boolean;
1197
- disabled: boolean;
1198
- countryChanged: EventEmitter<LokotroCountry>;
1199
- phoneChanged: EventEmitter<{
1200
- phoneNumber: string;
1201
- fullNumber: string;
1202
- country: LokotroCountry | null;
1203
- }>;
1204
- countries: LokotroCountry[];
1205
- selectedCountry?: LokotroCountry;
1206
- phoneNumber: string;
1207
- isLoading: boolean;
1208
- showCountryPicker: boolean;
1209
- prefixError?: string;
1210
- hasError: boolean;
1211
- private subscription?;
1212
- private onChange;
1213
- onTouched: () => void;
1214
- constructor(countryService: LokotroCountryService, localization: LokotroLocalizationService);
1215
- ngOnInit(): void;
1216
- ngOnDestroy(): void;
1217
- private loadCountries;
1218
- getFlag(country: LokotroCountry): string;
1219
- getPrimaryCode(country: LokotroCountry): string;
1220
- getValidPrefixes(country: LokotroCountry): string[];
1221
- getVisiblePrefixes(country: LokotroCountry): string[];
1222
- getMaxChars(country: LokotroCountry): number;
1223
- toggleCountryPicker(): void;
1224
- closeCountryPicker(): void;
1225
- selectCountry(country: LokotroCountry, emitChange?: boolean): void;
1226
- onPhoneInput(event: Event): void;
1227
- private validatePhoneNumber;
1228
- private emitPhoneChange;
1229
- getFullPhoneNumber(): string;
1230
- writeValue(value: string): void;
1231
- registerOnChange(fn: (value: string) => void): void;
1232
- registerOnTouched(fn: () => void): void;
1233
- setDisabledState(isDisabled: boolean): void;
1234
- validate(control: AbstractControl): ValidationErrors | null;
1235
- static ɵfac: i0.ɵɵFactoryDeclaration<LokotroMobileMoneyPhoneInputComponent, never>;
1236
- static ɵcmp: i0.ɵɵComponentDeclaration<LokotroMobileMoneyPhoneInputComponent, "lokotro-mobile-money-phone-input", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "initialCountryCode": { "alias": "initialCountryCode"; "required": false; }; "showPrefixHints": { "alias": "showPrefixHints"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "countryChanged": "countryChanged"; "phoneChanged": "phoneChanged"; }, never, never, true, never>;
1237
- }
1238
-
1239
- /**
1240
- * Lokotro Pay - Bank Transfer Form Component
1241
- */
1242
-
1243
- declare class LokotroBankTransferFormComponent implements OnInit {
1244
- private fb;
1245
- localization: LokotroLocalizationService;
1246
- private paymentService;
1247
- showUserInfoForm: boolean;
1248
- formSubmitted: EventEmitter<Record<string, unknown>>;
1249
- cancel: EventEmitter<void>;
1250
- bankTransferForm: FormGroup;
1251
- isLoading: boolean;
1252
- allBanks: LokotroBank[];
1253
- cities: LokotroBankEntity[];
1254
- filteredBanks: LokotroBank[];
1255
- accounts: LokotroBankAccount[];
1256
- selectedCity: LokotroBankEntity | null;
1257
- selectedBank: LokotroBank | null;
1258
- selectedAccount: LokotroBankAccount | null;
1259
- constructor(fb: FormBuilder, localization: LokotroLocalizationService, paymentService: LokotroPaymentService);
1260
- ngOnInit(): void;
1261
- private initForm;
1262
- private fetchBanks;
1263
- private extractCities;
1264
- onCityChange(): void;
1265
- onBankChange(): void;
1266
- onAccountChange(): void;
1267
- onSubmit(): void;
1268
- onCancel(): void;
1269
- static ɵfac: i0.ɵɵFactoryDeclaration<LokotroBankTransferFormComponent, never>;
1270
- static ɵcmp: i0.ɵɵComponentDeclaration<LokotroBankTransferFormComponent, "lokotro-bank-transfer-form", never, { "showUserInfoForm": { "alias": "showUserInfoForm"; "required": false; }; }, { "formSubmitted": "formSubmitted"; "cancel": "cancel"; }, never, never, true, never>;
1271
- }
1272
-
1273
1134
  /**
1274
1135
  * Environment configuration interface
1275
1136
  */
@@ -1324,7 +1185,7 @@ declare class LokotroPayModule {
1324
1185
  defaultConfig: Partial<LokotroPayConfig>;
1325
1186
  }>): ModuleWithProviders<LokotroPayModule>;
1326
1187
  static ɵfac: i0.ɵɵFactoryDeclaration<LokotroPayModule, never>;
1327
- static ɵmod: i0.ɵɵNgModuleDeclaration<LokotroPayModule, never, [typeof i1.CommonModule, typeof i2.HttpClientModule, typeof i3.ReactiveFormsModule, typeof i3.FormsModule, typeof LokotroPayCheckoutComponent, typeof LokotroPaymentMethodSelectionComponent, typeof LokotroPaymentFormComponent, typeof LokotroOtpVerificationComponent, typeof LokotroProcessingComponent, typeof LokotroResultComponent, typeof LokotroLoadingComponent, typeof LokotroMobileMoneyPhoneInputComponent, typeof LokotroBankTransferFormComponent], [typeof LokotroPayCheckoutComponent, typeof LokotroPaymentMethodSelectionComponent, typeof LokotroPaymentFormComponent, typeof LokotroOtpVerificationComponent, typeof LokotroProcessingComponent, typeof LokotroResultComponent, typeof LokotroLoadingComponent, typeof LokotroMobileMoneyPhoneInputComponent, typeof LokotroBankTransferFormComponent]>;
1188
+ static ɵmod: i0.ɵɵNgModuleDeclaration<LokotroPayModule, never, [typeof i1.ReactiveFormsModule, typeof i1.FormsModule, typeof LokotroPayCheckoutComponent, typeof LokotroPaymentMethodSelectionComponent, typeof LokotroPaymentFormComponent, typeof LokotroOtpVerificationComponent, typeof LokotroProcessingComponent, typeof LokotroResultComponent, typeof LokotroLoadingComponent], [typeof LokotroPayCheckoutComponent, typeof LokotroPaymentMethodSelectionComponent, typeof LokotroPaymentFormComponent, typeof LokotroOtpVerificationComponent, typeof LokotroProcessingComponent, typeof LokotroResultComponent, typeof LokotroLoadingComponent]>;
1328
1189
  static ɵinj: i0.ɵɵInjectorDeclaration<LokotroPayModule>;
1329
1190
  }
1330
1191
 
@@ -1453,6 +1314,7 @@ declare class LokotroPayEnv {
1453
1314
  static get endpoints(): {
1454
1315
  collect: string;
1455
1316
  transaction: string;
1317
+ mobileMoneyStatus: string;
1456
1318
  submit: string;
1457
1319
  verifyOtp: string;
1458
1320
  resendOtp: string;
@@ -1526,14 +1388,11 @@ interface LokotroPaymentStatusResponse {
1526
1388
  completedAt?: string;
1527
1389
  createdAt?: string;
1528
1390
  metadata?: Record<string, unknown>;
1529
- successRedirectUrl?: string;
1530
- failRedirectUrl?: string;
1531
- notifyUrl?: string;
1532
1391
  }
1533
1392
  /**
1534
1393
  * Internal screen states
1535
1394
  */
1536
- type PaymentStatusScreen = 'loading' | 'pending' | 'processing' | 'otp' | 'success' | 'error' | 'cancelled' | 'expired';
1395
+ type PaymentStatusScreen = 'loading' | 'pending' | 'processing' | 'success' | 'error' | 'cancelled' | 'expired';
1537
1396
  declare class LokotroPaymentStatusComponent implements OnInit, OnDestroy {
1538
1397
  private paymentService;
1539
1398
  localization: LokotroLocalizationService;
@@ -1573,10 +1432,6 @@ declare class LokotroPaymentStatusComponent implements OnInit, OnDestroy {
1573
1432
  currentScreen: PaymentStatusScreen;
1574
1433
  paymentDetails: LokotroPaymentStatusResponse | null;
1575
1434
  errorMessage: string;
1576
- /** OTP verification state */
1577
- otpDestination: string;
1578
- rawStatus: string;
1579
- isVerifyingOtp: boolean;
1580
1435
  private destroy$;
1581
1436
  private pollingSubscription?;
1582
1437
  private pollingAttempts;
@@ -1620,21 +1475,9 @@ declare class LokotroPaymentStatusComponent implements OnInit, OnDestroy {
1620
1475
  * Handle done button click
1621
1476
  */
1622
1477
  onDone(): void;
1623
- /**
1624
- * Handle OTP verification
1625
- */
1626
- onOtpVerified(otp: string): void;
1627
- /**
1628
- * Handle OTP resend
1629
- */
1630
- onResendOtp(): void;
1631
- /**
1632
- * Handle OTP cancellation
1633
- */
1634
- onOtpCancel(): void;
1635
1478
  static ɵfac: i0.ɵɵFactoryDeclaration<LokotroPaymentStatusComponent, never>;
1636
1479
  static ɵcmp: i0.ɵɵComponentDeclaration<LokotroPaymentStatusComponent, "lokotro-payment-status", never, { "statusConfig": { "alias": "statusConfig"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; }; }, { "statusChange": "statusChange"; "paymentComplete": "paymentComplete"; "paymentFailed": "paymentFailed"; "onClose": "onClose"; "onDoneEvent": "onDoneEvent"; }, never, never, true, never>;
1637
1480
  }
1638
1481
 
1639
- export { LOKOTRO_ENV_CONFIG, LOKOTRO_PAY_CONFIG, LokotroBankTransferFormComponent, LokotroCountryService, LokotroCountryUtils, LokotroHttpClientService, LokotroLoadingComponent, LokotroLocalizationService, LokotroMobileMoneyPhoneInputComponent, LokotroOtpVerificationComponent, LokotroPayApiResponseCode, LokotroPayApiResponseCodeInfo, LokotroPayChannel, LokotroPayChannelInfo, LokotroPayCheckoutComponent, LokotroPayColors, LokotroPayEnv, LokotroPayFillingInfo, LokotroPayLanguage, LokotroPayLanguageInfo, LokotroPayModule, LokotroPayResultScreen, LokotroPayScreenNavigation, LokotroPayScreenNavigationInfo, LokotroPaymentFormComponent, LokotroPaymentMethodSelectionComponent, LokotroPaymentService, LokotroPaymentStatus, LokotroPaymentStatusComponent, LokotroProcessingComponent, LokotroResultComponent };
1640
- export type { LokotroCheckoutConfig, LokotroCountry, LokotroCountryCode, LokotroHttpResponse, LokotroMerchantInfo, LokotroOtpVerifyRequest, LokotroOtpVerifyResponse, LokotroPayConfig, LokotroPayError, LokotroPayOnError, LokotroPayOnResponse, LokotroPayResponse, LokotroPayThemeConfig, LokotroPaymentBody, LokotroPaymentFormData, LokotroPaymentInfo, LokotroPaymentMethod, LokotroPaymentMethodListItem, LokotroPaymentStatusConfig, LokotroPaymentStatusResponse, LokotroPaymentSubmitRequest, LokotroPaymentSubmitResponse, LokotroPhonePrefix, LokotroRefCountry, LokotroTransactionDetails };
1482
+ export { LOKOTRO_ENV_CONFIG, LOKOTRO_PAY_CONFIG, LokotroHttpClientService, LokotroLoadingComponent, LokotroLocalizationService, LokotroOtpVerificationComponent, LokotroPayApiResponseCode, LokotroPayApiResponseCodeInfo, LokotroPayChannel, LokotroPayChannelInfo, LokotroPayCheckoutComponent, LokotroPayColors, LokotroPayEnv, LokotroPayFillingInfo, LokotroPayLanguage, LokotroPayLanguageInfo, LokotroPayModule, LokotroPayResultScreen, LokotroPayScreenNavigation, LokotroPayScreenNavigationInfo, LokotroPaymentFormComponent, LokotroPaymentMethodSelectionComponent, LokotroPaymentService, LokotroPaymentStatus, LokotroPaymentStatusComponent, LokotroProcessingComponent, LokotroResultComponent };
1483
+ export type { LokotroCheckoutConfig, LokotroHttpResponse, LokotroMerchantInfo, LokotroOtpVerifyRequest, LokotroOtpVerifyResponse, LokotroPayConfig, LokotroPayError, LokotroPayOnError, LokotroPayOnResponse, LokotroPayResponse, LokotroPayThemeConfig, LokotroPaymentBody, LokotroPaymentFormData, LokotroPaymentInfo, LokotroPaymentMethod, LokotroPaymentMethodListItem, LokotroPaymentStatusConfig, LokotroPaymentStatusResponse, LokotroPaymentSubmitRequest, LokotroPaymentSubmitResponse, LokotroTransactionDetails };