Skip to content

Commit

Permalink
Merge pull request #12786 from woocommerce/issue/12729-fix-pay-in-per…
Browse files Browse the repository at this point in the history
…son-learn-more-link

[Mobile Payments] Fix pay in person learn more link
  • Loading branch information
samiuelson authored Oct 17, 2024
2 parents 1f9ee2c + 34db50b commit 84c967a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*** For entries which are touching the Android Wear app's, start entry with `[WEAR]` too.
20.8
-----
- [*] [Payments] Fix learn more link for Pay in Person option in payments settings [https://github.com/woocommerce/woocommerce-android/pull/12786]
- [*] Added objective selection in the blaze campaign creation flow [https://github.com/woocommerce/woocommerce-android/pull/12781]

20.7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,7 @@ object AppUrls {
"https://woocommerce.com/document/woopayments/in-person-payments/tap-to-pay-android/"

const val WOOCOMMERCE_LEARN_MORE_ABOUT_PAYMENTS_CASH_ON_DELIVERY =
"https://woocommerce.com/document/getting-started-with-in-person-payments-with-woocommerce-payments/" +
"#add-cod-payment-method"
const val STRIPE_LEARN_MORE_ABOUT_PAYMENTS_CASH_ON_DELIVERY =
"https://woocommerce.com/document/stripe/accept-in-person-payments-with-stripe/#section-8"
"https://woocommerce.com/document/cash-on-delivery/"

const val WOOCOMMERCE_PURCHASE_CARD_READER_IN_COUNTRY = "https://woocommerce.com/products/hardware/"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ class LearnMoreUrlProvider @Inject constructor(
}
}
LearnMoreUrlType.CASH_ON_DELIVERY -> {
when (preferredPlugin) {
STRIPE_EXTENSION_GATEWAY -> AppUrls.STRIPE_LEARN_MORE_ABOUT_PAYMENTS_CASH_ON_DELIVERY
WOOCOMMERCE_PAYMENTS, null -> AppUrls.WOOCOMMERCE_LEARN_MORE_ABOUT_PAYMENTS_CASH_ON_DELIVERY
}
AppUrls.WOOCOMMERCE_LEARN_MORE_ABOUT_PAYMENTS_CASH_ON_DELIVERY
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class LearnMoreUrlProviderTest {
}

@Test
fun `given preferred plugin WcPay, when providing learn more url for COD, then WcPay COD url returned`() {
fun `given preferred plugin WcPay, when providing learn more url for COD, then COD url returned`() {
// GIVEN
whenever(appPrefsWrapper.getCardReaderPreferredPlugin(any(), any(), any()))
.thenReturn(WOOCOMMERCE_PAYMENTS)
Expand All @@ -75,7 +75,7 @@ class LearnMoreUrlProviderTest {
}

@Test
fun `given preferred plugin null, when providing learn more url for COD, then WcPay COD learn more url returned`() {
fun `given preferred plugin null, when providing learn more url for COD, then COD learn more url returned`() {
// GIVEN
whenever(appPrefsWrapper.getCardReaderPreferredPlugin(any(), any(), any()))
.thenReturn(null)
Expand All @@ -88,7 +88,7 @@ class LearnMoreUrlProviderTest {
}

@Test
fun `given preferred plugin Stripe, when providing learn more url for COD, then Stripe COD url returned`() {
fun `given preferred plugin Stripe, when providing learn more url for COD, then COD learn more url returned`() {
// GIVEN
whenever(appPrefsWrapper.getCardReaderPreferredPlugin(any(), any(), any()))
.thenReturn(STRIPE_EXTENSION_GATEWAY)
Expand All @@ -97,6 +97,6 @@ class LearnMoreUrlProviderTest {
val res = provider.provideLearnMoreUrlFor(CASH_ON_DELIVERY)

// THEN
assertThat(res).isEqualTo(AppUrls.STRIPE_LEARN_MORE_ABOUT_PAYMENTS_CASH_ON_DELIVERY)
assertThat(res).isEqualTo(AppUrls.WOOCOMMERCE_LEARN_MORE_ABOUT_PAYMENTS_CASH_ON_DELIVERY)
}
}

0 comments on commit 84c967a

Please sign in to comment.