-
Notifications
You must be signed in to change notification settings - Fork 658
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
Add support for FPX #7214
Merged
Merged
Add support for FPX #7214
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b286377
Add support for FPX
tillh-stripe a05da87
Add tests
tillh-stripe b77b167
Update Lokalise create functionality
tillh-stripe 2130079
Update changelog
tillh-stripe c8b1e37
Add support CSV file
tillh-stripe 2cd6811
Add FPX drawable
tillh-stripe 5e548b3
Fix FPX test
tillh-stripe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
payments-ui-core/res/drawable/stripe_ic_paymentsheet_pm_fpx.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="14dp" | ||
android:height="16dp" | ||
android:viewportWidth="14" | ||
android:viewportHeight="16"> | ||
<path | ||
android:pathData="M13.587,6.988C12.161,5.147 10.717,3.319 9.265,1.496C9.035,1.207 8.699,0.861 8.307,1.058C8.042,1.19 7.801,1.583 7.774,1.879C7.685,2.847 7.692,3.823 7.682,4.796C7.681,4.906 7.793,5.026 7.872,5.127C8.476,5.898 9.09,6.662 9.69,7.435C9.857,7.65 9.951,7.824 9.98,7.992C9.951,8.226 9.857,8.344 9.69,8.559C9.09,9.332 8.476,10.1 7.872,10.87C7.793,10.972 7.681,11.096 7.682,11.206C7.692,12.179 7.685,13.155 7.774,14.123C7.801,14.418 8.042,14.811 8.307,14.943C8.699,15.139 9.035,14.791 9.265,14.502C10.717,12.679 12.161,10.846 13.587,9.006C13.84,8.679 13.975,8.46 14,7.992C13.975,7.652 13.84,7.315 13.587,6.988Z" | ||
android:fillColor="#1F2C5C" | ||
android:fillType="evenOdd" /> | ||
<path | ||
android:pathData="M0.413,6.988C1.839,5.147 3.283,3.319 4.735,1.496C4.965,1.207 5.301,0.861 5.693,1.058C5.958,1.19 6.199,1.583 6.226,1.879C6.315,2.847 6.308,3.823 6.318,4.796C6.319,4.906 6.207,5.026 6.128,5.127C5.524,5.898 4.91,6.662 4.31,7.435C4.143,7.65 4.049,7.824 4.02,7.992C4.049,8.226 4.143,8.344 4.31,8.559C4.91,9.332 5.524,10.1 6.128,10.87C6.207,10.972 6.319,11.096 6.318,11.206C6.308,12.179 6.315,13.155 6.226,14.123C6.199,14.418 5.958,14.811 5.693,14.943C5.301,15.139 4.965,14.791 4.735,14.502C3.283,12.679 1.839,10.846 0.413,9.006C0.159,8.679 0.025,8.46 0,7.992C0.025,7.652 0.159,7.315 0.413,6.988Z" | ||
android:fillColor="#1A8ACB" | ||
android:fillType="evenOdd" /> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
paymentsheet-example/src/androidTest/java/com/stripe/android/lpm/TestFpx.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.stripe.android.lpm | ||
|
||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
import com.stripe.android.BaseLpmTest | ||
import com.stripe.android.test.core.Automatic | ||
import com.stripe.android.test.core.Currency | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
@RunWith(AndroidJUnit4::class) | ||
internal class TestFpx : BaseLpmTest() { | ||
private val fpx = newUser.copy( | ||
paymentMethod = lpmRepository.fromCode("fpx")!!, | ||
currency = Currency.MYR, | ||
merchantCountryCode = "MY", | ||
automatic = Automatic.On, | ||
) | ||
|
||
@Test | ||
fun testFpx() { | ||
testDriver.confirmNewOrGuestComplete( | ||
testParameters = fpx, | ||
) | ||
} | ||
|
||
@Test | ||
fun testFpxInCustomFlow() { | ||
testDriver.confirmCustom( | ||
testParameters = fpx, | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,6 +121,7 @@ enum class Currency { | |
GBP, | ||
INR, | ||
SGD, | ||
MYR, | ||
} | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
lpm, hasCustomer, allowsDelayedPayment, intentSetupFutureUsage, intentHasShipping, intentLpms, supportCustomerSavedCard, formExists, formType, supportsAdding | ||
fpx, true, true, off_session, false, card/fpx, false, false, not available, false | ||
fpx, true, true, off_session, false, card/eps/fpx, false, false, not available, false | ||
fpx, true, false, off_session, false, card/fpx, false, false, not available, false | ||
fpx, true, false, off_session, false, card/eps/fpx, false, false, not available, false | ||
fpx, true, true, on_session, false, card/fpx, false, false, not available, false | ||
fpx, true, true, on_session, false, card/eps/fpx, false, false, not available, false | ||
fpx, true, false, on_session, false, card/fpx, false, false, not available, false | ||
fpx, true, false, on_session, false, card/eps/fpx, false, false, not available, false | ||
fpx, true, true, null, false, card/fpx, false, true, oneTime, true | ||
fpx, true, true, null, false, card/eps/fpx, false, true, oneTime, true | ||
fpx, true, false, null, false, card/fpx, false, true, oneTime, true | ||
fpx, true, false, null, false, card/eps/fpx, false, true, oneTime, true | ||
fpx, false, true, off_session, false, card/fpx, false, false, not available, false | ||
fpx, false, true, off_session, false, card/eps/fpx, false, false, not available, false | ||
fpx, false, false, off_session, false, card/fpx, false, false, not available, false | ||
fpx, false, false, off_session, false, card/eps/fpx, false, false, not available, false | ||
fpx, false, true, on_session, false, card/fpx, false, false, not available, false | ||
fpx, false, true, on_session, false, card/eps/fpx, false, false, not available, false | ||
fpx, false, false, on_session, false, card/fpx, false, false, not available, false | ||
fpx, false, false, on_session, false, card/eps/fpx, false, false, not available, false | ||
fpx, false, true, null, false, card/fpx, false, true, oneTime, true | ||
fpx, false, true, null, false, card/eps/fpx, false, true, oneTime, true | ||
fpx, false, false, null, false, card/fpx, false, true, oneTime, true | ||
fpx, false, false, null, false, card/eps/fpx, false, true, oneTime, true | ||
fpx, true, true, off_session, true, card/fpx, false, false, not available, false | ||
fpx, true, true, off_session, true, card/eps/fpx, false, false, not available, false | ||
fpx, true, false, off_session, true, card/fpx, false, false, not available, false | ||
fpx, true, false, off_session, true, card/eps/fpx, false, false, not available, false | ||
fpx, true, true, on_session, true, card/fpx, false, false, not available, false | ||
fpx, true, true, on_session, true, card/eps/fpx, false, false, not available, false | ||
fpx, true, false, on_session, true, card/fpx, false, false, not available, false | ||
fpx, true, false, on_session, true, card/eps/fpx, false, false, not available, false | ||
fpx, true, true, null, true, card/fpx, false, true, oneTime, true | ||
fpx, true, true, null, true, card/eps/fpx, false, true, oneTime, true | ||
fpx, true, false, null, true, card/fpx, false, true, oneTime, true | ||
fpx, true, false, null, true, card/eps/fpx, false, true, oneTime, true | ||
fpx, false, true, off_session, true, card/fpx, false, false, not available, false | ||
fpx, false, true, off_session, true, card/eps/fpx, false, false, not available, false | ||
fpx, false, false, off_session, true, card/fpx, false, false, not available, false | ||
fpx, false, false, off_session, true, card/eps/fpx, false, false, not available, false | ||
fpx, false, true, on_session, true, card/fpx, false, false, not available, false | ||
fpx, false, true, on_session, true, card/eps/fpx, false, false, not available, false | ||
fpx, false, false, on_session, true, card/fpx, false, false, not available, false | ||
fpx, false, false, on_session, true, card/eps/fpx, false, false, not available, false | ||
fpx, false, true, null, true, card/fpx, false, true, oneTime, true | ||
fpx, false, true, null, true, card/eps/fpx, false, true, oneTime, true | ||
fpx, false, false, null, true, card/fpx, false, true, oneTime, true | ||
fpx, false, false, null, true, card/eps/fpx, false, true, oneTime, true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,9 @@ def create_key(key_object) | |
{ | ||
"key_name": { | ||
"android": key_object[:key_name], | ||
"ios": key_object[:key_name], | ||
"web": key_object[:key_name], | ||
"other": key_object[:key_name], | ||
Comment on lines
+34
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missed this in the initial Lokalise work: When we create a new key, Lokalise seems to expect values for all platforms. |
||
}, | ||
"platforms": ["android"], | ||
"filenames": { | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the SVG because we don’t use them.