@payrails/web-sdk 5.12.0-RC.1 → 5.12.0-RC.2

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": "@payrails/web-sdk",
3
- "version": "5.12.0-RC.1",
3
+ "version": "5.12.0-RC.2",
4
4
  "description": "SDK providing tokenization options on the client for merchants",
5
5
  "main": "index.js",
6
6
  "types": "payrails.d.ts",
@@ -133,8 +133,10 @@
133
133
  .payrails-payment-installments-dropdown select {
134
134
  width: 100%;
135
135
  padding: 10px 15px;
136
+ margin: 0;
136
137
  border: 1px solid #eae8ee;
137
138
  border-radius: 4px;
139
+ box-shadow: none;
138
140
  appearance: none;
139
141
  -webkit-appearance: none;
140
142
  -moz-appearance: none;
@@ -142,19 +144,20 @@
142
144
  }
143
145
 
144
146
  .payrails-payment-installments-dropdown::after {
145
- content: '\25BC';
147
+ content: '';
148
+ width: 10px;
149
+ height: 10px;
150
+ clip-path: polygon(100% 0%, 0 0%, 50% 100%);
151
+ background-color: black;
146
152
  position: absolute;
147
- top: 18px;
148
- transform: translateY(-50%);
153
+ top: calc(50% - 4px);
149
154
  pointer-events: none;
150
- color: rgba(25, 25, 25, 1);
151
155
  right: 20px;
152
156
  }
153
157
 
154
158
  .payrails-card-form-payment-installments-container {
155
159
  position: relative;
156
160
  width: 100%;
157
- margin-bottom: 8px;
158
161
  }
159
162
 
160
163
  #payrails-card-list * {
@@ -306,6 +309,12 @@
306
309
  margin-top: 10px;
307
310
  }
308
311
 
312
+ .payrails-dropin-item-container .payrails-stored-instrument-container {
313
+ display: flex;
314
+ flex-direction: column;
315
+ gap: 8px;
316
+ }
317
+
309
318
  .payrails-dropin-item .payrails-store-instrument-icon {
310
319
  width: 24px;
311
320
  margin-right: 7px;
package/payrails.d.ts CHANGED
@@ -703,7 +703,9 @@ declare class CardForm extends PayrailsElementWithStoreInstrumentCheckbox {
703
703
  }>;
704
704
  protected get selectedInstallment(): number | undefined;
705
705
  private enforceEnrollInstrumentToNetworkOffersForMasterCard;
706
- fetchBinLookup(): Promise<string | BinLookupResponse>;
706
+ fetchBinLookup(): Promise<string | {
707
+ bin: string;
708
+ }>;
707
709
  get isPaymentInstallmentsEnabled(): boolean | undefined;
708
710
  private getinstallmentOptions;
709
711
  }
@@ -972,10 +974,13 @@ declare class Dropin extends PayrailsElement {
972
974
  private createCardPaymentButton;
973
975
  private onAuthorizeSuccess;
974
976
  private getElementEvents;
977
+ private onAuthorizePending;
975
978
  private onAuthorizeFailed;
976
979
  private isStoredInstrumentEnabled;
977
980
  private applyStyles;
978
- fetchBinLookup(): Promise<string | BinLookupResponse | undefined>;
981
+ fetchBinLookup(): Promise<string | {
982
+ bin: string;
983
+ } | undefined>;
979
984
  }
980
985
  interface StorablePaymentMethodConfiguration extends StoreInstrumentElementOptions {
981
986
  showStoredInstruments?: boolean;
@@ -1005,6 +1010,7 @@ interface DropinOptions {
1005
1010
  paymentResult?: {
1006
1011
  success?: string;
1007
1012
  fail?: string;
1013
+ pending?: string;
1008
1014
  };
1009
1015
  paypalButton?: PaypalDropinOptions['translations'];
1010
1016
  mercadoPago?: GenericRedirectDropinOptions['translations'];
@@ -1125,6 +1131,7 @@ interface InitOptions {
1125
1131
  interface PaymentEvents {
1126
1132
  onAuthorizeSuccess?: (e?: any) => void;
1127
1133
  onAuthorizeFailed?: (e?: any) => void;
1134
+ onAuthorizePending?: (e?: any) => void;
1128
1135
  onPaymentButtonClicked?: (e?: {
1129
1136
  bin?: string;
1130
1137
  }) => Promise<boolean>;
@@ -1150,7 +1157,7 @@ interface SdkConfiguration {
1150
1157
  holderReference: string;
1151
1158
  usePayrailsFrames: boolean;
1152
1159
  links?: {
1153
- binLookup: {
1160
+ binLookup?: {
1154
1161
  method: 'GET' | 'POST';
1155
1162
  href: string;
1156
1163
  };
@@ -1260,7 +1267,9 @@ declare class PayrailsCollectContainer implements Mountable {
1260
1267
  private attachCustomEventHandler;
1261
1268
  private formatBin;
1262
1269
  private get elementToFieldMap();
1263
- fetchBinLookup: (bin: string) => Promise<string | BinLookupResponse>;
1270
+ fetchBinLookup: (bin: string) => Promise<string | BinLookupResponse | {
1271
+ bin: string;
1272
+ }>;
1264
1273
  }
1265
1274
  interface TokenizeOptions {
1266
1275
  futureUsage?: 'CardOnFile' | 'Subscription' | 'UnscheduledCardOnFile';