Skip to content

Commit 0ba995a

Browse files
committed
feature(venmo): add venmoEnableOnNonNativeBrowser experiment
1 parent bebcb3f commit 0ba995a

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

src/funding/venmo/config.jsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ export function getVenmoConfig(): FundingSourceConfig {
6262
if (
6363
platform === PLATFORM.MOBILE &&
6464
experiment &&
65-
experiment.venmoWebEnabled === false
65+
experiment.venmoWebEnabled === false &&
66+
experiment.venmoEnableOnNonNativeBrowser === false
6667
) {
6768
return {
6869
native: true,

src/funding/venmo/config.test.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ describe("Venmo eligibility", () => {
1313
fundingEligibility: {},
1414
experiment: {
1515
venmoWebEnabled: true,
16+
venmoEnableOnNonNativeBrowser: true,
1617
},
1718
wallet: expect.any,
1819
flow: BUTTON_FLOW.PURCHASE,
@@ -74,7 +75,7 @@ describe("Venmo eligibility", () => {
7475
expect(isVenmoEligible).toEqual(true);
7576
});
7677

77-
test("should not be eligible if a shipping callback is passed & experiment does not include venmoWebEnabled", () => {
78+
test("should not be eligible if a shipping callback is passed & experiment does not include venmoWebEnabled or venmoEnableOnNonNativeBrowser", () => {
7879
const isVenmoEligible = venmoConfig.eligible?.({
7980
...baseEligibilityProps,
8081
experiment: {},
@@ -84,7 +85,7 @@ describe("Venmo eligibility", () => {
8485
expect(isVenmoEligible).toEqual(false);
8586
});
8687

87-
test("should be eligible if shipping callback exists & experiment includes venmoWebEnabled", () => {
88+
test("should be eligible if shipping callback exists & experiment includes venmoWebEnabled or venmoEnableOnNonNativeBrowser", () => {
8889
const isVenmoEligible = venmoConfig.eligible?.({
8990
...baseEligibilityProps,
9091
shippingChange: true,

src/types.js

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export type Experiment = {|
6262
venmoWebEnabled?: boolean,
6363
// first render experiments
6464
venmoVaultWithoutPurchase?: boolean,
65+
venmoEnableOnNonNativeBrowser?: boolean,
6566
|};
6667

6768
export type Requires = {|

src/zoid/venmo/component.jsx

+6
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,12 @@ export function getVenmoCheckoutComponent(): VenmoCheckoutComponent {
296296
required: false,
297297
},
298298

299+
venmoEnableOnNonNativeBrowser: {
300+
type: "boolean",
301+
queryParam: true,
302+
required: false,
303+
},
304+
299305
venmoVaultEnabled: {
300306
type: "boolean",
301307
queryParam: true,

0 commit comments

Comments
 (0)