Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "PP-11638 Add additional client-side logging" #3760

Merged
merged 1 commit into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions app/assets/javascripts/browsered/web-payments/apple-pay.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ module.exports = () => {
}).then(response => {
if (response.status >= 200 && response.status < 300) {
ga('send', 'event', 'Apple Pay', 'Successful', 'auth/capture request')
sendLogMessage(window.paymentDetails.chargeID, 'ApplePaySuccessfulAuthorisation')
return response.json().then(data => {
session.completePayment(ApplePaySession.STATUS_SUCCESS)
window.location.href = data.url
Expand All @@ -90,15 +89,13 @@ module.exports = () => {
toggleSubmitButtons()
showErrorSummary(i18n.fieldErrors.webPayments.apple)
ga('send', 'event', 'Apple Pay', 'Error', 'During authorisation/capture')
sendLogMessage(window.paymentDetails.chargeID, 'ApplePayFailedAuthorisation')
}
}).catch(err => {
session.abort()
hideSpinnerAndShowMainContent()
toggleSubmitButtons()
showErrorSummary(i18n.fieldErrors.webPayments.apple)
ga('send', 'event', 'Apple Pay', 'Error', 'Couldn’t post to /web-payments-auth-request/apple/{chargeId}')
sendLogMessage(window.paymentDetails.chargeID, 'ApplePayErrorMakingRequestToAuthorise')
return err
})
}
Expand Down
3 changes: 0 additions & 3 deletions app/assets/javascripts/browsered/web-payments/google-pay.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ const submitGooglePayAuthRequest = (paymentResponse) => {
})
.then(response => {
ga('send', 'event', 'Google Pay', 'Successful', 'auth/capture request')
sendLogMessage(window.paymentDetails.chargeID, 'GooglePaySuccessfulAuthorisation')
if (response.status >= 200 && response.status < 300) {
return response.json().then(data => {
window.location.href = data.url
Expand All @@ -39,15 +38,13 @@ const submitGooglePayAuthRequest = (paymentResponse) => {
toggleSubmitButtons()
showErrorSummary(i18n.fieldErrors.webPayments.failureTitle, i18n.fieldErrors.webPayments.failureBody)
ga('send', 'event', 'Google Pay', 'Error', 'During authorisation/capture')
sendLogMessage(window.paymentDetails.chargeID, 'GooglePayFailedAuthorisation')
}
})
.catch(err => {
hideSpinnerAndShowMainContent()
toggleSubmitButtons()
showErrorSummary(i18n.fieldErrors.webPayments.failureTitle, i18n.fieldErrors.webPayments.failureBody)
ga('send', 'event', 'Google Pay', 'Error', 'During authorisation/capture')
sendLogMessage(window.paymentDetails.chargeID, 'GooglePayErrorMakingRequestToAuthorise')
return err
})
}
Expand Down
8 changes: 1 addition & 7 deletions app/controllers/client-side-logging.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,9 @@ const LOG_CODES = {
ApplePayAborted: 'Apple Pay attempt aborted by user',
ApplePayMerchantIdNotValid: 'Apple Pay Merchant ID not valid',
ApplePayMerchantValidationError: 'Error completing Apple Pay merchant validation',
ApplePayErrorMakingRequestToAuthorise: 'There was an error making a request to the server to authorise an Apple Pay payment',
ApplePaySuccessfulAuthorisation: 'Apple Pay authorisation was successful',
ApplePayFailedAuthorisation: 'Apple Pay authorisation failed',
GooglePayAvailable: 'Google Pay is available on this device',
GooglePayStarted: 'User chose Google Pay method',
GooglePayAborted: 'Google Pay attempt aborted by user',
GooglePayErrorMakingRequestToAuthorise: 'There was an error making a request to the server to authorise an Google Pay payment',
GooglePaySuccessfulAuthorisation: 'Google Pay authorisation was successful',
GooglePayFailedAuthorisation: 'Google Pay authorisation failed'
GooglePayAborted: 'Google Pay attempt aborted by user'
}

function log (req, res) {
Expand Down