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

MBL-1181: Update ApplePay payment total string for post campaign pledges #1978

Merged
merged 2 commits into from
Mar 14, 2024

Conversation

amy-at-kickstarter
Copy link
Contributor

📲 What

Update the payment total string in ApplePay for post campaign pledges.

🤔 Why

It says "Pay Kickstarter (if funded)" by default. For PCP, it can just say "Pay Kickstarter".

👀 See

Screenshot 2024-03-14 at 11 12 29 AM Screenshot 2024-03-14 at 11 11 23 AM

@@ -9,35 +9,34 @@ extension PKPaymentRequest {
allRewardsTotal: Double,
additionalPledgeAmount: Double,
allRewardsShippingTotal: Double,
merchantIdentifier: String,
env: Environment = AppEnvironment.current
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was always the default value, so just making it explicit. I'm also checking a feature flag in here which implicitly uses AppEnvironment.current.

)

return request
}

private static func paymentSummaryItems(
forProject _: Project,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed unused variable

@@ -7,8 +7,10 @@ import XCTest

final class PKPaymentRequestHelpersTests: XCTestCase {
func testPaymentRequest_NoShipping() {
let project = Project.template
|> Project.lens.country .~ .us
var project = Project.template
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Project is mutable, so just pulling out a little Prelude while I'm in here.

@@ -2269,18 +2269,18 @@ Haz clic para volver a intentarlo."
)
}
/**
"Continue with %{quantity_count} add-ons"
"Continue with %{quantity_count} add-on"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are weird. Did something happen to muck with plurals?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen similar changes before that weirded me out. Basically, we have multiple versions of this string depending on the count. The change here is in the comment that's just for our sake; not in the actual string presented to users. I have no idea what makes the comment choose the singular vs plural version, though. I assume the change to the default value is similar (not actually going to have an effect since we're not relying on the default), but I'm not sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooh, that makes much more sense. Cool!

@amy-at-kickstarter amy-at-kickstarter self-assigned this Mar 14, 2024
@amy-at-kickstarter amy-at-kickstarter marked this pull request as ready for review March 14, 2024 15:20
@amy-at-kickstarter amy-at-kickstarter requested review from a team and ifosli and removed request for a team March 14, 2024 15:20
@@ -2269,18 +2269,18 @@ Haz clic para volver a intentarlo."
)
}
/**
"Continue with %{quantity_count} add-ons"
"Continue with %{quantity_count} add-on"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen similar changes before that weirded me out. Basically, we have multiple versions of this string depending on the count. The change here is in the comment that's just for our sake; not in the actual string presented to users. I have no idea what makes the comment choose the singular vs plural version, though. I assume the change to the default value is similar (not actually going to have an effect since we're not relying on the default), but I'm not sure.

@amy-at-kickstarter amy-at-kickstarter merged commit 744c63f into main Mar 14, 2024
5 checks passed
@amy-at-kickstarter amy-at-kickstarter deleted the feat/adyer/MBL-1181 branch March 14, 2024 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants