Skip to content

Commit

Permalink
3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
adyen-git-manager committed Sep 23, 2019
1 parent 77aecb1 commit c760298
Show file tree
Hide file tree
Showing 76 changed files with 1,461 additions and 239 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,20 @@
[//]: <> (Add changes that not released yet into `Unreleased` section)
[//]: <> (Comment `Unreleased` section if there are no changes)
[//]: <> (## [Unreleased])
## [3.4.0] - 2019-09-23
### Added
- Created standard style pattern for customizing XML layouts of the Components.
- Created BCMC component.
- Add option in Setting screen to enable 3ds2.
### Changed
- In CardConfiguration BCMC card type gonna be exclude from supported card type list.

## [3.3.1] - 2019-09-13
### Fixed
- There was issue with ConstraintLayout's Flow related to [ClassNotFoundException androidx.constraintlayout.widget.helper.Flow](https://github.com/Adyen/adyen-android/issues/109) fixed
- Created method to save the state of an ActionComponent when the Activity gets destroyed to persist the `paymentData`.
- Fixed non Ecommerce stored payment methods being shown as a regular payment method.

## [3.3.0] - 2019-09-11
### Added
- Created SepaComponent
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ The Components are available through [jcenter][dl], you only need to add the Gra
Import the Component module for the Payment Method you want to use by adding it to your `build.gradle` file.
For example, for the Drop-in solution you should add:
```groovy
implementation "com.adyen.checkout:drop-in:3.3.1"
implementation "com.adyen.checkout:drop-in:3.4.0"
```
For a Credit Card component you should add:
```groovy
implementation "com.adyen.checkout:card-ui:3.3.1"
implementation "com.adyen.checkout:card-ui:3.4.0"
```

## Drop-in
Expand Down
4 changes: 3 additions & 1 deletion RELEASE_NOTES
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<ul>
<li>Bug Fixes</li>
<li>Created theming structure.</li>
<li>Created BCMC component.</li>
<li>Bug Fixes.</li>
</ul>
26 changes: 6 additions & 20 deletions base-ui/src/main/res/layout/recycler_list_with_image.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,23 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/AdyenCheckout.RecyclerListItem"
android:clickable="true"
android:focusable="true"
android:orientation="horizontal"
android:paddingStart="@dimen/standard_margin"
android:paddingLeft="@dimen/standard_margin"
android:paddingTop="@dimen/standard_three_quarters_margin"
android:paddingEnd="@dimen/standard_margin"
android:paddingRight="@dimen/standard_margin"
android:paddingBottom="@dimen/standard_three_quarters_margin">
android:orientation="horizontal" >

<com.adyen.checkout.base.ui.view.RoundCornerImageView
android:id="@+id/imageView_logo"
android:layout_width="@dimen/logo_width"
android:layout_height="@dimen/logo_height"
android:layout_marginEnd="@dimen/standard_margin"
android:layout_marginRight="@dimen/standard_margin"
android:contentDescription="@null"
android:maxHeight="@dimen/logo_width"
android:minHeight="@dimen/logo_height"
android:scaleType="fitCenter"
android:src="@drawable/ic_placeholder_image"
style="@style/AdyenCheckout.Image.Logo"
app:strokeColor="@color/stroke_color"/>

<android.support.v7.widget.AppCompatTextView
android:id="@+id/textView_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:maxHeight="@dimen/logo_width"
style="@style/AdyenCheckout.ListItemText"
tools:text="Test"/>

</LinearLayout>
18 changes: 4 additions & 14 deletions base-ui/src/main/res/layout/spinner_list_with_image.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,18 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/standard_margin"
android:background="?selectableItemBackground" >
style="@style/AdyenCheckout.SpinnerListItem"
android:orientation="horizontal" >

<android.support.v7.widget.AppCompatImageView
android:id="@+id/imageView_logo"
android:layout_width="@dimen/logo_width"
android:layout_height="@dimen/logo_height"
android:minHeight="@dimen/logo_height"
android:maxHeight="@dimen/logo_width"
android:layout_marginRight="@dimen/standard_margin"
android:layout_marginEnd="@dimen/standard_margin"
android:scaleType="centerCrop"
android:src="@drawable/ic_placeholder_image"
android:contentDescription="@null"/>
style="@style/AdyenCheckout.Image.Logo" />

<android.support.v7.widget.AppCompatTextView
android:id="@+id/textView_text"
android:layout_width="match_parent"
android:maxHeight="@dimen/logo_width"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
style="@style/AdyenCheckout.ListItemText"
tools:text="Test"/>

</LinearLayout>
1 change: 1 addition & 0 deletions base-ui/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<dimen name="logo_width">40dp</dimen>
<dimen name="logo_height">26dp</dimen>

<dimen name="input_layout_height">90dp</dimen>
<dimen name="input_height">55dp</dimen>

</resources>
44 changes: 42 additions & 2 deletions base-ui/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
-->

<resources>
<!-- Placeholder to be overridden by main app. -->
<!-- Placeholder to be overridden by main app -->
<style name="AppTheme" parent="Theme.AppCompat.DayNight"/>

<!-- Base theme for Checkout -->
<style name="AdyenCheckout" parent="AppTheme"/>

<!-- Text -->
Expand All @@ -35,7 +36,46 @@
<style name="AdyenCheckout.TextInputLayout" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<item name="boxStrokeColor">@color/primaryColor</item>
<item name="hintTextAppearance">@style/AdyenCheckout.HintTextStyle</item>
<item name="android:minHeight">90dp</item>
<item name="android:minHeight">@dimen/input_layout_height</item>
</style>

<style name="AdyenCheckout.TextInputEditText">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">@dimen/input_height</item>
</style>

<style name="AdyenCheckout.RecyclerListItem">
<item name="android:background">?selectableItemBackground</item>
<item name="android:paddingStart">@dimen/standard_margin</item>
<item name="android:paddingLeft">@dimen/standard_margin</item>
<item name="android:paddingTop">@dimen/standard_three_quarters_margin</item>
<item name="android:paddingEnd">@dimen/standard_margin</item>
<item name="android:paddingRight">@dimen/standard_margin</item>
<item name="android:paddingBottom">@dimen/standard_three_quarters_margin</item>
</style>

<style name="AdyenCheckout.SpinnerListItem">
<item name="android:background">?selectableItemBackground</item>
<item name="android:padding">@dimen/standard_margin</item>
</style>

<style name="AdyenCheckout.Image"/>

<style name="AdyenCheckout.Image.Logo" parent="AdyenCheckout.Image">
<item name="android:layout_width">@dimen/logo_width</item>
<item name="android:layout_height">@dimen/logo_height</item>
<item name="android:minHeight">@dimen/logo_height</item>
<item name="android:maxHeight">@dimen/logo_width</item>
<item name="android:layout_marginRight">@dimen/standard_margin</item>
<item name="android:layout_marginEnd">@dimen/standard_margin</item>
<item name="android:src">@drawable/ic_placeholder_image</item>
<item name="android:scaleType">fitCenter</item>
<item name="android:contentDescription">@null</item>
</style>

<style name="AdyenCheckout.ListItemText">
<item name="android:layout_gravity">center_vertical</item>
<item name="android:maxHeight">@dimen/logo_width</item>
</style>

</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public void setSupportedShopperInteractions(@NonNull List<String> supportedShopp
this.supportedShopperInteractions = supportedShopperInteractions;
}

public boolean isEcommarce() {
public boolean isEcommerce() {
return supportedShopperInteractions.contains(ECOMMERCE);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,17 @@ public final class PaymentMethodTypes {
public static final String SCHEME = "scheme";
public static final String GOOGLE_PAY = "paywithgoogle";
public static final String SEPA = "sepadirectdebit";

public static final String BCMC = "bcmc";


// List of all payment method types.
public static final List<String> SUPPORTED_PAYMENT_METHODS;

// Helper annotation to enforce use of a constant from here when needed.
@StringDef({IDEAL, MOLPAY, DOTPAY, EPS, ENTERCASH, OPEN_BANKING, SCHEME, GOOGLE_PAY, SEPA})
@StringDef({IDEAL, MOLPAY, DOTPAY, EPS, ENTERCASH, OPEN_BANKING, SCHEME, GOOGLE_PAY, SEPA, BCMC})
@Retention(RetentionPolicy.SOURCE)
public @interface SupportedPaymentMethod {}
public @interface SupportedPaymentMethod {
}

static {
final ArrayList<String> paymentMethods = new ArrayList<>();
Expand All @@ -56,6 +57,7 @@ public final class PaymentMethodTypes {
paymentMethods.add(SCHEME);
paymentMethods.add(GOOGLE_PAY);
paymentMethods.add(SEPA);
paymentMethods.add(BCMC);

SUPPORTED_PAYMENT_METHODS = Collections.unmodifiableList(paymentMethods);
}
Expand Down
50 changes: 50 additions & 0 deletions bcmc-base/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* Copyright (c) 2019 Adyen N.V.
*
* This file is open source and available under the MIT license. See the LICENSE file for more info.
*
* Created by arman on 18/9/2019.
*/

// Maven artifact
ext.mavenArtifactId = "bcmc-base"
ext.mavenArtifactName = "Adyen checkout bcmc base component"
ext.mavenArtifactDescription = "Adyen checkout bcmc base component client for Adyen's Checkout API."

apply plugin: 'com.android.library'

android {
compileSdkVersion version_compile_sdk

defaultConfig {
minSdkVersion version_min_sdk
targetSdkVersion version_target_sdk
versionCode version_code
versionName version_name

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
//Tests
testImplementation "junit:junit:$version_junit"
androidTestImplementation "com.android.support.test:runner:$version_support_test_runner"
androidTestImplementation "com.android.support.test.espresso:espresso-core:$version_espresso"

// Checkout
api project(':card-base-core')
}

// This sharedTasks.gradle script is applied at the end of this build.gradle script,
// since javadocs.gradle script is dependent on android.compileSdkVersion property,
// which is set on the android block above.
apply from: "../config/gradle/sharedTasks.gradle"
21 changes: 21 additions & 0 deletions bcmc-base/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
10 changes: 10 additions & 0 deletions bcmc-base/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!--
~ Copyright (c) 2019 Adyen N.V.
~
~ This file is open source and available under the MIT license. See the LICENSE file for more info.
~
~ Created by arman on 18/9/2019.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.adyen.checkout.bcmc" />
Loading

0 comments on commit c760298

Please sign in to comment.