@bloonio/lokotro-pay 1.5.1 → 1.6.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bloonio/lokotro-pay",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Angular SDK for Lokotro Pay - Clean white-surface payment checkout with themeable brand colors and support for cards, mobile money, e-wallets, and more.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -51,6 +51,7 @@ declare enum LokotroPayScreenNavigation {
|
|
|
51
51
|
MobileMoneyFormScreen = "mobilemoneyFormScreen",
|
|
52
52
|
CardFormScreen = "cardFormScreen",
|
|
53
53
|
BankTransferFormScreen = "bankTransferFormScreen",
|
|
54
|
+
BankTransferOfferScreen = "bankTransferOfferScreen",
|
|
54
55
|
FlashFormScreen = "flashFormScreen",
|
|
55
56
|
PaymentConfirmationScreen = "paymentConfirmationScreen",
|
|
56
57
|
ProcessingScreen = "processingScreen",
|
|
@@ -168,6 +169,49 @@ interface LokotroCountry {
|
|
|
168
169
|
phoneNumberPrefixes: LokotroPhonePrefix[];
|
|
169
170
|
}
|
|
170
171
|
|
|
172
|
+
/**
|
|
173
|
+
* Bank entity (city) model
|
|
174
|
+
*/
|
|
175
|
+
interface LokotroBankEntity {
|
|
176
|
+
id: string;
|
|
177
|
+
name: string;
|
|
178
|
+
countryFlag?: string;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Bank currency model
|
|
182
|
+
*/
|
|
183
|
+
interface LokotroBankCurrency {
|
|
184
|
+
id: string;
|
|
185
|
+
name: string;
|
|
186
|
+
code: string;
|
|
187
|
+
symbol?: string;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Bank account model
|
|
191
|
+
*/
|
|
192
|
+
interface LokotroBankAccount {
|
|
193
|
+
id: string;
|
|
194
|
+
identifier: string;
|
|
195
|
+
accountNumber: string;
|
|
196
|
+
accountLabel: string;
|
|
197
|
+
createdAt?: string;
|
|
198
|
+
refBank?: LokotroBank;
|
|
199
|
+
refCurrency?: LokotroBankCurrency;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Bank model
|
|
203
|
+
*/
|
|
204
|
+
interface LokotroBank {
|
|
205
|
+
id: string;
|
|
206
|
+
name: string;
|
|
207
|
+
abreviation: string;
|
|
208
|
+
bankLogoUrl: string;
|
|
209
|
+
hasRibNomenclatureConstraint: boolean;
|
|
210
|
+
ribAccountNumberFormatStr: string;
|
|
211
|
+
bankAccounts: LokotroBankAccount[];
|
|
212
|
+
entityAvailables: LokotroBankEntity[];
|
|
213
|
+
}
|
|
214
|
+
|
|
171
215
|
/**
|
|
172
216
|
* Lokotro Pay - Core Models and Interfaces
|
|
173
217
|
* Angular version of the Flutter Lokotro Pay plugin
|
|
@@ -620,6 +664,7 @@ interface LokotroPaymentState {
|
|
|
620
664
|
selectedPaymentMethod?: LokotroPaymentMethod;
|
|
621
665
|
error?: LokotroPayError;
|
|
622
666
|
response?: LokotroPayResponse;
|
|
667
|
+
bankTransferOffer?: JsonRecord | null;
|
|
623
668
|
}
|
|
624
669
|
declare class LokotroPaymentService {
|
|
625
670
|
private httpClient;
|
|
@@ -725,6 +770,27 @@ declare class LokotroPaymentService {
|
|
|
725
770
|
* Get form screen for payment channel
|
|
726
771
|
*/
|
|
727
772
|
private getFormScreenForChannel;
|
|
773
|
+
/**
|
|
774
|
+
* Fetch the banks / accounts / entities available for a bank-transfer
|
|
775
|
+
* selection. Calls the gateway's /payments/get-config-bank (the same endpoint
|
|
776
|
+
* the Flutter SDK uses) and maps the snake_case payload into the typed models.
|
|
777
|
+
* Returns a LokotroHttpResponse<LokotroBank[]> so the bank form can read
|
|
778
|
+
* response.isSuccess + response.data.
|
|
779
|
+
*/
|
|
780
|
+
fetchAvailableBanks(): Observable<LokotroHttpResponse<LokotroBank[]>>;
|
|
781
|
+
/**
|
|
782
|
+
* Customer accepted the bank-transfer switch offer — re-collect with the
|
|
783
|
+
* method forced to bank_transfer (analogue of the Flutter re-init). Clears the
|
|
784
|
+
* offer first so the confirm screen doesn't flash again.
|
|
785
|
+
*/
|
|
786
|
+
confirmBankTransferSwitch(): void;
|
|
787
|
+
/** Customer declined the switch — return to payment-method selection. */
|
|
788
|
+
declineBankTransferSwitch(): void;
|
|
789
|
+
private asArray;
|
|
790
|
+
private mapBank;
|
|
791
|
+
private mapBankAccount;
|
|
792
|
+
private mapBankEntity;
|
|
793
|
+
private mapBankCurrency;
|
|
728
794
|
/**
|
|
729
795
|
* Convert payment body to API request format
|
|
730
796
|
*/
|
|
@@ -936,6 +1002,10 @@ interface LokotroTranslations {
|
|
|
936
1002
|
accountLabel: string;
|
|
937
1003
|
bankTransferProofInstructions: string;
|
|
938
1004
|
confirmBankTransfer: string;
|
|
1005
|
+
bankTransferSwitchTitle: string;
|
|
1006
|
+
bankTransferSwitchMessage: string;
|
|
1007
|
+
bankTransferSwitchConfirm: string;
|
|
1008
|
+
bankTransferSwitchDecline: string;
|
|
939
1009
|
redirectingIn: string;
|
|
940
1010
|
tapToCancel: string;
|
|
941
1011
|
}
|
|
@@ -1050,6 +1120,8 @@ declare class LokotroPayCheckoutComponent implements OnInit, OnChanges, OnDestro
|
|
|
1050
1120
|
onResendOtp(): void;
|
|
1051
1121
|
onBack(): void;
|
|
1052
1122
|
onCancel(): void;
|
|
1123
|
+
onConfirmBankTransfer(): void;
|
|
1124
|
+
onDeclineBankTransfer(): void;
|
|
1053
1125
|
onClose(): void;
|
|
1054
1126
|
onRetry(): void;
|
|
1055
1127
|
onDone(): void;
|
|
@@ -1464,6 +1536,40 @@ declare const LOKOTRO_PAY_FEATURE_FLAGS: {
|
|
|
1464
1536
|
*/
|
|
1465
1537
|
declare function visiblePaymentMethods(methods: LokotroPaymentMethod[]): LokotroPaymentMethod[];
|
|
1466
1538
|
|
|
1539
|
+
/**
|
|
1540
|
+
* Lokotro Pay - Bank Transfer Form Component
|
|
1541
|
+
*/
|
|
1542
|
+
|
|
1543
|
+
declare class LokotroBankTransferFormComponent implements OnInit {
|
|
1544
|
+
private fb;
|
|
1545
|
+
localization: LokotroLocalizationService;
|
|
1546
|
+
private paymentService;
|
|
1547
|
+
showUserInfoForm: boolean;
|
|
1548
|
+
formSubmitted: EventEmitter<Record<string, unknown>>;
|
|
1549
|
+
cancel: EventEmitter<void>;
|
|
1550
|
+
bankTransferForm: FormGroup;
|
|
1551
|
+
isLoading: boolean;
|
|
1552
|
+
allBanks: LokotroBank[];
|
|
1553
|
+
cities: LokotroBankEntity[];
|
|
1554
|
+
filteredBanks: LokotroBank[];
|
|
1555
|
+
accounts: LokotroBankAccount[];
|
|
1556
|
+
selectedCity: LokotroBankEntity | null;
|
|
1557
|
+
selectedBank: LokotroBank | null;
|
|
1558
|
+
selectedAccount: LokotroBankAccount | null;
|
|
1559
|
+
constructor(fb: FormBuilder, localization: LokotroLocalizationService, paymentService: LokotroPaymentService);
|
|
1560
|
+
ngOnInit(): void;
|
|
1561
|
+
private initForm;
|
|
1562
|
+
private fetchBanks;
|
|
1563
|
+
private extractCities;
|
|
1564
|
+
onCityChange(): void;
|
|
1565
|
+
onBankChange(): void;
|
|
1566
|
+
onAccountChange(): void;
|
|
1567
|
+
onSubmit(): void;
|
|
1568
|
+
onCancel(): void;
|
|
1569
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LokotroBankTransferFormComponent, never>;
|
|
1570
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LokotroBankTransferFormComponent, "lokotro-bank-transfer-form", never, { "showUserInfoForm": { "alias": "showUserInfoForm"; "required": false; }; }, { "formSubmitted": "formSubmitted"; "cancel": "cancel"; }, never, never, true, never>;
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1467
1573
|
/**
|
|
1468
1574
|
* Lokotro Pay - Payment Status Component
|
|
1469
1575
|
* Entry point for tracking payment status by payment ID only
|
|
@@ -1594,5 +1700,5 @@ declare class LokotroPaymentStatusComponent implements OnInit, OnDestroy {
|
|
|
1594
1700
|
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>;
|
|
1595
1701
|
}
|
|
1596
1702
|
|
|
1597
|
-
export { LOKOTRO_ENV_CONFIG, LOKOTRO_PAY_CONFIG, LOKOTRO_PAY_FEATURE_FLAGS, 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, visiblePaymentMethods };
|
|
1703
|
+
export { LOKOTRO_ENV_CONFIG, LOKOTRO_PAY_CONFIG, LOKOTRO_PAY_FEATURE_FLAGS, LokotroBankTransferFormComponent, 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, visiblePaymentMethods };
|
|
1598
1704
|
export type { LokotroCheckoutConfig, LokotroHttpResponse, LokotroMerchantInfo, LokotroOtpVerifyRequest, LokotroOtpVerifyResponse, LokotroPayConfig, LokotroPayError, LokotroPayOnError, LokotroPayOnResponse, LokotroPayResponse, LokotroPayThemeConfig, LokotroPaymentBody, LokotroPaymentFormData, LokotroPaymentInfo, LokotroPaymentMethod, LokotroPaymentMethodListItem, LokotroPaymentStatusConfig, LokotroPaymentStatusResponse, LokotroPaymentSubmitRequest, LokotroPaymentSubmitResponse, LokotroTransactionDetails };
|