Skip to content

Commit c4bea37

Browse files
authored
🤖 Merge PR DefinitelyTyped#74256 [googlepay] add missing properties allowedIssuerCountryCodes, blockedIssuerCountryCodes and cardFundingSource by @dmengelt
1 parent f0264e6 commit c4bea37

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

‎types/googlepay/googlepay-tests.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,19 @@ const allowedCardNetworks = new Array<google.payments.api.CardNetwork>(
77
"INTERAC",
88
);
99

10+
const cardFundingSource = new Array<google.payments.api.CardFundingSource>(
11+
"UNKNOWN",
12+
"CREDIT",
13+
"DEBIT",
14+
"PREPAID",
15+
);
16+
1017
const allowedPaymentMethods = new Array<google.payments.api.PaymentMethodSpecification>({
1118
type: "CARD",
1219
parameters: {
1320
allowedAuthMethods: ["PAN_ONLY", "CRYPTOGRAM_3DS"],
1421
allowedCardNetworks,
22+
allowedIssuerCountryCodes: ["US", "CA"],
1523
billingAddressRequired: true,
1624
billingAddressParameters: {
1725
format: "MIN",

‎types/googlepay/index.d.ts‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,21 @@ declare namespace google.payments.api {
805805
*/
806806
allowCreditCards?: false | true | undefined;
807807

808+
/**
809+
* Issuer country allowlist that contains ISO 3166-1 alpha-2 country codes.
810+
* When this allowlist is set, users can only choose payment methods issued in the specified countries.
811+
* If neither allowlist nor blocklist is set, users will be allowed to choose payment methods issued in any country.
812+
*/
813+
allowedIssuerCountryCodes?: string[] | undefined;
814+
815+
/**
816+
* Issuer country blocklist that contains ISO 3166-1 alpha-2 country codes.
817+
* When this blocklist is set, users are restricted from choosing payment methods issued in the specified countries.
818+
*
819+
* Note: allowedIssuerCountryCodes and blockedIssuerCountryCodes are mutually exclusive, so only one should be set at a time.
820+
*/
821+
blockedIssuerCountryCodes?: string[] | undefined;
822+
808823
/**
809824
* Set to `true` to request assuranceDetails.
810825
*
@@ -1192,6 +1207,11 @@ declare namespace google.payments.api {
11921207
* [[CardParameters.billingAddressRequired|`CardParameters.billingAddressRequired`]].
11931208
*/
11941209
billingAddress?: Address | undefined;
1210+
1211+
/**
1212+
* Card funding source for the selected payment method.
1213+
*/
1214+
cardFundingSource?: CardFundingSource | undefined;
11951215
}
11961216

11971217
/**
@@ -1841,6 +1861,25 @@ declare namespace google.payments.api {
18411861
*/
18421862
type TransactionState = "SUCCESS" | "ERROR";
18431863

1864+
/**
1865+
* Enum string for the card funding source of the selected payment method.
1866+
*
1867+
* Options:
1868+
*
1869+
* - `UNKNOWN`:
1870+
* The funding source is unknown.
1871+
*
1872+
* - `CREDIT`:
1873+
* The card is a credit card.
1874+
*
1875+
* - `DEBIT`:
1876+
* The card is a debit card.
1877+
*
1878+
* - `PREPAID`:
1879+
* The card is a prepaid card.
1880+
*/
1881+
type CardFundingSource = "UNKNOWN" | "CREDIT" | "DEBIT" | "PREPAID";
1882+
18441883
/**
18451884
* This object allows you to configure a Google Pay payment button. For
18461885
* more information about button types, colors, and display requirements,

0 commit comments

Comments
 (0)