@payrails/web-sdk 5.25.0-RC.2 → 5.25.1
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/README.md +3 -5
- package/index.js +4 -4
- package/package.json +1 -1
- package/payrails.d.ts +29 -4
- package/payrails.js +4 -4
package/package.json
CHANGED
package/payrails.d.ts
CHANGED
|
@@ -204,6 +204,7 @@ interface PayPalConfig {
|
|
|
204
204
|
clientId: string;
|
|
205
205
|
merchantId: string;
|
|
206
206
|
captureMode: 'Delayed' | 'Instant' | 'Manual';
|
|
207
|
+
integrationMode: 'express' | 'normal';
|
|
207
208
|
}
|
|
208
209
|
interface ApplePayConfig {
|
|
209
210
|
parameters: {
|
|
@@ -611,7 +612,7 @@ declare class PayrailsCollectContainer implements Mountable {
|
|
|
611
612
|
private attachCustomEventHandler;
|
|
612
613
|
private formatBin;
|
|
613
614
|
private get elementToFieldMap();
|
|
614
|
-
fetchBinLookup: (bin: string) => Promise<
|
|
615
|
+
fetchBinLookup: (bin: string) => Promise<BinLookupResponse | {
|
|
615
616
|
bin: string;
|
|
616
617
|
}>;
|
|
617
618
|
}
|
|
@@ -1085,7 +1086,7 @@ interface GooglePayDropinOptions extends GooglePayButtonOptions {
|
|
|
1085
1086
|
interface PaypalButtonOptions extends StoreInstrumentElementOptions {
|
|
1086
1087
|
events?: PaymentEvents & UIEvents & {
|
|
1087
1088
|
onPaypalAvailable?: () => void;
|
|
1088
|
-
|
|
1089
|
+
onDeliveryAddressChanged?: (data: onPaypalShippingAddressChangedResponse) => Promise<boolean>;
|
|
1089
1090
|
};
|
|
1090
1091
|
styles?: {
|
|
1091
1092
|
color?: 'gold' | 'blue' | 'silver' | 'white' | 'black';
|
|
@@ -1334,7 +1335,7 @@ interface UIEvents {
|
|
|
1334
1335
|
isValid: boolean;
|
|
1335
1336
|
billingAddress?: IAddress;
|
|
1336
1337
|
}) => void;
|
|
1337
|
-
|
|
1338
|
+
onDeliveryAddressChanged?: (data?: onDeliveryAddressChangedResponse) => Promise<boolean>;
|
|
1338
1339
|
}
|
|
1339
1340
|
type onPaymentMethodSelectedParams = {
|
|
1340
1341
|
paymentMethod?: StorablePaymentCompositionOption;
|
|
@@ -1344,7 +1345,31 @@ interface DropinEvents {
|
|
|
1344
1345
|
onPaymentOptionSelected?: (e: onPaymentMethodSelectedParams) => void;
|
|
1345
1346
|
}
|
|
1346
1347
|
type PayrailsSDKEvents = PaymentEvents & UIEvents & DropinEvents;
|
|
1347
|
-
type
|
|
1348
|
+
type onDeliveryAddressChangedResponse = {
|
|
1349
|
+
deliveryAddress?: {
|
|
1350
|
+
street?: string;
|
|
1351
|
+
doorNumber?: string;
|
|
1352
|
+
complement?: string;
|
|
1353
|
+
area?: string;
|
|
1354
|
+
city?: string;
|
|
1355
|
+
postalCode?: string;
|
|
1356
|
+
state?: string;
|
|
1357
|
+
country?: {
|
|
1358
|
+
code?: string;
|
|
1359
|
+
iso3?: string;
|
|
1360
|
+
name?: string;
|
|
1361
|
+
};
|
|
1362
|
+
latitude?: number;
|
|
1363
|
+
longitude?: number;
|
|
1364
|
+
phone?: {
|
|
1365
|
+
countryCode?: string;
|
|
1366
|
+
number?: string;
|
|
1367
|
+
};
|
|
1368
|
+
name?: string;
|
|
1369
|
+
lastName?: string;
|
|
1370
|
+
email?: string;
|
|
1371
|
+
};
|
|
1372
|
+
};
|
|
1348
1373
|
declare enum PayrailsEnvironment {
|
|
1349
1374
|
TEST = "TEST",
|
|
1350
1375
|
PRODUCTION = "PRODUCTION"
|