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

Add AmazonPay as a new payment method to Android PaymentSheet #7199

Merged
merged 6 commits into from
Aug 24, 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### PaymentSheet
* [ADDED][7198](https://github.com/stripe/stripe-android/pull/7198) PaymentSheet now supports GrabPay for PaymentIntents.
* [ADDED][7199](https://github.com/stripe/stripe-android/pull/7199) PaymentSheet now supports AmazonPay for PaymentIntents in private beta.
* [CHANGED][7144](https://github.com/stripe/stripe-android/pull/7144) PaymentSheet now features rounded corners with the radius provided in `PaymentSheet.Shapes.cornerRadiusDp`.
* [FIXED][7190](https://github.com/stripe/stripe-android/pull/7190) Fixed an issue where amounts in Laotian Kip were displayed incorrectly.

Expand Down
1 change: 1 addition & 0 deletions payments-core/api/payments-core.api
Original file line number Diff line number Diff line change
Expand Up @@ -3760,6 +3760,7 @@ public final class com/stripe/android/model/PaymentMethod$Type : java/lang/Enum,
public static final field Affirm Lcom/stripe/android/model/PaymentMethod$Type;
public static final field AfterpayClearpay Lcom/stripe/android/model/PaymentMethod$Type;
public static final field Alipay Lcom/stripe/android/model/PaymentMethod$Type;
public static final field AmazonPay Lcom/stripe/android/model/PaymentMethod$Type;
public static final field AuBecsDebit Lcom/stripe/android/model/PaymentMethod$Type;
public static final field BacsDebit Lcom/stripe/android/model/PaymentMethod$Type;
public static final field Bancontact Lcom/stripe/android/model/PaymentMethod$Type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,13 @@ constructor(
requiresMandate = false,
hasDelayedSettlement = false
),
AmazonPay(
"amazon_pay",
isReusable = false,
isVoucher = false,
requiresMandate = false,
hasDelayedSettlement = false
),
MobilePay(
"mobilepay",
isReusable = false,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="74dp"
android:height="46dp"
android:viewportWidth="74"
android:viewportHeight="46">
<path
android:pathData="M42.57,16.887C42.268,17.375 42.804,17.712 43.761,17.637C44.935,17.545 45.397,18.102 45.183,19.35C44.993,20.461 45.293,20.937 45.933,20.541C47.816,19.378 47.166,16 45.059,16C43.991,16 42.871,16.399 42.57,16.887M17.029,18.535C20.673,22.925 35.419,24.117 41.654,20.525C44.367,18.962 44.383,18.911 42,19.45C34.306,21.189 28.299,21.106 22.202,19.175C17.684,17.744 16.222,17.563 17.029,18.535M0,45.036C0,46.398 74.212,45.865 74.667,44.5C74.887,43.842 62.177,43.594 37.5,43.774C13.641,43.948 0,44.407 0,45.036"
android:fillColor="#fba010"
android:fillType="evenOdd"
android:strokeColor="#00000000"/>
<path
android:pathData="M0,22.012L0,44.024 37.25,43.762L74.5,43.5 74.77,21.75L75.039,0 37.52,0L0,0 0,22.012M0.426,22.5C0.427,34.6 0.571,39.413 0.747,33.195C0.923,26.977 0.922,17.077 0.746,11.195C0.569,5.313 0.425,10.4 0.426,22.5M7.667,6.667C6.177,8.156 7.152,9.179 9.5,8.589C10.875,8.244 12,8.389 12,8.911C12,9.434 10.988,10.005 9.75,10.18C8.102,10.415 7.5,11.169 7.5,13C7.5,15.25 7.9,15.5 11.5,15.5L15.5,15.5 15.148,11.5C14.954,9.3 14.59,7.162 14.339,6.75C13.773,5.821 8.577,5.756 7.667,6.667M17,10.983C17,14.776 17.366,16 18.5,16C19.548,16 20,14.944 20,12.5C20,10.575 20.45,9 21,9C21.55,9 22,10.575 22,12.5C22,14.944 22.452,16 23.5,16C24.548,16 25,14.944 25,12.5C25,10.575 25.45,9 26,9C26.55,9 27,10.575 27,12.5C27,14.999 27.445,16 28.555,16C29.786,16 30.046,15.011 29.805,11.25L29.5,6.5 23.25,6.233L17,5.965 17,10.983M32.081,7.403C31.186,8.48 31.216,8.906 32.208,9.24C33.249,9.59 33.236,9.995 32.138,11.325C29.882,14.058 31.473,16 35.969,16C39.891,16 40,15.907 40,12.582C40,10.702 39.727,8.452 39.393,7.582C38.636,5.608 33.671,5.487 32.081,7.403M41,7C41,7.55 41.675,8 42.5,8C44.366,8 44.358,8.943 42.468,11.441C40.116,14.55 40.73,15.545 45,15.545C49.028,15.545 50.491,13.786 47.438,12.615C46.022,12.071 46.022,11.807 47.438,9.785C49.738,6.501 49.416,6 45,6C42.8,6 41,6.45 41,7M49.818,8.5C47.484,13.623 53,18.6 56.8,14.8C58.347,13.253 58.347,8.747 56.8,7.2C54.706,5.106 51.055,5.786 49.818,8.5M59,10.94C59,14.771 59.364,16 60.5,16C61.548,16 62,14.944 62,12.5C62,10.575 62.45,9 63,9C63.55,9 64,10.575 64,12.5C64,14.999 64.445,16 65.555,16C66.786,16 67.046,15.011 66.805,11.25C66.503,6.546 66.464,6.497 62.75,6.19L59,5.879 59,10.94M34.5,9C34.16,9.55 34.359,10 34.941,10C35.523,10 36,9.55 36,9C36,8.45 35.802,8 35.559,8C35.316,8 34.84,8.45 34.5,9M53,11.059C53,12.844 53.417,13.861 54,13.5C54.55,13.16 55,11.784 55,10.441C55,9.098 54.55,8 54,8C53.45,8 53,9.377 53,11.059M10,13C10,13.55 10.45,14 11,14C11.55,14 12,13.55 12,13C12,12.45 11.55,12 11,12C10.45,12 10,12.45 10,13M34.5,13C34.84,13.55 35.316,14 35.559,14C35.802,14 36,13.55 36,13C36,12.45 35.523,12 34.941,12C34.359,12 34.16,12.45 34.5,13M42.57,16.887C42.268,17.375 42.804,17.712 43.761,17.637C44.935,17.545 45.397,18.102 45.183,19.35C44.993,20.461 45.293,20.937 45.933,20.541C47.816,19.378 47.166,16 45.059,16C43.991,16 42.871,16.399 42.57,16.887M17.029,18.535C20.673,22.925 35.419,24.117 41.654,20.525C44.367,18.962 44.383,18.911 42,19.45C34.306,21.189 28.299,21.106 22.202,19.175C17.684,17.744 16.222,17.563 17.029,18.535M35.667,25.667C35.3,26.033 35,29.408 35,33.167C35,38.574 35.313,40 36.5,40C37.333,40 38,39.111 38,38C38,36.58 38.667,36 40.3,36C43.352,36 45,34.205 45,30.882C45,26.116 44.063,25 40.06,25C38.01,25 36.033,25.3 35.667,25.667M47,25.94C47,26.523 48.35,27 50,27C52.05,27 53,27.493 53,28.559C53,29.416 52.546,29.837 51.991,29.494C50.486,28.564 47.27,29.853 46.575,31.665C45.628,34.133 47.846,35.945 51.641,35.802L55.093,35.672 54.797,30.586L54.5,25.5 50.75,25.19C48.579,25.01 47,25.326 47,25.94M56.001,25.25C56.001,25.387 56.935,27.956 58.076,30.958C60.004,36.031 60.032,36.504 58.475,37.642C56.559,39.043 57.347,41.188 59.477,40.37C60.995,39.788 66.58,26.247 65.676,25.343C64.643,24.31 63.151,26.035 62.496,29.02C61.713,32.584 60.408,32.135 59.497,27.989C59.136,26.345 58.202,25 57.421,25C56.639,25 56,25.113 56.001,25.25M38.181,30.171C38.426,32.727 38.965,33.5 40.5,33.5C42.056,33.5 42.5,32.833 42.5,30.5C42.5,28.123 42.018,27.432 40.181,27.171C38.104,26.877 37.895,27.19 38.181,30.171M49.459,32.067C49.096,32.653 49.05,33.384 49.357,33.69C50.179,34.513 53,33.229 53,32.031C53,30.674 50.303,30.701 49.459,32.067"
android:fillColor="#ebebeb"
android:fillType="evenOdd"
android:strokeColor="#00000000"/>
<path
android:pathData="M9.25,6.662C6.938,7.595 7.974,9.045 10.5,8.411C14.017,7.528 13.623,9.326 10,10.694C7.121,11.78 6.016,14.274 7.897,15.437C8.391,15.742 10.191,15.712 11.897,15.371C14.586,14.833 15,14.326 15,11.575C15,7.05 12.847,5.211 9.25,6.662M17.309,7.638C16.549,9.618 17.44,15.5 18.5,15.5C19.05,15.5 19.64,13.813 19.81,11.75C20.2,7.047 22,6.793 22,11.441C22,16.341 23.631,16.711 24.387,11.982C25.168,7.098 27,6.719 27,11.441C27,13.334 27.476,15.176 28.059,15.536C28.762,15.971 29.014,14.57 28.809,11.358L28.5,6.525 23.129,6.495C19.922,6.478 17.577,6.938 17.309,7.638M33.25,6.662C30.938,7.595 31.974,9.045 34.5,8.411C35.918,8.055 37,8.216 37,8.783C37,9.333 35.846,10.073 34.435,10.427C32.5,10.913 31.947,11.614 32.185,13.285C32.443,15.101 33.13,15.491 35.992,15.449C39.442,15.399 39.48,15.351 39.145,11.449C38.727,6.593 36.966,5.163 33.25,6.662M42,7C42,7.55 42.727,8 43.615,8C45.102,8 45.102,8.196 43.615,10.465C41.296,14.004 41.601,15 45,15C46.65,15 48,14.55 48,14C48,13.45 47.325,13 46.5,13C45.675,13 45,12.605 45,12.122C45,11.64 45.675,10.685 46.5,10C49.008,7.918 48.289,6 45,6C43.35,6 42,6.45 42,7M51.2,7.2C48.641,9.759 50.364,16 53.629,16C55.471,16 58,13.108 58,11C58,8.892 55.471,6 53.629,6C52.953,6 51.86,6.54 51.2,7.2M60.001,11.309C60,14.261 60.386,15.879 61,15.5C61.55,15.16 62,13.296 62,11.358C62,6.597 64.396,7.424 64.81,12.327C65.218,17.148 67.004,17.084 66.985,12.25C66.965,7.365 66.091,6.146 62.748,6.34C60.156,6.491 60.001,6.77 60.001,11.309M52.184,10.673C52.644,14.566 55,14.909 55,11.083C55,8.951 54.517,8 53.434,8C52.323,8 51.959,8.779 52.184,10.673M10,12.583C10,13.454 10.534,13.989 11.188,13.771C13.042,13.153 13.349,11 11.583,11C10.713,11 10,11.713 10,12.583M34.667,11.667C33.516,12.817 33.938,14 35.5,14C36.325,14 37,13.325 37,12.5C37,10.938 35.817,10.516 34.667,11.667M36.152,33C36.233,37.125 36.491,39.222 36.725,37.66C37.086,35.247 37.503,34.91 39.503,35.411C43.829,36.497 46.435,31.55 43.967,26.937C43.202,25.509 42.032,25.071 39.469,25.253L36.004,25.5 36.152,33M48,25.829C48,26.286 48.998,26.623 50.219,26.579C53.696,26.455 53.78,29.78 50.309,30.178C48.338,30.404 47.41,31.133 47.197,32.623C46.843,35.107 48.559,35.998 52.313,35.28C54.65,34.834 55,34.287 55,31.083C55,29.058 54.46,26.86 53.8,26.2C52.444,24.844 48,24.56 48,25.829M57.061,25.782C57.028,26.487 57.675,28.68 58.5,30.654C60.465,35.356 60.395,37.671 58.25,38.92C56.645,39.855 56.64,39.942 58.191,39.97C59.121,39.986 60.144,39.576 60.464,39.059C61.981,36.603 65.916,24.934 65.045,25.472C64.501,25.809 63.497,27.946 62.815,30.223L61.575,34.362 59.349,29.431C58.125,26.719 57.095,25.077 57.061,25.782M38.229,27.171C36.412,28.988 36.737,32.789 38.804,33.895C41.546,35.363 43.19,33.73 42.824,29.903C42.479,26.296 40.362,25.038 38.229,27.171M48.446,32.087C48.077,32.685 48.2,33.6 48.72,34.12C49.975,35.375 53,34.155 53,32.393C53,30.752 49.42,30.511 48.446,32.087"
android:fillColor="#39424b"
android:fillType="evenOdd"
android:strokeColor="#00000000"/>
<path
android:pathData="M28.982,11.298L29.463,16.5 29.796,12.114C29.979,9.702 29.762,7.361 29.314,6.912C28.866,6.464 28.717,8.437 28.982,11.298M59.286,10.5C59.294,13.25 59.488,14.256 59.718,12.736C59.947,11.216 59.941,8.966 59.704,7.736C59.467,6.506 59.279,7.75 59.286,10.5M64.232,12C64.232,13.925 64.438,14.713 64.689,13.75C64.941,12.787 64.941,11.213 64.689,10.25C64.438,9.287 64.232,10.075 64.232,12M24.195,13.5C24.215,15.15 24.439,15.704 24.693,14.731C24.947,13.758 24.93,12.408 24.656,11.731C24.382,11.054 24.175,11.85 24.195,13.5M14,15C13.099,15.582 12.975,15.975 13.691,15.985C14.346,15.993 15.16,15.55 15.5,15C16.267,13.758 15.921,13.758 14,15M37.195,30.5C37.215,32.15 37.439,32.704 37.693,31.731C37.947,30.758 37.93,29.408 37.656,28.731C37.382,28.054 37.175,28.85 37.195,30.5M48.264,33.853C48.335,34.798 49.205,35.571 50.197,35.571C51.188,35.571 52,35.543 52,35.508C52,35.473 51.13,34.7 50.067,33.79C48.264,32.246 48.143,32.25 48.264,33.853M37.195,37.5C37.215,39.15 37.439,39.704 37.693,38.731C37.947,37.758 37.93,36.408 37.656,35.731C37.382,35.054 37.175,35.85 37.195,37.5"
android:fillColor="#7a8287"
android:fillType="evenOdd"
android:strokeColor="#00000000"/>
<path
android:pathData="M39.195,10.5C39.215,12.15 39.439,12.704 39.693,11.731C39.947,10.758 39.93,9.408 39.656,8.731C39.382,8.054 39.175,8.85 39.195,10.5M48.825,11.326C48.452,13.151 48.592,13.808 49.218,13.182C49.751,12.649 50.011,11.377 49.794,10.356C49.503,8.981 49.251,9.233 48.825,11.326M52.158,11C52.158,12.375 52.385,12.938 52.662,12.25C52.94,11.563 52.94,10.438 52.662,9.75C52.385,9.063 52.158,9.625 52.158,11M35.5,12C35.84,12.55 36.316,13 36.559,13C36.802,13 37,12.55 37,12C37,11.45 36.523,11 35.941,11C35.359,11 35.16,11.45 35.5,12M35.336,33C35.336,37.125 35.513,38.813 35.728,36.75C35.944,34.688 35.944,31.313 35.728,29.25C35.513,27.188 35.336,28.875 35.336,33M49.813,29.683C50.534,29.972 51.397,29.936 51.729,29.604C52.061,29.272 51.471,29.036 50.417,29.079C49.252,29.127 49.015,29.364 49.813,29.683M58,38C57.099,38.582 56.975,38.975 57.691,38.985C58.346,38.993 59.16,38.55 59.5,38C60.267,36.758 59.921,36.758 58,38"
android:fillColor="#9aa2a4"
android:fillType="evenOdd"
android:strokeColor="#00000000"/>
</vector>
Loading