@spot-flow/checkout-inline-js 0.1.32-dev.4 → 0.1.32-dev.5

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.
@@ -145,13 +145,17 @@ export type PlanDetailResponseData = {
145
145
  export type GetMerchantPlanDetail = {
146
146
  merchantName: string;
147
147
  merchantLogo: string;
148
- paymentMethods: Array<"card" | "bank_transfer" | "ussd" | "mobile_money">;
148
+ paymentMethods: Array<PaymentChannel>;
149
149
  rate: {
150
150
  from: string;
151
151
  to: string;
152
152
  rate: number;
153
153
  };
154
154
  plan: PlanDetailResponseData;
155
+ limits: Array<{
156
+ channel: PaymentChannel;
157
+ amount: number;
158
+ }>;
155
159
  };
156
160
  export type GetBanksRequestParams = {
157
161
  ussd: boolean;
@@ -189,3 +193,4 @@ export type PusherResponse = {
189
193
  spotflowReference: string;
190
194
  status: string;
191
195
  };
196
+ export type PaymentChannel = "card" | "bank_transfer" | "ussd" | "mobile_money" | "eft";
@@ -26,6 +26,9 @@ type Props = {
26
26
  closePayment: () => void;
27
27
  };
28
28
  export declare class MainPageScreen {
29
+ validChannels: Array<string>;
30
+ disabledChannels: Array<string>;
31
+ selectedChannel: string;
29
32
  modalContainer: HTMLDivElement;
30
33
  currentPaymentMethod: string;
31
34
  mainLayout: HTMLDivElement;
@@ -56,7 +59,8 @@ export declare class MainPageScreen {
56
59
  closePayment: () => void;
57
60
  retryingPayment: boolean;
58
61
  constructor({ container, email, phoneNumber, code, encryption, merchantKey, modalContainer, amount, planId, rdtCode, url, reference, callBackUrl, metadata, localCurrency, closePayment, }: Props);
59
- mountScreen(values: GetMerchantPlanDetail, currency: string): void;
62
+ mountScreen(values: GetMerchantPlanDetail, currency: string, validChannels: Array<string>, disabledChannels: Array<string>): void;
63
+ private setupPaymentMethodButtons;
60
64
  attachListeners(): void;
61
65
  closeBTN(notClosePayment: boolean): void;
62
66
  private updatePaymentMethodView;
@@ -0,0 +1,9 @@
1
+ export declare class TransactionErrorScreen {
2
+ container: HTMLDivElement;
3
+ currency: string;
4
+ maxAmount: string;
5
+ constructor(container: HTMLDivElement);
6
+ setLimitInfo(currency: string, amount: number | string): void;
7
+ renderContent(actionLink?: string): void;
8
+ render(): string;
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spot-flow/checkout-inline-js",
3
- "version": "0.1.32-dev.4",
3
+ "version": "0.1.32-dev.5",
4
4
  "description": "",
5
5
  "main": "dist/checkout-inline.js",
6
6
  "module": "dist/checkout-inline.es.js",