mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
Merge pull request #35724 from overleaf/ac-wallet-payment-method-analytics
[web] Add Stripe wallet payments (Apple Pay / Google Pay) in analytics and remove conversion to "card" GitOrigin-RevId: f6d404d35eb108d7ddaf8ca1b6c2164cb5100c9c
This commit is contained in:
@@ -99,7 +99,6 @@ const httpPermissionsPolicy = {
|
||||
'magnetometer',
|
||||
'midi',
|
||||
'otp-credentials',
|
||||
'payment',
|
||||
'picture-in-picture',
|
||||
'screen-wake-lock',
|
||||
'serial',
|
||||
@@ -112,6 +111,8 @@ const httpPermissionsPolicy = {
|
||||
autoplay: 'self "https://videos.ctfassets.net"',
|
||||
fullscreen: 'self',
|
||||
'on-device-speech-recognition': 'self',
|
||||
// required for Apple Pay / Google Pay
|
||||
payment: 'self "https://js.stripe.com"',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ describe('HttpPermissionsPolicy', function () {
|
||||
const response = await fetch(BASE_URL)
|
||||
|
||||
expect(response.headers.get('permissions-policy')).to.equal(
|
||||
'accelerometer=(), attribution-reporting=(), browsing-topics=(), camera=(), display-capture=(), encrypted-media=(), gamepad=(), geolocation=(), gyroscope=(), hid=(), identity-credentials-get=(), idle-detection=(), local-fonts=(), magnetometer=(), midi=(), otp-credentials=(), payment=(), picture-in-picture=(), screen-wake-lock=(), serial=(), storage-access=(), usb=(), window-management=(), xr-spatial-tracking=(), autoplay=(self "https://videos.ctfassets.net"), fullscreen=(self), on-device-speech-recognition=(self)'
|
||||
'accelerometer=(), attribution-reporting=(), browsing-topics=(), camera=(), display-capture=(), encrypted-media=(), gamepad=(), geolocation=(), gyroscope=(), hid=(), identity-credentials-get=(), idle-detection=(), local-fonts=(), magnetometer=(), midi=(), otp-credentials=(), picture-in-picture=(), screen-wake-lock=(), serial=(), storage-access=(), usb=(), window-management=(), xr-spatial-tracking=(), autoplay=(self "https://videos.ctfassets.net"), fullscreen=(self), on-device-speech-recognition=(self), payment=(self "https://js.stripe.com")'
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
PaymentProvider,
|
||||
StripePaymentProviderService,
|
||||
} from './dashboard/subscription'
|
||||
import { PaymentMethod } from './payment-method'
|
||||
import { AnalyticsPaymentMethod, PaymentMethod } from './payment-method'
|
||||
import { RecurlyPlanCode } from './plan'
|
||||
|
||||
type PaymentPageFormSubmitEventBaseSegmentation = {
|
||||
@@ -48,7 +48,7 @@ type PaymentPageFormSuccessEventStripeSegmentation =
|
||||
payment_provider: StripePaymentProviderService
|
||||
stripe_price_id: string
|
||||
stripe_price_lookup_key: string
|
||||
paymentMethod: PaymentMethod
|
||||
paymentMethod: AnalyticsPaymentMethod
|
||||
}
|
||||
|
||||
type PaymentPageFormSuccessEventRecurlySegmentation =
|
||||
|
||||
@@ -1 +1,6 @@
|
||||
export type PaymentMethod = 'credit_card' | 'paypal'
|
||||
// Payment methods selectable in the checkout UI
|
||||
export type PaymentMethod = 'card' | 'paypal' | 'apple_pay' | 'google_pay'
|
||||
|
||||
// Server-side analytics segmentation passes through the raw Stripe payment
|
||||
// method type for methods not in the checkout UI (e.g. sepa_debit)
|
||||
export type AnalyticsPaymentMethod = PaymentMethod | (string & {})
|
||||
|
||||
Reference in New Issue
Block a user