diff --git a/README.md b/README.md index 4e8c361852..67dcaea61b 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,10 @@ This README provides the usage manual for the SDK itself. For the full documenta To integrate the Adyen SDK into your project, import the **core**, **utils** and **ui** module by adding the following lines to your build.gradle file. ``` -compile 'com.adyen.checkout:core:1.12.0' -compile 'com.adyen.checkout:utils:1.12.0' -compile 'com.adyen.checkout:ui:1.12.0' -compile 'com.adyen.checkout:cardscan:1.12.0' +compile 'com.adyen.checkout:core:1.13.0' +compile 'com.adyen.checkout:utils:1.13.0' +compile 'com.adyen.checkout:ui:1.13.0' +compile 'com.adyen.checkout:cardscan:1.13.0' ``` > For implementing Custom integration, only the **core** module is required. However, you might also want to include the **utils** module to use Adyen's utility methods such as Luhn check, credit card type detection, etc. @@ -174,7 +174,7 @@ For your convenience, we included the following demo modules into this repositor * **checkoutdemo** – A functioning demo of the Checkout SDK using the Quick integration. -* **app** – Also uses the Quick integration, but allows to configure parameters for setting up the payment request. +* **defaultApp** – Also uses the Quick integration, but allows to configure parameters for setting up the payment request. * **customuiapplication** – An example implementation of the Custom integration where the application fully handles the UI. diff --git a/adyen-core/src/main/java/com/adyen/core/DeviceTokenGenerator.java b/adyen-core/src/main/java/com/adyen/core/DeviceTokenGenerator.java index 0839bd06cd..64caf1f5ba 100644 --- a/adyen-core/src/main/java/com/adyen/core/DeviceTokenGenerator.java +++ b/adyen-core/src/main/java/com/adyen/core/DeviceTokenGenerator.java @@ -43,8 +43,8 @@ static String getToken(final Context context, final PaymentStateHandler paymentS deviceInfo.put("sdkVersion", SDK_VERSION); deviceInfo.put("deviceIdentifier", androidId); deviceInfo.put("locale", StringUtils.getLocale(context)); - deviceInfo.put("integration", (isQuickIntegration) ? "quick" : "custom"); + deviceInfo.put("deviceModel", Build.MANUFACTURER + " " + Build.DEVICE); } catch (final JSONException jsonException) { Log.e(TAG, "Token could not be created", jsonException); diff --git a/adyen-core/src/main/java/com/adyen/core/models/PaymentMethod.java b/adyen-core/src/main/java/com/adyen/core/models/PaymentMethod.java index 77b0f6bffc..8f6ae05ec4 100644 --- a/adyen-core/src/main/java/com/adyen/core/models/PaymentMethod.java +++ b/adyen-core/src/main/java/com/adyen/core/models/PaymentMethod.java @@ -31,6 +31,7 @@ public static class Type { public static final String SEPA_DIRECT_DEBIT = "sepadirectdebit"; public static final String PAYPAL = "paypal"; public static final String BCMC = "bcmc"; + public static final String QIWI_WALLET = "qiwiwallet"; } private static final long serialVersionUID = 2587948839462686004L; diff --git a/adyen-core/src/main/java/com/adyen/core/models/paymentdetails/CreditCardPaymentDetails.java b/adyen-core/src/main/java/com/adyen/core/models/paymentdetails/CreditCardPaymentDetails.java index 4f7149b964..46e603735e 100644 --- a/adyen-core/src/main/java/com/adyen/core/models/paymentdetails/CreditCardPaymentDetails.java +++ b/adyen-core/src/main/java/com/adyen/core/models/paymentdetails/CreditCardPaymentDetails.java @@ -13,6 +13,8 @@ public class CreditCardPaymentDetails extends PaymentDetails { public static final String INSTALLMENTS = "installments"; public static final String BILLING_ADDRESS = "billingAddress"; + public static final String CARD_HOLDER_NAME_REQUIRED = "cardHolderNameRequired"; + public enum AddressKey { street, houseNumberOrName, diff --git a/adyen-core/src/main/java/com/adyen/core/models/paymentdetails/IdealPaymentDetails.java b/adyen-core/src/main/java/com/adyen/core/models/paymentdetails/IdealPaymentDetails.java index d3441cde80..fdb51ad497 100644 --- a/adyen-core/src/main/java/com/adyen/core/models/paymentdetails/IdealPaymentDetails.java +++ b/adyen-core/src/main/java/com/adyen/core/models/paymentdetails/IdealPaymentDetails.java @@ -3,11 +3,11 @@ import java.util.Collection; /** - * PaymentDetails class for sepa direct debit payments. + * PaymentDetails class for the iDEAL issuer selection. */ public class IdealPaymentDetails extends PaymentDetails { - private static final String IDEAL_ISSUER = "idealIssuer"; + public static final String IDEAL_ISSUER = "idealIssuer"; public IdealPaymentDetails(Collection inputDetails) { super(inputDetails); diff --git a/adyen-core/src/main/java/com/adyen/core/models/paymentdetails/IssuerSelectionPaymentDetails.java b/adyen-core/src/main/java/com/adyen/core/models/paymentdetails/IssuerSelectionPaymentDetails.java new file mode 100644 index 0000000000..05f0dcafe7 --- /dev/null +++ b/adyen-core/src/main/java/com/adyen/core/models/paymentdetails/IssuerSelectionPaymentDetails.java @@ -0,0 +1,30 @@ +package com.adyen.core.models.paymentdetails; + +import java.util.Collection; + +/** + * PaymentDetails class for issuer selection. + */ +public class IssuerSelectionPaymentDetails extends PaymentDetails { + + public static final String ISSUER = "issuer"; + + public IssuerSelectionPaymentDetails(Collection inputDetails) { + super(inputDetails); + } + + public boolean fillIssuer(final String issuerId) { + for (InputDetail inputDetail: getInputDetails()) { + if (IdealPaymentDetails.IDEAL_ISSUER.equalsIgnoreCase(inputDetail.getKey()) + || ISSUER.equalsIgnoreCase(inputDetail.getKey())) { + return super.fill(inputDetail.getKey(), issuerId); + } + } + return false; + } + + public boolean fillIssuer(final InputDetail.Item issuerItem) { + return fillIssuer(issuerItem.getId()); + } + +} diff --git a/adyen-core/src/main/java/com/adyen/core/models/paymentdetails/QiwiWalletPaymentDetails.java b/adyen-core/src/main/java/com/adyen/core/models/paymentdetails/QiwiWalletPaymentDetails.java new file mode 100644 index 0000000000..9a9c240011 --- /dev/null +++ b/adyen-core/src/main/java/com/adyen/core/models/paymentdetails/QiwiWalletPaymentDetails.java @@ -0,0 +1,23 @@ +package com.adyen.core.models.paymentdetails; + +import java.util.Collection; + +/** + * PaymentDetails class for Qiwi wallet payments. + */ +public class QiwiWalletPaymentDetails extends PaymentDetails { + + private static final String QIWI_TELEPHONE_NUMBER_PREFIX = "qiwiwallet.telephoneNumberPrefix"; + private static final String QIWI_TELEPHONE_NUMBER = "qiwiwallet.telephoneNumber"; + + + public QiwiWalletPaymentDetails(Collection inputDetails) { + super(inputDetails); + } + + public boolean fillTelephoneNumber(final String countryCode, final String telephoneNumber) { + return super.fill(QIWI_TELEPHONE_NUMBER, telephoneNumber) + && super.fill(QIWI_TELEPHONE_NUMBER_PREFIX, countryCode); + } + +} diff --git a/adyen-ui/src/main/java/com/adyen/ui/DefaultPaymentRequestDetailsListener.java b/adyen-ui/src/main/java/com/adyen/ui/DefaultPaymentRequestDetailsListener.java index b77a5e76f5..4fd48aae10 100644 --- a/adyen-ui/src/main/java/com/adyen/ui/DefaultPaymentRequestDetailsListener.java +++ b/adyen-ui/src/main/java/com/adyen/ui/DefaultPaymentRequestDetailsListener.java @@ -20,8 +20,10 @@ import com.adyen.core.interfaces.UriCallback; import com.adyen.core.internals.ModuleAvailabilityUtil; import com.adyen.core.models.PaymentMethod; +import com.adyen.core.models.paymentdetails.IdealPaymentDetails; import com.adyen.core.models.paymentdetails.InputDetail; import com.adyen.core.models.paymentdetails.InputDetailsUtil; +import com.adyen.core.models.paymentdetails.IssuerSelectionPaymentDetails; import com.adyen.core.models.paymentdetails.PaymentDetails; import com.adyen.core.services.PaymentMethodService; import com.adyen.ui.activities.CheckoutActivity; @@ -120,8 +122,9 @@ public void onReceive(final Context context, final Intent intent) { public void onPaymentDetailsRequired(@NonNull PaymentRequest paymentRequest, @NonNull Collection inputDetails, @NonNull PaymentDetailsCallback callback) { - if (paymentRequest.getPaymentMethod().getType().equals(PaymentMethod.Type.IDEAL)) { + if (InputDetailsUtil.containsKey(inputDetails, IdealPaymentDetails.IDEAL_ISSUER) + || InputDetailsUtil.containsKey(inputDetails, IssuerSelectionPaymentDetails.ISSUER)) { final Intent intent = new Intent(context, CheckoutActivity.class); Bundle bundle = new Bundle(); bundle.putSerializable(PAYMENT_METHOD, paymentRequest.getPaymentMethod()); @@ -157,6 +160,14 @@ public void onPaymentDetailsRequired(@NonNull PaymentRequest paymentRequest, intent.putExtra(GENERATION_TIME, paymentRequest.getGenerationTime()); intent.putExtra(CVC_FIELD_STATUS, CreditCardFragmentBuilder.CvcFieldStatus.NOCVC.name()); context.startActivity(intent); + } else if (paymentRequest.getPaymentMethod().getType().equals(PaymentMethod.Type.QIWI_WALLET)) { + final Intent intent = new Intent(context, CheckoutActivity.class); + Bundle bundle = new Bundle(); + bundle.putSerializable(PAYMENT_METHOD, paymentRequest.getPaymentMethod()); + bundle.putSerializable(AMOUNT, paymentRequest.getAmount()); + bundle.putInt("fragment", CheckoutActivity.QIWI_WALLET_FRAGMENT); + intent.putExtras(bundle); + context.startActivity(intent); } else if (paymentRequest.getPaymentMethod().getType().equals(PaymentMethod.Type.PAYPAL)) { //We can set "storeDetails" to true if we want to set up a recurring contract. callback.completionWithPaymentDetails(new PaymentDetails(inputDetails)); diff --git a/adyen-ui/src/main/java/com/adyen/ui/activities/CheckoutActivity.java b/adyen-ui/src/main/java/com/adyen/ui/activities/CheckoutActivity.java index 3397e72495..a97072262f 100644 --- a/adyen-ui/src/main/java/com/adyen/ui/activities/CheckoutActivity.java +++ b/adyen-ui/src/main/java/com/adyen/ui/activities/CheckoutActivity.java @@ -21,7 +21,8 @@ import com.adyen.core.models.Amount; import com.adyen.core.models.PaymentMethod; import com.adyen.core.models.paymentdetails.CreditCardPaymentDetails; -import com.adyen.core.models.paymentdetails.IdealPaymentDetails; +import com.adyen.core.models.paymentdetails.IssuerSelectionPaymentDetails; +import com.adyen.core.models.paymentdetails.QiwiWalletPaymentDetails; import com.adyen.core.models.paymentdetails.SepaDirectDebitPaymentDetails; import com.adyen.ui.R; import com.adyen.ui.fragments.CreditCardFragment; @@ -32,6 +33,8 @@ import com.adyen.ui.fragments.LoadingScreenFragment; import com.adyen.ui.fragments.PaymentMethodSelectionFragment; import com.adyen.ui.fragments.PaymentMethodSelectionFragmentBuilder; +import com.adyen.ui.fragments.QiwiWalletFragment; +import com.adyen.ui.fragments.QiwiWalletFragmentBuilder; import com.adyen.ui.fragments.SepaDirectDebitFragment; import com.adyen.ui.fragments.SepaDirectDebitFragmentBuilder; @@ -58,6 +61,7 @@ public class CheckoutActivity extends FragmentActivity { public static final int ISSUER_SELECTION_FRAGMENT = 2; public static final int SEPA_DIRECT_DEBIT_FRAGMENT = 3; public static final int GIROPAY_FRAGMENT = 4; + public static final int QIWI_WALLET_FRAGMENT = 5; public static final int LOADING_SCREEN_FRAGMENT = 11; public static final String PREFERED_PAYMENT_METHODS = "preferredPaymentMethods"; @@ -125,11 +129,9 @@ public void onBackPressed() { if (backStackEntryCount == 0) { super.onBackPressed(); } else { - FragmentManager.BackStackEntry backEntry = getSupportFragmentManager(). - getBackStackEntryAt(backStackEntryCount - 1); + FragmentManager.BackStackEntry backEntry = getSupportFragmentManager().getBackStackEntryAt(backStackEntryCount - 1); String tag = backEntry.getName(); - if (PaymentMethodSelectionFragment.class.getName().equals(tag) - || LoadingScreenFragment.class.getName().equals(tag)) { + if (PaymentMethodSelectionFragment.class.getName().equals(tag) || LoadingScreenFragment.class.getName().equals(tag)) { final Intent cancellationIntent = new Intent(Constants.PaymentRequest.PAYMENT_REQUEST_CANCELLED_INTENT); LocalBroadcastManager.getInstance(this).sendBroadcast(cancellationIntent); finish(); @@ -160,10 +162,8 @@ private void initializeFragment(final Intent intent) { switch (fragmentId) { case PAYMENT_METHOD_SELECTION_FRAGMENT: { - final ArrayList preferredPaymentMethods = (ArrayList) bundle - .getSerializable(PREFERED_PAYMENT_METHODS); - final ArrayList paymentMethods = (ArrayList) bundle - .getSerializable(PAYMENT_METHODS); + final ArrayList preferredPaymentMethods = (ArrayList) bundle.getSerializable(PREFERED_PAYMENT_METHODS); + final ArrayList paymentMethods = (ArrayList) bundle.getSerializable(PAYMENT_METHODS); final PaymentMethodSelectionFragment paymentMethodSelectionFragment = new PaymentMethodSelectionFragmentBuilder() @@ -174,8 +174,7 @@ private void initializeFragment(final Intent intent) { public void onPaymentMethodSelected(PaymentMethod paymentMethod) { if (paymentMethod.isRedirectMethod() || (paymentMethod.isOneClick() && !paymentMethod.requiresInput())) { - final Intent intent = new Intent(context.getApplicationContext(), - TranslucentLoadingScreenActivity.class); + final Intent intent = new Intent(context.getApplicationContext(), TranslucentLoadingScreenActivity.class); context.startActivity(intent); } Intent intent = new Intent(PAYMENT_METHOD_SELECTED_INTENT); @@ -184,11 +183,7 @@ public void onPaymentMethodSelected(PaymentMethod paymentMethod) { } }) .build(); - - - replaceFragment(paymentMethodSelectionFragment); - hideKeyboard(); break; } @@ -213,21 +208,17 @@ public void onCreditCardInfoProvided(CreditCardPaymentDetails creditCardPaymentD } }) .build(); - - replaceFragment(creditCardFragment, TAG_CREDIT_CARD_FRAGMENT); - break; } case ISSUER_SELECTION_FRAGMENT: { final PaymentMethod paymentMethod = (PaymentMethod) bundle.getSerializable(PAYMENT_METHOD); - IssuerSelectionFragment issuerSelectionFragment = new IssuerSelectionFragmentBuilder() .setPaymentMethod(paymentMethod) .setIssuerSelectionListener(new IssuerSelectionFragment.IssuerSelectionListener() { @Override public void onIssuerSelected(String issuer) { - IdealPaymentDetails paymentDetails = new IdealPaymentDetails(paymentMethod.getInputDetails()); + IssuerSelectionPaymentDetails paymentDetails = new IssuerSelectionPaymentDetails(paymentMethod.getInputDetails()); paymentDetails.fillIssuer(issuer); final Intent intent = new Intent(Constants.PaymentRequest.PAYMENT_DETAILS_PROVIDED_INTENT); intent.putExtra(PAYMENT_DETAILS, paymentDetails); @@ -235,8 +226,6 @@ public void onIssuerSelected(String issuer) { } }) .build(); - - replaceFragment(issuerSelectionFragment); break; } @@ -258,10 +247,30 @@ public void onPaymentDetails(String iban, String accountHolder) { } }) .build(); - replaceFragment(sepaDirectDebitFragment); break; } + case QIWI_WALLET_FRAGMENT: { + final PaymentMethod paymentMethod = (PaymentMethod) bundle.getSerializable(PAYMENT_METHOD); + paymentMethod.getInputDetails(); + QiwiWalletFragment qiwiWalletFragment = new QiwiWalletFragmentBuilder() + .setAmount((Amount) intent.getSerializableExtra(AMOUNT)) + .setPaymentMethod(paymentMethod) + .setQiwiWalletPaymentDetailsListener(new QiwiWalletFragment.QiwiWalletPaymentDetailsListener() { + @Override + public void onPaymentDetails(String countryCode, String telephoneNumber) { + QiwiWalletPaymentDetails paymentDetails = new QiwiWalletPaymentDetails(paymentMethod.getInputDetails()); + paymentDetails.fillTelephoneNumber(countryCode, telephoneNumber); + + final Intent intent = new Intent(Constants.PaymentRequest.PAYMENT_DETAILS_PROVIDED_INTENT); + intent.putExtra(PAYMENT_DETAILS, paymentDetails); + LocalBroadcastManager.getInstance(context).sendBroadcast(intent); + } + }) + .build(); + replaceFragment(qiwiWalletFragment); + break; + } case GIROPAY_FRAGMENT: { final GiropayFragment giropayFragment = new GiropayFragment(); @@ -298,9 +307,13 @@ public void onClick(View v) { } public void setActionBarTitle(int titleId) { + setActionBarTitle(getString(titleId)); + } + + public void setActionBarTitle(String title) { ActionBar actionBar = getActionBar(); if (actionBar != null && actionBar.getCustomView() != null) { - ((TextView) actionBar.getCustomView().findViewById(R.id.action_bar_title)).setText(getString(titleId)); + ((TextView) actionBar.getCustomView().findViewById(R.id.action_bar_title)).setText(title); actionBar.show(); } } diff --git a/adyen-ui/src/main/java/com/adyen/ui/fragments/CreditCardFragment.java b/adyen-ui/src/main/java/com/adyen/ui/fragments/CreditCardFragment.java index a324041724..17d15e39f6 100644 --- a/adyen-ui/src/main/java/com/adyen/ui/fragments/CreditCardFragment.java +++ b/adyen-ui/src/main/java/com/adyen/ui/fragments/CreditCardFragment.java @@ -72,6 +72,7 @@ public class CreditCardFragment extends Fragment implements CreditCardEditText.C private CreditCardInfoListener creditCardInfoListener; private boolean oneClick; private boolean nameRequired; + private boolean storeDetailsOptionAvailable; private Amount amount; private String shopperReference; private PaymentMethod paymentMethod; @@ -124,8 +125,15 @@ public void setArguments(final Bundle args) { cvcFieldStatus = CreditCardFragmentBuilder.CvcFieldStatus.valueOf(args.getString(Constants.DataKeys.CVC_FIELD_STATUS)); for (InputDetail inputDetail : paymentMethod.getInputDetails()) { - if (inputDetail.getKey().equals("cardHolderName")) { - nameRequired = true; + if (CreditCardPaymentDetails.ADDITIONAL_DATA_CARD.equals(inputDetail.getKey())) { + if (inputDetail.getConfiguration() != null + && inputDetail.getConfiguration().containsKey(CreditCardPaymentDetails.CARD_HOLDER_NAME_REQUIRED) + && "true".equalsIgnoreCase(inputDetail.getConfiguration().get(CreditCardPaymentDetails.CARD_HOLDER_NAME_REQUIRED))) { + nameRequired = true; + } + } + if (inputDetail.getKey().equals("storeDetails")) { + storeDetailsOptionAvailable = true; } } @@ -305,7 +313,7 @@ public void onReadyStateChanged(boolean isReady) { } saveCardCheckBox = (CheckoutCheckBox) fragmentView.findViewById(R.id.save_card_checkbox); - if (!StringUtils.isEmptyOrNull(shopperReference)) { + if (!StringUtils.isEmptyOrNull(shopperReference) && storeDetailsOptionAvailable) { fragmentView.findViewById(R.id.layout_save_card).setVisibility(VISIBLE); fragmentView.findViewById(R.id.layout_click_area_save_card).setOnClickListener(new View.OnClickListener() { @Override diff --git a/adyen-ui/src/main/java/com/adyen/ui/fragments/IssuerSelectionFragment.java b/adyen-ui/src/main/java/com/adyen/ui/fragments/IssuerSelectionFragment.java index 34f92e5372..61a689b68e 100644 --- a/adyen-ui/src/main/java/com/adyen/ui/fragments/IssuerSelectionFragment.java +++ b/adyen-ui/src/main/java/com/adyen/ui/fragments/IssuerSelectionFragment.java @@ -67,7 +67,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa fragmentView = localInflater.inflate(R.layout.issuer_selection_fragment, container, false); for (InputDetail inputDetail : paymentMethod.getInputDetails()) { - if (inputDetail.getKey().equals("idealIssuer")) { + if (inputDetail.getKey().equals("idealIssuer") || inputDetail.getKey().equals("issuer")) { issuers = inputDetail.getItems(); break; } @@ -85,7 +85,7 @@ public void onItemClick(final AdapterView adapterView, final View view, final }); if (getActivity() instanceof CheckoutActivity) { - ((CheckoutActivity) getActivity()).setActionBarTitle(R.string.title_issuers); + ((CheckoutActivity) getActivity()).setActionBarTitle(paymentMethod.getName()); } return fragmentView; } diff --git a/adyen-ui/src/main/java/com/adyen/ui/fragments/QiwiWalletFragment.java b/adyen-ui/src/main/java/com/adyen/ui/fragments/QiwiWalletFragment.java new file mode 100644 index 0000000000..7958992290 --- /dev/null +++ b/adyen-ui/src/main/java/com/adyen/ui/fragments/QiwiWalletFragment.java @@ -0,0 +1,119 @@ +package com.adyen.ui.fragments; + +import android.content.Context; +import android.os.Bundle; +import android.support.annotation.Nullable; +import android.support.v4.app.Fragment; +import android.view.ContextThemeWrapper; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ArrayAdapter; +import android.widget.Button; +import android.widget.EditText; +import android.widget.Spinner; +import android.widget.TextView; + +import com.adyen.core.models.Amount; +import com.adyen.core.models.PaymentMethod; +import com.adyen.core.models.paymentdetails.InputDetail; +import com.adyen.core.utils.AmountUtil; +import com.adyen.core.utils.StringUtils; +import com.adyen.ui.R; +import com.adyen.ui.activities.CheckoutActivity; + +import java.util.Collection; + + +/** + * Fragment for collecting payment details for Qiwi Wallet + * Should be instantiated via {@link QiwiWalletFragmentBuilder}. + */ +public class QiwiWalletFragment extends Fragment { + + private PaymentMethod paymentMethod; + private Amount amount; + + private int theme; + + private QiwiWalletPaymentDetailsListener qiwiWalletPaymentDetailsListener; + + /** + * Use {@link QiwiWalletFragmentBuilder} instead. + */ + public QiwiWalletFragment() { + //Default empty constructor + } + + + public interface QiwiWalletPaymentDetailsListener { + void onPaymentDetails(String countryCode, String telephoneNumber); + } + + @Override + public void setArguments(Bundle args) { + super.setArguments(args); + amount = (Amount) args.get(CheckoutActivity.AMOUNT); + + paymentMethod = (PaymentMethod) args.getSerializable(CheckoutActivity.PAYMENT_METHOD); + + theme = args.getInt("theme"); + + } + + @Nullable + @Override + public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, + @Nullable Bundle savedInstanceState) { + final View fragmentView; + final Context contextThemeWrapper = new ContextThemeWrapper(getActivity(), theme); + LayoutInflater localInflater = inflater.cloneInContext(contextThemeWrapper); + fragmentView = localInflater.inflate(R.layout.qiwi_wallet_fragment, container, false); + + + final EditText telephoneNumber = (EditText) fragmentView.findViewById(R.id.telephone_number_edit_text); + + final Spinner countryCode = (Spinner) fragmentView.findViewById(R.id.country_code_spinner); + + Collection inputDetails = paymentMethod.getInputDetails(); + for (InputDetail inputDetail : inputDetails) { + if ("qiwiwallet.telephoneNumberPrefix".equals(inputDetail.getKey())) { + java.util.ArrayList countryCodes = new java.util.ArrayList<>(); + for (InputDetail.Item country : inputDetail.getItems()) { + countryCodes.add(country.getName() + " (" + country.getId() + ")"); + } + ArrayAdapter adapter = new ArrayAdapter<>(getActivity(), android.R.layout.select_dialog_item, countryCodes); + countryCode.setAdapter(adapter); + + // TODO: Use a proper list adapter here to get rid of string magic below. + } + } + + final Button confirmButton = (Button) fragmentView.findViewById(R.id.collect_direct_debit_data); + confirmButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + String countryCodeString = countryCode.getSelectedItem().toString(); + String strippedCountryCode = countryCodeString.substring(countryCodeString.indexOf("+"), countryCodeString.indexOf(")")); + qiwiWalletPaymentDetailsListener.onPaymentDetails(strippedCountryCode, telephoneNumber.getText().toString()); + } + }); + confirmButton.setEnabled(true); + + final TextView amountTextview = (TextView) fragmentView.findViewById(R.id.amount_text_view); + final String valueString = AmountUtil.format(amount, true, StringUtils.getLocale(getActivity())); + final String amountString = getString(R.string.pay_with_amount, valueString); + amountTextview.setText(amountString); + + if (getActivity() instanceof CheckoutActivity) { + ((CheckoutActivity) getActivity()).setActionBarTitle(R.string.title_qiwi_wallet); + } + + return fragmentView; + } + + void setQiwiWalletPaymentDetailsListener(QiwiWalletPaymentDetailsListener listener) { + this.qiwiWalletPaymentDetailsListener = listener; + } + +} diff --git a/adyen-ui/src/main/java/com/adyen/ui/fragments/QiwiWalletFragmentBuilder.java b/adyen-ui/src/main/java/com/adyen/ui/fragments/QiwiWalletFragmentBuilder.java new file mode 100644 index 0000000000..067e484266 --- /dev/null +++ b/adyen-ui/src/main/java/com/adyen/ui/fragments/QiwiWalletFragmentBuilder.java @@ -0,0 +1,92 @@ +package com.adyen.ui.fragments; + +import android.os.Bundle; + +import com.adyen.core.models.Amount; +import com.adyen.core.models.PaymentMethod; +import com.adyen.ui.R; +import com.adyen.ui.activities.CheckoutActivity; + +import static com.adyen.core.constants.Constants.DataKeys.AMOUNT; + +/** + * Builder to create {@link QiwiWalletFragment}. + */ +public class QiwiWalletFragmentBuilder { + private PaymentMethod paymentMethod; + private Amount amount; + + private int theme = R.style.AdyenTheme; + + private QiwiWalletFragment.QiwiWalletPaymentDetailsListener qiwiWalletPaymentDetailsListener; + + public QiwiWalletFragmentBuilder() { + + } + + public QiwiWalletFragmentBuilder setPaymentMethod(final PaymentMethod paymentMethod) { + this.paymentMethod = paymentMethod; + return this; + } + + /** + * Set the {@link Amount} of this payment. + * This is only to display the amount in the ui. + * @param amount The {@link Amount} to be displayed to the user. + * @return CreditCardFragmentBuilder + */ + public QiwiWalletFragmentBuilder setAmount(final Amount amount) { + this.amount = amount; + return this; + } + + /** + * Set the theme that should be applied to the generated fragment. + * If not set the default Adyen style will be applied. + * @param theme The theme that should be applied. + * @return QiwiWalletFragmentBuilder + */ + public QiwiWalletFragmentBuilder setTheme(final int theme) { + this.theme = theme; + return this; + } + + public QiwiWalletFragmentBuilder setQiwiWalletPaymentDetailsListener(QiwiWalletFragment.QiwiWalletPaymentDetailsListener listener) { + this.qiwiWalletPaymentDetailsListener = listener; + return this; + } + + /** + * Build the {@link QiwiWalletFragment}. + * This will fail with {@link IllegalStateException} if one or more mandatory parameters have not been set. + * @return The fragment that can be displayed in the ui. + */ + public QiwiWalletFragment build() { + checkParameters(); + + QiwiWalletFragment fragment = new QiwiWalletFragment(); + Bundle bundle = new Bundle(); + bundle.putSerializable(CheckoutActivity.PAYMENT_METHOD, paymentMethod); + bundle.putSerializable(AMOUNT, amount); + bundle.putInt("theme", theme); + + fragment.setArguments(bundle); + fragment.setQiwiWalletPaymentDetailsListener(qiwiWalletPaymentDetailsListener); + + return fragment; + } + + private void checkParameters() { + if (amount == null) { + throw new IllegalStateException("Amount not set."); + } + + if (paymentMethod == null) { + throw new IllegalStateException("PaymentMethod not set."); + } + + if (qiwiWalletPaymentDetailsListener == null) { + throw new IllegalStateException("QiwiWalletPaymentDataListener not set."); + } + } +} diff --git a/adyen-ui/src/main/res/layout/qiwi_wallet_fragment.xml b/adyen-ui/src/main/res/layout/qiwi_wallet_fragment.xml new file mode 100644 index 0000000000..9546a70f53 --- /dev/null +++ b/adyen-ui/src/main/res/layout/qiwi_wallet_fragment.xml @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/adyen-ui/src/main/res/values/strings.xml b/adyen-ui/src/main/res/values/strings.xml index b29c0cf6cc..2a124f117f 100644 --- a/adyen-ui/src/main/res/values/strings.xml +++ b/adyen-ui/src/main/res/values/strings.xml @@ -14,9 +14,12 @@ Payment Methods Bank account number (IBAN) NL53 ABNA 1925 1294 122 + Country code + Telephone number + 0123456789 - iDeal SEPA Direct Debit + Qiwi Wallet I agree that the amount below will be debited from my bank account. Giropay Bankname / BIC / Bankleitzahl diff --git a/app/libs/adyencse-1.0.0.aar b/app/libs/adyencse-1.0.0.aar deleted file mode 100644 index 95d470bce2..0000000000 Binary files a/app/libs/adyencse-1.0.0.aar and /dev/null differ diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml deleted file mode 100644 index 61642a081b..0000000000 --- a/app/src/main/res/layout/activity_main.xml +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build.gradle b/build.gradle index 52d61c3718..c781020e14 100644 --- a/build.gradle +++ b/build.gradle @@ -30,8 +30,8 @@ ext { minSdkVersion = 16 targetSdkVersion = 25 - versionCode = 15 - versionName = "1.12.0" + versionCode = 16 + versionName = "1.13.0" release_debuggable = false release_minifyEnabled = false @@ -235,6 +235,7 @@ task generateJavadoc(type: Javadoc) { include('**/CreditCardPaymentDetails.java') include('**/CVCOnlyPaymentDetails.java') include('**/IdealPaymentDetails.java') + include('**/IssuerSelectionPaymentDetails.java') include('**/SepaDirectDebitPaymentDetails.java') include('**/InputDetail.java') diff --git a/checkoutdemo/build.gradle b/checkoutdemo/build.gradle index cab09ad877..96b819e966 100644 --- a/checkoutdemo/build.gradle +++ b/checkoutdemo/build.gradle @@ -37,8 +37,8 @@ dependencies { }) compile "com.android.support:appcompat-v7:${rootProject.supportLibVersion}" testCompile "junit:junit:${rootProject.jUnitVersion}" - compile 'com.adyen.checkout:core:1.12.0' - compile 'com.adyen.checkout:ui:1.12.0' - compile 'com.adyen.checkout:utils:1.12.0' - compile 'com.adyen.checkout:cardscan:1.12.0' + compile 'com.adyen.checkout:core:1.13.0' + compile 'com.adyen.checkout:ui:1.13.0' + compile 'com.adyen.checkout:utils:1.13.0' + compile 'com.adyen.checkout:cardscan:1.13.0' } diff --git a/customuiapplication/src/main/java/com/adyen/customuiapplication/MainActivity.java b/customuiapplication/src/main/java/com/adyen/customuiapplication/MainActivity.java index 88dfb98e10..44bb10715b 100644 --- a/customuiapplication/src/main/java/com/adyen/customuiapplication/MainActivity.java +++ b/customuiapplication/src/main/java/com/adyen/customuiapplication/MainActivity.java @@ -26,7 +26,7 @@ import com.adyen.core.models.PaymentRequestResult; import com.adyen.core.models.paymentdetails.CVCOnlyPaymentDetails; import com.adyen.core.models.paymentdetails.CreditCardPaymentDetails; -import com.adyen.core.models.paymentdetails.IdealPaymentDetails; +import com.adyen.core.models.paymentdetails.IssuerSelectionPaymentDetails; import com.adyen.core.models.paymentdetails.InputDetail; import com.adyen.core.models.paymentdetails.InputDetailsUtil; import com.adyen.core.utils.AsyncHttpClient; @@ -149,10 +149,10 @@ public void onCreditCardInfoProvided(String creditCardInfo) { alertDialog.setSingleChoiceItems(issuerListAdapter, -1, new DialogInterface.OnClickListener() { @Override public void onClick(@NonNull final DialogInterface dialogInterface, final int i) { - IdealPaymentDetails idealPaymentDetails = new IdealPaymentDetails(inputDetails); - idealPaymentDetails.fillIssuer(issuers.get(i)); + IssuerSelectionPaymentDetails issuerSelectionPaymentDetails = new IssuerSelectionPaymentDetails(inputDetails); + issuerSelectionPaymentDetails.fillIssuer(issuers.get(i)); dialogInterface.dismiss(); - callback.completionWithPaymentDetails(idealPaymentDetails); + callback.completionWithPaymentDetails(issuerSelectionPaymentDetails); } }); alertDialog.show(); diff --git a/customwithcheckoutui/src/main/java/com/example/customwithcheckoutui/MainActivity.java b/customwithcheckoutui/src/main/java/com/example/customwithcheckoutui/MainActivity.java index 0b4619f356..1dfc4e7cdf 100644 --- a/customwithcheckoutui/src/main/java/com/example/customwithcheckoutui/MainActivity.java +++ b/customwithcheckoutui/src/main/java/com/example/customwithcheckoutui/MainActivity.java @@ -23,7 +23,7 @@ import com.adyen.core.models.PaymentMethod; import com.adyen.core.models.PaymentRequestResult; import com.adyen.core.models.paymentdetails.CreditCardPaymentDetails; -import com.adyen.core.models.paymentdetails.IdealPaymentDetails; +import com.adyen.core.models.paymentdetails.IssuerSelectionPaymentDetails; import com.adyen.core.models.paymentdetails.InputDetail; import com.adyen.core.models.paymentdetails.SepaDirectDebitPaymentDetails; import com.adyen.core.utils.AsyncHttpClient; @@ -141,9 +141,9 @@ public void onCreditCardInfoProvided(CreditCardPaymentDetails creditCardPaymentD .setIssuerSelectionListener(new IssuerSelectionFragment.IssuerSelectionListener() { @Override public void onIssuerSelected(String issuer) { - IdealPaymentDetails idealPaymentDetails = new IdealPaymentDetails(inputDetails); - idealPaymentDetails.fillIssuer(issuer); - callback.completionWithPaymentDetails(idealPaymentDetails); + IssuerSelectionPaymentDetails issuerSelectionPaymentDetails = new IssuerSelectionPaymentDetails(inputDetails); + issuerSelectionPaymentDetails.fillIssuer(issuer); + callback.completionWithPaymentDetails(issuerSelectionPaymentDetails); } }) .build(); diff --git a/app/build.gradle b/defaultApp/build.gradle similarity index 100% rename from app/build.gradle rename to defaultApp/build.gradle diff --git a/app/proguard-rules.pro b/defaultApp/proguard-rules.pro similarity index 100% rename from app/proguard-rules.pro rename to defaultApp/proguard-rules.pro diff --git a/app/src/androidTest/AndroidManifest.xml b/defaultApp/src/androidTest/AndroidManifest.xml similarity index 100% rename from app/src/androidTest/AndroidManifest.xml rename to defaultApp/src/androidTest/AndroidManifest.xml diff --git a/app/src/androidTest/java/com/adyen/checkout/CardNumberService.java b/defaultApp/src/androidTest/java/com/adyen/checkout/CardNumberService.java similarity index 100% rename from app/src/androidTest/java/com/adyen/checkout/CardNumberService.java rename to defaultApp/src/androidTest/java/com/adyen/checkout/CardNumberService.java diff --git a/app/src/androidTest/java/com/adyen/checkout/IbanNumberService.java b/defaultApp/src/androidTest/java/com/adyen/checkout/IbanNumberService.java similarity index 100% rename from app/src/androidTest/java/com/adyen/checkout/IbanNumberService.java rename to defaultApp/src/androidTest/java/com/adyen/checkout/IbanNumberService.java diff --git a/app/src/androidTest/java/com/adyen/checkout/PaymentAppTest.java b/defaultApp/src/androidTest/java/com/adyen/checkout/PaymentAppTest.java similarity index 99% rename from app/src/androidTest/java/com/adyen/checkout/PaymentAppTest.java rename to defaultApp/src/androidTest/java/com/adyen/checkout/PaymentAppTest.java index 2c051cea38..418d42c9bb 100644 --- a/app/src/androidTest/java/com/adyen/checkout/PaymentAppTest.java +++ b/defaultApp/src/androidTest/java/com/adyen/checkout/PaymentAppTest.java @@ -382,7 +382,7 @@ public void testActionBarTitle() throws Exception { waitForText("Payment Methods"); waitForText("Payment Methods"); onView(withText(equalToIgnoringCase("iDEAL"))).perform(scrollTo(), click()); - waitForText("iDeal"); + waitForText("iDEAL"); Espresso.pressBack(); waitForText("Payment Methods"); } diff --git a/app/src/main/AndroidManifest.xml b/defaultApp/src/main/AndroidManifest.xml similarity index 100% rename from app/src/main/AndroidManifest.xml rename to defaultApp/src/main/AndroidManifest.xml diff --git a/app/src/main/java/com/adyen/checkout/MainActivity.java b/defaultApp/src/main/java/com/adyen/checkout/MainActivity.java similarity index 96% rename from app/src/main/java/com/adyen/checkout/MainActivity.java rename to defaultApp/src/main/java/com/adyen/checkout/MainActivity.java index 35c4c01319..e022878715 100644 --- a/app/src/main/java/com/adyen/checkout/MainActivity.java +++ b/defaultApp/src/main/java/com/adyen/checkout/MainActivity.java @@ -149,8 +149,8 @@ private String getSetupDataString(final String token) { amount.put("currency", paymentSetupRequest.getAmount().getCurrency()); jsonObject.put("amount", amount); jsonObject.put("channel", "Android"); - jsonObject.put("reference", "Android Checkout SDK Payment: " + System.currentTimeMillis()); - jsonObject.put("shopperReference", "example-customer@exampleprovider"); + jsonObject.put("reference", paymentSetupRequest.getReference()); + jsonObject.put("shopperReference", paymentSetupRequest.getShopperReference()); try { short maxNumberOfInstallments = Short.parseShort(paymentSetupRequest.getMaxNumberOfInstallments()); if (maxNumberOfInstallments > 1) { @@ -192,7 +192,8 @@ public void onSuccess(final byte[] response) { JSONObject jsonVerifyResponse = new JSONObject(new String(response, Charset.forName("UTF-8"))); String authResponse = jsonVerifyResponse.getString("authResponse"); if (authResponse.equalsIgnoreCase(payment.getPaymentStatus().toString())) { - resultString = "Payment is " + payment.getPaymentStatus().toString().toLowerCase() + " and verified."; + resultString = "Payment is " + payment.getPaymentStatus().toString().toLowerCase() + " and verified. Reference: " + + jsonVerifyResponse.getString("merchantReference"); } else { resultString = "Failed to verify payment."; } diff --git a/app/src/main/java/com/adyen/checkout/MyPaymentCardScannerFactory.java b/defaultApp/src/main/java/com/adyen/checkout/MyPaymentCardScannerFactory.java similarity index 100% rename from app/src/main/java/com/adyen/checkout/MyPaymentCardScannerFactory.java rename to defaultApp/src/main/java/com/adyen/checkout/MyPaymentCardScannerFactory.java diff --git a/app/src/main/java/com/adyen/checkout/PaymentDataEntryFragment.java b/defaultApp/src/main/java/com/adyen/checkout/PaymentDataEntryFragment.java similarity index 76% rename from app/src/main/java/com/adyen/checkout/PaymentDataEntryFragment.java rename to defaultApp/src/main/java/com/adyen/checkout/PaymentDataEntryFragment.java index 32381c1f09..68c8b4e3fc 100644 --- a/app/src/main/java/com/adyen/checkout/PaymentDataEntryFragment.java +++ b/defaultApp/src/main/java/com/adyen/checkout/PaymentDataEntryFragment.java @@ -71,21 +71,25 @@ public void onClick(final View view) { @NonNull private PaymentSetupRequest buildPaymentRequest(final View view) throws ParseException { Log.v(TAG, "buildPaymentRequest()"); - PaymentSetupRequest paymentRequest = new PaymentSetupRequest(); + PaymentSetupRequest paymentSetupRequest = new PaymentSetupRequest(); + paymentSetupRequest.setMerchantAccount(((EditText) view.findViewById(R.id.merchantAccountEntry)).getText() + .toString()); final String amountValueString = ((EditText) view.findViewById(R.id.orderAmountEntry)).getText().toString(); final String amountCurrencyString = ((EditText) view.findViewById(R.id.orderCurrencyEntry)) .getText().toString(); - paymentRequest.setAmount(new Amount(AmountUtil.parseMajorAmount(amountCurrencyString, amountValueString), + paymentSetupRequest.setAmount(new Amount(AmountUtil.parseMajorAmount(amountCurrencyString, amountValueString), amountCurrencyString)); - paymentRequest.setCountryCode(((EditText) view.findViewById(R.id.countryEntry)).getText().toString()); - paymentRequest.setShopperLocale(((EditText) view.findViewById(R.id.shopperLocaleEntry)).getText().toString()); - paymentRequest.setMerchantAccount(((EditText) view.findViewById(R.id.merchantAccountEntry)).getText() + paymentSetupRequest.setCountryCode(((EditText) view.findViewById(R.id.countryEntry)).getText().toString()); + paymentSetupRequest.setShopperLocale(((EditText) view.findViewById(R.id.shopperLocaleEntry)).getText().toString()); + paymentSetupRequest.setShopperReference(((EditText) view.findViewById(R.id.shopperReferenceEntry)).getText() + .toString()); + paymentSetupRequest.setReference(((EditText) view.findViewById(R.id.referenceEntry)).getText() .toString()); String maxNumberOfInstallments = ((String) ((Spinner) view.findViewById(R.id.installmentsEntry)).getSelectedItem()); - paymentRequest.setMaxNumberOfInstallments(maxNumberOfInstallments); + paymentSetupRequest.setMaxNumberOfInstallments(maxNumberOfInstallments); - return paymentRequest; + return paymentSetupRequest; } } diff --git a/app/src/main/java/com/adyen/checkout/PaymentResultActivity.java b/defaultApp/src/main/java/com/adyen/checkout/PaymentResultActivity.java similarity index 100% rename from app/src/main/java/com/adyen/checkout/PaymentResultActivity.java rename to defaultApp/src/main/java/com/adyen/checkout/PaymentResultActivity.java diff --git a/app/src/main/java/com/adyen/checkout/PaymentSetupRequest.java b/defaultApp/src/main/java/com/adyen/checkout/PaymentSetupRequest.java similarity index 74% rename from app/src/main/java/com/adyen/checkout/PaymentSetupRequest.java rename to defaultApp/src/main/java/com/adyen/checkout/PaymentSetupRequest.java index 1b2c3c060f..73c9ea7d98 100644 --- a/app/src/main/java/com/adyen/checkout/PaymentSetupRequest.java +++ b/defaultApp/src/main/java/com/adyen/checkout/PaymentSetupRequest.java @@ -8,6 +8,8 @@ public class PaymentSetupRequest { private String shopperLocale; private String merchantAccount; private String countryCode; + private String reference; + private String shopperReference; private String maxNumberOfInstallments; public Amount getAmount() { @@ -42,6 +44,22 @@ public void setCountryCode(final String countryCode) { this.countryCode = countryCode; } + public String getReference() { + return reference; + } + + public void setReference(String reference) { + this.reference = reference; + } + + public String getShopperReference() { + return shopperReference; + } + + public void setShopperReference(String shopperReference) { + this.shopperReference = shopperReference; + } + public String getMaxNumberOfInstallments() { return maxNumberOfInstallments; } diff --git a/app/src/main/res/drawable/ic_camera_alt_black_24dp.xml b/defaultApp/src/main/res/drawable/ic_camera_alt_black_24dp.xml similarity index 100% rename from app/src/main/res/drawable/ic_camera_alt_black_24dp.xml rename to defaultApp/src/main/res/drawable/ic_camera_alt_black_24dp.xml diff --git a/defaultApp/src/main/res/layout/activity_main.xml b/defaultApp/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000000..f5200b63a5 --- /dev/null +++ b/defaultApp/src/main/res/layout/activity_main.xml @@ -0,0 +1,234 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/verification_activity.xml b/defaultApp/src/main/res/layout/verification_activity.xml similarity index 100% rename from app/src/main/res/layout/verification_activity.xml rename to defaultApp/src/main/res/layout/verification_activity.xml diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/defaultApp/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from app/src/main/res/mipmap-hdpi/ic_launcher.png rename to defaultApp/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/defaultApp/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from app/src/main/res/mipmap-mdpi/ic_launcher.png rename to defaultApp/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/defaultApp/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to defaultApp/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/defaultApp/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to defaultApp/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/defaultApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from app/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to defaultApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/app/src/main/res/values-w820dp/dimens.xml b/defaultApp/src/main/res/values-w820dp/dimens.xml similarity index 100% rename from app/src/main/res/values-w820dp/dimens.xml rename to defaultApp/src/main/res/values-w820dp/dimens.xml diff --git a/app/src/main/res/values/colors.xml b/defaultApp/src/main/res/values/colors.xml similarity index 100% rename from app/src/main/res/values/colors.xml rename to defaultApp/src/main/res/values/colors.xml diff --git a/app/src/main/res/values/dimens.xml b/defaultApp/src/main/res/values/dimens.xml similarity index 100% rename from app/src/main/res/values/dimens.xml rename to defaultApp/src/main/res/values/dimens.xml diff --git a/app/src/main/res/values/strings.xml b/defaultApp/src/main/res/values/strings.xml similarity index 100% rename from app/src/main/res/values/strings.xml rename to defaultApp/src/main/res/values/strings.xml diff --git a/app/src/main/res/values/styles.xml b/defaultApp/src/main/res/values/styles.xml similarity index 100% rename from app/src/main/res/values/styles.xml rename to defaultApp/src/main/res/values/styles.xml diff --git a/settings.gradle b/settings.gradle index 9835fe2b4d..3725b65743 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1 @@ -include ':app', ':adyen-core', ':adyen-ui', ':adyen-androidpay', ':customuiapplication', ':testutils', ':checkoutdemo', ':customwithcheckoutui', ':adyen-utils', ':adyen-cardscan' +include ':adyen-core', ':adyen-ui', ':adyen-utils', ':adyen-cardscan', ':adyen-androidpay', ':testutils', ':customuiapplication', ':checkoutdemo', ':customwithcheckoutui', ':defaultApp' \ No newline at end of file