adyen / adyen-android Goto Github PK
View Code? Open in Web Editor NEWAdyen Android Drop-in and Components
Home Page: https://docs.adyen.com/checkout/android
License: MIT License
Adyen Android Drop-in and Components
Home Page: https://docs.adyen.com/checkout/android
License: MIT License
Hi there,
We are in the midst of completing payment integration for an Android app (native Adyen checkout UI).
We urgently need some direction on where we can find documentation either on handling redirects or completing 3D Secure payments on Android. We have tried looking for it at both your Android SDK Guide as well as your repository.
In the iOS SDK Guide, there is a section on handling redirects which would have the app call Adyen.applicationDidOpen(url)
method. There is no such section in the Android SDK Guide.
Is there an equivalent on Android? Based on our experience dealing with other SDKs which require redirects handling, we minimally need to have an activity declared in the project's manifest with intent filters to handle incoming links. In our case, we would minimally have to have an entry in our app's AndroidManifest.xml
to handle the link specified as the return_url
parameter when preparing payment session.
I saw that there is a RedirectHandlerActivity in the checkout-ui package. In the PaymentHandler
interface, there is also a method named handleRedirectResult()
which takes in a URI. Should we be using any of these? If not, how can the Android app handle the response payload and result in the returning intent's data?
Thanks in advance for your help.
Hi guys! We successfully integrated your library, customized the UI, but we are also requested to change the core flow of the payment. In particular, user should choose/edit payment method on a separate screen before actually going to the checkout. Currently we doesn't see any other way except of requesting payment methods with temporary orderId, then cancelling this request, and then creating the new final request. We also understand that there may be some risks as it is not native library flow. Please help, we need your advice and recommendation.
Thanks in advance,
Maryna
Hi, We want to integrate android-pay using the adyen-android SDK, but it seems it requires manual work.
I did see this code: https://github.com/Adyen/adyen-android/tree/master/adyen-androidpay
How do we integrate it? Does it needs custom work? Where do i place the android pay certificate?
Values for merchantServerUrl, merchantApiSecretKey & merchantApiHeaderKeyForApiSecretKey are set.
Wehn running app and pressing pay button app crashes:
// Add the URL for your server here; or you can use the demo server of Adyen:
https://checkoutshopper-test.adyen.com/checkoutshopper/demoserver/
private String merchantServerUrl = "https://checkoutshopper-test.adyen.com/checkoutshopper/demoserver/";
// Add the api secret key for your server here; you can retrieve this key from customer area.
private String merchantApiSecretKey = "0101578***etc***DCB5588C48224C6007";
// Add the header key for merchant server api secret key here; e.g. "x-demo-server-api-key"
private String merchantApiHeaderKeyForApiSecretKey = "x-demo-server-api-key";
Logcat output:
com.adyen.customuiapplication V/PaymentDataEntryFragment: buildPaymentRequest()
09-29 09:28:58.375 25978-25978/com.adyen.customuiapplication E/art: ClassLinker::FindClass not found:Lorg/jacoco/agent/rt/internal_b0d6a23/Offline;
09-29 09:28:58.378 25978-25978/com.adyen.customuiapplication E/art: ClassLinker::FindClass not found:Lorg/jacoco/agent/rt/internal_b0d6a23/Offline;
09-29 09:28:58.385 25978-25978/com.adyen.customuiapplication E/art: ClassLinker::FindClass not found:Lorg/jacoco/agent/rt/internal_b0d6a23/Offline;
09-29 09:28:58.387 25978-25978/com.adyen.customuiapplication D/AndroidRuntime: Shutting down VM
09-29 09:28:58.388 25978-25978/com.adyen.customuiapplication E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.adyen.customuiapplication, PID: 25978
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/jacoco/agent/rt/internal_b0d6a23/Offline;
at com.adyen.core.utils.AmountUtil.$jacocoInit(AmountUtil.java:0)
at com.adyen.core.utils.AmountUtil.(AmountUtil.java)
at com.adyen.core.utils.AmountUtil.parseMajorAmount(AmountUtil.java:0)
at com.adyen.customuiapplication.PaymentDataEntryFragment.buildPaymentRequest(PaymentDataEntryFragment.java:77)
at com.adyen.customuiapplication.PaymentDataEntryFragment.access$200(PaymentDataEntryFragment.java:22)
at com.adyen.customuiapplication.PaymentDataEntryFragment$1.onClick(PaymentDataEntryFragment.java:58)
at android.view.View.performClick(View.java:4848)
at android.view.View$PerformClick.run(View.java:20300)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5690)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:963)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:758)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.jacoco.agent.rt.internal_b0d6a23.Offline" on path: DexPathList[[zip file "/data/app/com.adyen.customuiapplication-1/base.apk", zip file "/data/app/com.adyen.customuiapplication-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.adyen.customuiapplication-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.adyen.customuiapplication-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.adyen.customuiapplication-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.adyen.customuiapplication-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.adyen.customuiapplication-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.adyen.customuiapplication-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.adyen.customuiapplication-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.adyen.customuiapplication-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.adyen.customuiapplication-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.adyen.customuiapplication-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.adyen.core.utils.AmountUtil.$jacocoInit(AmountUtil.java:0)
at com.adyen.core.utils.AmountUtil.(AmountUtil.java)
at com.adyen.core.utils.AmountUtil.parseMajorAmount(AmountUtil.java:0)
at com.adyen.customuiapplication.PaymentDataEntryFragment.buildPaymentRequest(PaymentDataEntryFragment.java:77)
at com.adyen.customuiapplication.PaymentDataEntryFragment.access$200(PaymentDataEntryFragment.java:22)
at com.adyen.customuiapplication.PaymentDataEntryFragment$1.onClick(PaymentDataEntryFragment.java:58)
at android.view.View.performClick(View.java:4848)
at android.view.View$PerformClick.run(View.java:20300)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5690)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:963)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:758)
Suppressed: java.lang.ClassNotFoundException: org.jacoco.agent.rt.internal_b0d6a23.Offline
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
Adding the latest adyen 2.0.2 libraries results in the below compile error :
buildToolsVersion = "27.0.3"
minSdkVersion = 21
compileSdkVersion = 27
targetSdkVersion = 27
supportLibVersion = "27.1.0"
implementation 'com.adyen.checkout:core:2.0.2'
implementation 'com.adyen.checkout:ui:2.0.2'
AAPT: No resource found that matches the given name (at 'nextFocusDown' with value '@id/spinner_installments').
AAPT: No resource found that matches the given name (at 'nextFocusForward' with value '@id/spinner_installments').
AAPT: No resource found that matches the given name (at 'nextFocusDown' with value '@id/switchCompat_storeDetails').
AAPT: No resource found that matches the given name (at 'nextFocusForward' with value '@id/switchCompat_storeDetails').
Hi,
How can I disable "sepa direct debit" choice when start CheckoutActivity without implements custom integrations?
I see in latest version there is a field blockedPaymentMethods = ['sepadirectdebit'] to achieve it but I use api version v32.
https://docs.adyen.com/api-explorer/#/PaymentSetupAndVerificationService/v32/paymentSession
Thanks
Fabio
We have just updated our android SDK to 2.3 to be able to support the 3DS for Google Pay.
Works great but when you press continue in the Google Pay view, the view gets dismissed and you wait for 3 seconds with Adyen bottom sheet up and no loading indicators before the redirect is happening.
I feel that a loading state is required for the user.
It's not clear, how can I customize default provided UI, e.g. change colors.
For iOS, there is AppearanceConfiguration
object, which allows such stuff.
Hi,
How can I disable "sepa direct debit" choice when start CheckoutActivity without implements custom integrations?
Thanks
Hi,
i am doing a bridge to communicate with my react-native app.
Whenever i initialise PaymentRequest, i need to pass in Context and PaymentRequestListener
public PaymentRequest(@NonNull final Context context,
@NonNull final PaymentRequestListener paymentRequestListener)
Is there any way i can perform my custom react-native bridge callback from onPaymentResult in PaymentRequestListener?
Thanks!
Would like to check if we built a react-native wrapper around your library
like what this library: https://github.com/tipsi/tipsi-stripe did for stripe
will we still qualify under PCI SAQ A compliance?
and is it possible to share with me why?
We are getting crash reports of users, due to the adyen-android sdk.
Its due to the fact that the Fragments (and specifically the CVCDialog) is not properly storing the instance state (CVCDialog.paymentMethod in this case), causing a NullPointerException after the Fragment gets created from a savedInstanceState again.
Similar issue as this one:
#5
(but not a complete duplicate)
Full crash
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tiqets.tiqetsapp/com.adyen.ui.activities.TranslucentDialogActivity}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2118) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2145) at android.app.ActivityThread.access$600(ActivityThread.java:130) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1211) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4847) at java.lang.reflect.Method.invokeNative(Method.java) at java.lang.reflect.Method.invoke(Method.java:535) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) at dalvik.system.NativeStart.main(NativeStart.java) Caused by java.lang.NullPointerException at com.adyen.ui.views.CVCDialog.onCreate(SourceFile:59) at android.app.Dialog.dispatchOnCreate(Dialog.java:385) at android.app.Dialog.show(Dialog.java:278) at com.adyen.ui.activities.TranslucentDialogActivity.setupDialog(SourceFile:58) at com.adyen.ui.activities.TranslucentDialogActivity.onCreate(SourceFile:31) at android.app.Activity.performCreate(Activity.java:5187) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2064) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2145) at android.app.ActivityThread.access$600(ActivityThread.java:130) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1211) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4847) at java.lang.reflect.Method.invokeNative(Method.java) at java.lang.reflect.Method.invoke(Method.java:535) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) at dalvik.system.NativeStart.main(NativeStart.java)
Its unclear where to find the "app id" and the "merchant server secret" for testing payments in app without a backend.
This also doesnt help me:
https://checkoutshopper-test.adyen.com/checkoutshopper/demoserver/
Where exactly can this be found?
It crashes on Android 5 & 6 with:
android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
java.lang.IllegalStateException: Could not execute method of the activity
at android.view.View$1.onClick(View.java:4020)
at android.view.View.performClick(View.java:4780)
at android.view.View$PerformClick.run(View.java:19866)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at android.view.View$1.onClick(View.java:4015)
at android.view.View.performClick(View.java:4780)
at android.view.View$PerformClick.run(View.java:19866)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) Caused by: android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
at android.app.ContextImpl.startActivity(ContextImpl.java:1238)
at android.app.ContextImpl.startActivity(ContextImpl.java:1225)
at android.content.ContextWrapper.startActivity(ContextWrapper.java:323)
at com.adyen.ui.DefaultPaymentRequestListener.onPaymentDataRequested(DefaultPaymentRequestListener.java:34)
at com.adyen.core.PaymentStateHandler.requestPaymentData(PaymentStateHandler.java:190)
at com.adyen.core.PaymentStateHandler.onStateChanged(PaymentStateHandler.java:120)
at com.adyen.core.internals.PaymentProcessorStateMachine.onStateChanged(PaymentProcessorStateMachine.java:26)
at com.adyen.core.internals.PaymentProcessorStateMachine.onTrigger(PaymentProcessorStateMachine.java:39)
at com.adyen.core.PaymentRequest.start(PaymentRequest.java:60)
What Androd Versions does this SDK support.
We (at Tiqets.com) integrated it, but the payment flow fails for Android VersionCode 19.
Can you explicitly mention which versions are supported?
The demo server can no longer be used.
Since yesterday I get a server error 500.
The URL that was used is right below:
https://checkoutshopper-test.adyen.com/checkoutshopper/demoserver/setup
Only for the Web-SDK it works properly !
Hello! I am facing a little issue with my integration: i want the user to be required to send the cardholder's name on the credit card payment. I am sending in the Json of my paymentRequestSetup the field cardHolderName as "REQUIRED". When i user my test/development credentials, it works just fine and show the field for user to input name. But when i send it with my production credentials, it does not =/.
I'm sending below a print of my code and the credit card screen:
Thank's in advance for your attention.
Best Regards.
Was the option for Credit Card Scan removed in version 2?
Link to in-app integration guide throws 404: https://github.com/Adyen/adyen-android
Hi,
I am using CreditCardFragment to display payments in my app.
If the user leaves expiration date empty the fragment crashes.
I tracked down your issue to ExpiryDateEditText - > public String getMonth()
This triggers getToken(); method to throw an exception on collectDataButton's click listener and crash the fragment.
You could on the :
collectDataButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(final View view) {
String token = getToken();
boolean storeDetails = !StringUtils.isEmptyOrNull(shopperReference)
&& saveCardCheckBox.isChecked();
if (creditCardInfoListener != null) {
final CreditCardPaymentDetails creditCardPaymentDetails = new CreditCardPaymentDetails(inputDetails);
creditCardPaymentDetails.fillCardToken(token);
if (installmentsSpinner != null) {
creditCardPaymentDetails.fillNumberOfInstallments(Short.valueOf(((InputDetail.Item) installmentsSpinner
.getSelectedItem()).getId()));
}
creditCardPaymentDetails.fillStoreDetails(storeDetails);
creditCardInfoListener.onCreditCardInfoProvided(creditCardPaymentDetails);
} else {
Log.w(TAG, "No listener provided.");
}
checkoutTextView.setVisibility(GONE);
final ThreeDotsLoadingView progressBar = ((ThreeDotsLoadingView)
fragmentView.findViewById(R.id.processing_progress_bar));
progressBar.setVisibility(VISIBLE);
cvcView.setEnabled(false);
creditCardNoView.setEnabled(false);
if (nameRequired) {
cardHolderEditText.setEnabled(false);
}
expiryDateView.setEnabled(false);
InputMethodManager inputManager = (InputMethodManager) getActivity().getSystemService(
Context.INPUT_METHOD_SERVICE);
inputManager.hideSoftInputFromWindow(view.getApplicationWindowToken(), 0);
}
});
add a try catch at String token = getToken(); and return. Possibly make the expire field red or shake also.
Regards,
Alex
// Adyen SDK
implementation 'com.adyen.checkout:core:1.14.1'
implementation 'com.adyen.checkout:utils:1.14.1'
implementation 'com.adyen.checkout:ui:1.14.1'
implementation 'com.adyen.checkout:cardscan:1.14.1'
I want to get 【returnUrl】to complete 3D Secure payments
Because we use the old version 1.14.1, so we can't get the returnUrl by CheckoutSetupParameters.
Adyen version: 1.6.0
Using custom integration, add card flow.
POST /checkoutshopper/services/PaymentInitiation/v1/initiate
triggers me this response:
Unknown response type. Response must be redirect or complete {"errorCode":"PI102","errorMessage":"An error occurred processing the payment","payload":"SOME_PAYLOAD","type":"validation"}
Not able to add any card (test or real, 3ds or not, test environment or prod).
It seems like your sdk is causing a memory leak.
Here's the LeakCanary log:
com.adyen.ui.activities.CheckoutActivity has leaked:
GC ROOT static android.support.v4.content.LocalBroadcastManager.mInstance
references android.support.v4.content.LocalBroadcastManager.mReceivers
references java.util.HashMap.table
references array java.util.HashMap$HashMapEntry[].[4]
references java.util.HashMap$HashMapEntry.key
references com.adyen.ui.activities.CheckoutActivity$1.this$0 (anonymous subclass of android.content.BroadcastReceiver)
leaks com.adyen.ui.activities.CheckoutActivity instance
Retaining: 109KB.
Reference Key: 00b860ae-83bf-45f9-bdce-db571d0c5b51
Device: HUAWEI HUAWEI HUAWEI TAG-L21 TAG-L21
Android Version: 5.1 API: 22 LeakCanary: 1.5.1 1be44b3
Durations: watch=5191ms, gc=173ms, heap dump=2081ms, analysis=39879ms
Details:
Class android.support.v4.content.LocalBroadcastManager
| static DEBUG = false
| static $staticOverhead = byte[40]@583208001 (0x22c30c41)
| static MSG_EXEC_PENDING_BROADCASTS = 1
| static mLock = java.lang.Object@590233024 (0x232e3dc0)
| static mInstance = android.support.v4.content.LocalBroadcastManager@590245088 (0x232e6ce0)
| static TAG = java.lang.String@583126624 (0x22c1ce60)
Instance of android.support.v4.content.LocalBroadcastManager
| static DEBUG = false
| static $staticOverhead = byte[40]@583208001 (0x22c30c41)
| static MSG_EXEC_PENDING_BROADCASTS = 1
| static mLock = java.lang.Object@590233024 (0x232e3dc0)
| static mInstance = android.support.v4.content.LocalBroadcastManager@590245088 (0x232e6ce0)
| static TAG = java.lang.String@583126624 (0x22c1ce60)
| mActions = java.util.HashMap@590228448 (0x232e2be0)
| mAppContext = nl.beelen.business.BeelenApplication@584859488 (0x22dc3f60)
| mHandler = android.support.v4.content.LocalBroadcastManager$1@590245120 (0x232e6d00)
| mPendingBroadcasts = java.util.ArrayList@590245152 (0x232e6d20)
| mReceivers = java.util.HashMap@590228496 (0x232e2c10)
Instance of java.util.HashMap
| static MINIMUM_CAPACITY = 4
| static serialPersistentFields = java.io.ObjectStreamField[1]@1889097328 (0x70995670)
| static EMPTY_TABLE = java.util.HashMap$HashMapEntry[2]@1889097672 (0x709957c8)
| static serialVersionUID = 362498820763181265
| static $staticOverhead = byte[48]@1889389041 (0x709dc9f1)
| static MAXIMUM_CAPACITY = 1073741824
| static DEFAULT_LOAD_FACTOR = 0.75
| entryForNullKey = null
| entrySet = null
| keySet = null
| modCount = 13
| size = 1
| table = java.util.HashMap$HashMapEntry[8]@590228544 (0x232e2c40)
| threshold = 6
| values = null
| keySet = null
| valuesCollection = null
Array of java.util.HashMap$HashMapEntry[]
| [0] = null
| [1] = null
| [2] = null
| [3] = null
| [4] = java.util.HashMap$HashMapEntry@590245248 (0x232e6d80)
| [5] = null
| [6] = null
| [7] = null
Instance of java.util.HashMap$HashMapEntry
| hash = -1530459604
| key = com.adyen.ui.activities.CheckoutActivity$1@589182336 (0x231e3580)
| next = null
| value = java.util.ArrayList@590391616 (0x2330a940)
Instance of com.adyen.ui.activities.CheckoutActivity$1
| this$0 = com.adyen.ui.activities.CheckoutActivity@584635456 (0x22d8d440)
| mDebugUnregister = false
| mPendingResult = null
Instance of com.adyen.ui.activities.CheckoutActivity
| static CREDIT_CARD_FRAGMENT = 1
| static PAYMENT_METHODS = java.lang.String@583126304 (0x22c1cd20)
| static PAYMENT_METHOD = java.lang.String@583127136 (0x22c1d060)
| static GIROPAY_FRAGMENT = 4
| static CARD_HOLDER_NAME_REQUIRED = java.lang.String@583130048 (0x22c1dbc0)
| static ONE_CLICK = java.lang.String@583098208 (0x22c15f60)
| static AMOUNT = java.lang.String@583089760 (0x22c13e60)
| static $staticOverhead = byte[120]@583884801 (0x22cd6001)
| static PREFERED_PAYMENT_METHODS = java.lang.String@583126080 (0x22c1cc40)
| static LOADING_SCREEN_FRAGMENT = 11
| static TAG_CREDIT_CARD_FRAGMENT = java.lang.String@583095520 (0x22c154e0)
| static ISSUER_SELECTION_FRAGMENT = 2
| static FRAGMENT = java.lang.String@1879084424 (0x70008d88)
| static SEPA_DIRECT_DEBIT_FRAGMENT = 3
| static PAYMENT_METHOD_SELECTION_FRAGMENT = 0
| static TAG = java.lang.String@590131296 (0x232cb060)
| backButtonDisabled = false
| context = com.adyen.ui.activities.CheckoutActivity@584635456 (0x22d8d440)
| currentFragment = 2
| uiFinalizationIntent = com.adyen.ui.activities.CheckoutActivity$1@589182336 (0x231e3580)
| mCreated = true
| mFragments = android.support.v4.app.FragmentController@589128864 (0x231d64a0)
| mHandler = android.support.v4.app.FragmentActivity$1@589078176 (0x231c9ea0)
| mNextCandidateRequestIndex = 0
| mPendingFragmentActivityResults = android.support.v4.util.SparseArrayCompat@589182368 (0x231e35a0)
| mReallyStopped = true
| mRequestedPermissionsFromFragment = false
| mResumed = false
| mRetaining = false
| mStopped = true
| mStartedActivityFromFragment = false
| mStartedIntentSenderFromFragment = false
| mExtraDataMap = android.support.v4.util.SimpleArrayMap@589182400 (0x231e35c0)
| mActionBar = com.android.internal.app.WindowDecorActionBar@588792864 (0x23184420)
| mActivityInfo = android.content.pm.ActivityInfo@589087872 (0x231cc480)
| mActivityTransitionState = android.app.ActivityTransitionState@589180608 (0x231e2ec0)
| mAllLoaderManagers = android.util.ArrayMap@589182432 (0x231e35e0)
| mApplication = nl.beelen.business.BeelenApplication@584859488 (0x22dc3f60)
| mCalled = true
| mChangeCanvasToTranslucent = false
| mChangingConfigurations = false
| mCheckedForLoaderManager = true
| mComponent = android.content.ComponentName@589128880 (0x231d64b0)
| mConfigChangeFlags = 0
| mContainer = android.app.Activity$1@589128896 (0x231d64c0)
| mContext = null
| mCurrentConfig = android.content.res.Configuration@589105968 (0x231d0b30)
| mDecor = null
| mDefaultKeyMode = 0
| mDefaultKeySsb = null
| mDestroyed = true
| mDoReportFullyDrawn = false
| mEmbeddedID = null
| mEnableDefaultActionBarUp = false
| mEnterTransitionListener = android.app.SharedElementCallback$1@1889119472 (0x7099acf0)
| mExitTransitionListener = android.app.SharedElementCallback$1@1889119472 (0x7099acf0)
| mFinished = true
| mFragments = android.app.FragmentManagerImpl@589106080 (0x231d0ba0)
| mHandler = android.os.Handler@589182464 (0x231e3600)
| mIdent = 400078795
| mInstanceTracker = android.os.StrictMode$InstanceTracker@589128912 (0x231d64d0)
| mInstrumentation = android.app.Instrumentation@584845040 (0x22dc06f0)
| mIntent = android.content.Intent@589180672 (0x231e2f00)
| mIsFullFlag = false
| mLastNonConfigurationInstances = null
| mLoaderManager = null
| mLoadersStarted = false
| mMainThread = android.app.ActivityThread@583020912 (0x22c03170)
| mManagedCursors = java.util.ArrayList@589182496 (0x231e3620)
| mManagedDialogs = null
| mMenuInflater = android.view.MenuInflater@589182528 (0x231e3640)
| mParent = null
| mReferrer = java.lang.String@589182560 (0x231e3660)
| mResultCode = 0
| mResultData = null
| mResumed = false
| mSearchManager = null
| mStartedActivity = false
| mStopped = true
| mTemporaryPause = false
| mTitle = java.lang.String@584834400 (0x22dbdd60)
| mTitleColor = 0
| mTitleReady = true
| mToken = android.os.BinderProxy@588949184 (0x231aa6c0)
| mTranslucentCallback = null
| mUiThread = java.lang.Thread@1971052472 (0x757bdfb8)
| mVisibleBehind = false
| mVisibleFromClient = true
| mVisibleFromServer = false
| mVoiceInteractor = null
| mWindow = com.android.internal.policy.impl.HwPhoneWindow@585535648 (0x22e690a0)
| mWindowAdded = true
| mWindowManager = android.view.WindowManagerImpl@589160064 (0x231dde80)
| mInflater = com.android.internal.policy.impl.HwPhoneLayoutInflater@589082480 (0x231caf70)
| mOverrideConfiguration = null
| mResources = android.content.res.HwResources@584591840 (0x22d829e0)
| mTheme = android.content.res.Resources$Theme@589160096 (0x231ddea0)
| mThemeResource = 2131689472
| mBase = android.app.ContextImpl@589088000 (0x231cc500)
Excluded Refs:
| Field: android.view.inputmethod.InputMethodManager.mNextServedView
| Field: android.view.inputmethod.InputMethodManager.mServedView
| Field: android.view.inputmethod.InputMethodManager.mServedInputConnection
| Field: android.view.inputmethod.InputMethodManager.mCurRootView
| Field: android.animation.LayoutTransition$1.val$parent
| Field: android.view.textservice.SpellCheckerSession$1.this$0
| Field: android.support.v7.internal.widget.ActivityChooserModel.mActivityChoserModelPolicy
| Field: android.widget.ActivityChooserModel.mActivityChoserModelPolicy
| Field: android.accounts.AccountManager$AmsTask$Response.this$1
| Field: android.media.MediaScannerConnection.mContext
| Field: android.os.UserManager.mContext
| Field: android.media.AudioManager$1.this$0
| Field: android.widget.Editor$Blink.this$0
| Field: android.net.ConnectivityManager.sInstance
| Field: android.view.Choreographer$FrameDisplayEventReceiver.mMessageQueue (always)
| Static field: android.text.TextLine.sCached
| Thread:FinalizerWatchdogDaemon (always)
| Thread:main (always)
| Thread:LeakCanary-Heap-Dump (always)
| Class:java.lang.ref.WeakReference (always)
| Class:java.lang.ref.SoftReference (always)
| Class:java.lang.ref.PhantomReference (always)
| Class:java.lang.ref.Finalizer (always)
| Class:java.lang.ref.FinalizerReference (always)
Hello. Is it possible to add/remove credit/debit cards for future usage with your SDK and without actual payment? We would like the user to be able to manage their cards in settings.
Maybe, by generating a fake payment request with 0 amount or something like that?
I'm working on an app that has Shopify integration, and I was wondering if there's any way to combine it with Adyen for the checkout process. Any advice about how to proceed would be really appreciated. Thanks a lot!
Is it really needed to embed this CSV file in the Apps that use Adyen's SDK?
https://github.com/Adyen/adyen-android/blob/master/checkout-ui/src/main/res/raw/bankcodes_de.csv
PayPal seems not to work for me. I can select it and a browser window becomes opened but it closes immediately afterwards without any message.
Payment methods naming differs on Android and iOS. On Android it's recurring and others, while in iOS it's preferred and default ones.
Please clarify.
Unable to resolve dependency for ':customwithcheckoutui@debug/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':customwithcheckoutui@debug/compileClasspath': Could not resolve project :adyen-ui.
Open File
Show Details
Unable to resolve dependency for ':customwithcheckoutui@debugAndroidTest/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':customwithcheckoutui@debugAndroidTest/compileClasspath': Could not resolve project :adyen-ui.
Open File
Show Details
Unable to resolve dependency for ':customwithcheckoutui@debugUnitTest/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':customwithcheckoutui@debugUnitTest/compileClasspath': Could not resolve project :adyen-ui.
Open File
Show Details
Unable to resolve dependency for ':customwithcheckoutui@release/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':customwithcheckoutui@release/compileClasspath': Could not resolve project :adyen-ui.
Open File
Show Details
Unable to resolve dependency for ':customwithcheckoutui@releaseUnitTest/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':customwithcheckoutui@releaseUnitTest/compileClasspath': Could not resolve project :adyen-ui.
Open File
Show Details
Unable to resolve dependency for ':adyen-ui@debug/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':adyen-ui@debug/compileClasspath': Could not resolve project :adyen-utils.
Open File
Show Details
Unable to resolve dependency for ':adyen-ui@debug/compileClasspath': Could not resolve project :adyen-cardscan.
Open File
Show Details
Unable to resolve dependency for ':adyen-ui@debugAndroidTest/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':adyen-ui@debugAndroidTest/compileClasspath': Could not resolve project :adyen-utils.
Open File
Show Details
Unable to resolve dependency for ':adyen-ui@debugAndroidTest/compileClasspath': Could not resolve project :adyen-cardscan.
Open File
Show Details
Unable to resolve dependency for ':adyen-ui@debugUnitTest/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':adyen-ui@debugUnitTest/compileClasspath': Could not resolve project :adyen-utils.
Open File
Show Details
Unable to resolve dependency for ':adyen-ui@debugUnitTest/compileClasspath': Could not resolve project :adyen-cardscan.
Open File
Show Details
Unable to resolve dependency for ':adyen-ui@release/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':adyen-ui@release/compileClasspath': Could not resolve project :adyen-utils.
Open File
Show Details
Unable to resolve dependency for ':adyen-ui@release/compileClasspath': Could not resolve project :adyen-cardscan.
Open File
Show Details
Unable to resolve dependency for ':adyen-ui@releaseUnitTest/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':adyen-ui@releaseUnitTest/compileClasspath': Could not resolve project :adyen-utils.
Open File
Show Details
Unable to resolve dependency for ':adyen-ui@releaseUnitTest/compileClasspath': Could not resolve project :adyen-cardscan.
Open File
Show Details
Unable to resolve dependency for ':adyen-androidpay@debug/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':adyen-androidpay@debugAndroidTest/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':adyen-androidpay@debugUnitTest/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':adyen-androidpay@release/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':adyen-androidpay@releaseUnitTest/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':customuiapplication@debug/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':customuiapplication@debugAndroidTest/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':customuiapplication@debugUnitTest/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':customuiapplication@release/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':customuiapplication@releaseUnitTest/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':defaultApp@debug/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':defaultApp@debug/compileClasspath': Could not resolve project :adyen-androidpay.
Open File
Show Details
Unable to resolve dependency for ':defaultApp@debug/compileClasspath': Could not resolve project :adyen-ui.
Open File
Show Details
Unable to resolve dependency for ':defaultApp@debugAndroidTest/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':defaultApp@debugAndroidTest/compileClasspath': Could not resolve project :adyen-androidpay.
Open File
Show Details
Unable to resolve dependency for ':defaultApp@debugAndroidTest/compileClasspath': Could not resolve project :adyen-ui.
Open File
Show Details
Unable to resolve dependency for ':defaultApp@debugUnitTest/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':defaultApp@debugUnitTest/compileClasspath': Could not resolve project :adyen-androidpay.
Open File
Show Details
Unable to resolve dependency for ':defaultApp@debugUnitTest/compileClasspath': Could not resolve project :adyen-ui.
Open File
Show Details
Unable to resolve dependency for ':defaultApp@release/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':defaultApp@release/compileClasspath': Could not resolve project :adyen-androidpay.
Open File
Show Details
Unable to resolve dependency for ':defaultApp@release/compileClasspath': Could not resolve project :adyen-ui.
Open File
Show Details
Unable to resolve dependency for ':defaultApp@releaseUnitTest/compileClasspath': Could not resolve project :adyen-core.
Open File
Show Details
Unable to resolve dependency for ':defaultApp@releaseUnitTest/compileClasspath': Could not resolve project :adyen-androidpay.
Open File
Show Details
Unable to resolve dependency for ':defaultApp@releaseUnitTest/compileClasspath': Could not resolve project :adyen-ui.
Open File
Show Details
Hi, I tried this code but the Card class not found. Can you help me? Where is the Card Class defined?
Android section: https://docs.adyen.com/developers/in-app-integration/custom-integration#onpaymentdetailsrequired
Thank you
import com.adyen.core.models.PaymentMethod.Card;
@Override
public void onPaymentDetailsRequired(@NonNull final PaymentRequest paymentRequest,
@NonNull final Collection<InputDetail> inputDetails,
@NonNull final PaymentDetailsCallback callback) {
if ( PaymentMethod.Type.CARD.equals(paymentMethod.getType())) {
if ( PaymentMethod.Type.CARD.equals(paymentRequest.getPaymentMethod().getType())) {
Card card = new Card();
card.setNumber("4111111111111111");
card.setCardHolderName("checkout shopper");
card.setCvc("737");
card.setExpiryMonth("10");
card.setExpiryYear("2020");
card.setGenerationTime(new Date());
try {
// Create PaymentDetails object from the inputDetails and fill them with the shopper input.
// Then call callback.completionWithPaymentDetails.
CreditCardPaymentDetails creditCardPaymentDetails = new CreditCardPaymentDetails(inputDetails);
creditCardPaymentDetails.fillCardToken( card.serialize(paymentRequest.getPublicKey() ));
creditCardPaymentDetails.fillStoreDetails(true);
callback.completionWithPaymentDetails(creditCardPaymentDetails);
} catch (EncrypterException e) {
e.printSta ckTrace();
}
}
}
I noticed this problem when writing Espresso tests that covered the 2.2.0 version of the Adyen SDK for the Tiqets App:
The issue happens when performing a payment, let's take a Credit Card's first payment as an example, so via CardDetailsActivity
and pressing the button with ID R.id.button_pay
.
After filling out the needed info and tapping the pay button, some networking will take place and our test can tell Espresso to wait for the network call to finish before proceeding with its test instructions via an IdlingResource
that is updated according to PaymentHandler.getNetworkingStateObservable()
, which is notified of Adyen's SDK networking activity.
It'd be alright if only PaymentHandlerImpl.initiatePayment()
(the private one) wouldn't have an, IMO, incorrect implementation. This method updates the previously mentioned NetworkingState
observable via handleRequestStarted()
and handleRequestFinished()
calls. The problem lies in having handleRequestStarted()
called from within the Runnable
instance that is being sent to a ExecutorService
(powered via a Thread Pool).
What quite often happens for us is that Espresso taps the buy button, the ExecutorService
is not running the supplied Runnable
right away, or quickly enough (there is no guarantee that it would do so) for the NetworkingState
to get updated (and, consequently, for our IdlingResource
to tell Espresso to wait because the App is not idle) before Espresso checks if the App is idle and resume with the test instructions, which will now fail because it is performing checks that should happen only once the payment networking finishes.
This could be solved by moving the calls to handleRequestStarted()
to before dispatching the Runnable to the ExecutorService for PaymentHandler's initiatePayment()
and deletePaymentMethod()
.
based on the examples, specifically: https://github.com/Adyen/adyen-android/blob/a6ffee5fee6d2f35e63e7c4289cfe40613322761/customuiapplication/src/main/java/com/adyen/customuiapplication/MainActivity.java
there is no code that would handle back presses on custom chrome tabs. When a back button is pressed, the tabs close and no intent nor activity result is returned to indicate the cancellation.
Also, if I would start custom tabs with startActivityForResult
rather than tabsIntent. launchUrl(..)
, then whenever the tabs close (either due to successful payment flow or cancellation) I receive the Activity.RESULT_CANCELED
result code, so no way for me to distinguish correctly if it was a cancellation or success flow.
Do you have any suggestion as how to handle cancellations then? I'm out of options I think
If i use the default RedirectHandlerActivity
for opening ideal pages to banks, then it doesnt open the natively installed apps for the following banks:
It seems that the customTabs doesnt work well with opening the native banking apps.
I'm now using the following code:
// W're not using custom tabs, it doesnt work with native banking apps such as ING and RaboBank Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(redirectUrl)); intent.addCategory(Intent.CATEGORY_BROWSABLE); mContext.startActivity(intent);
Instead of the recommended code:
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder(); CustomTabsIntent customTabsIntent = builder.build(); customTabsIntent.launchUrl(mContext, Uri.parse(redirectUrl));
Could you update RedirectHandlerActivity to use this as well?
Hi,
How can I disable "sepa direct debit" choice when start CheckoutActivity without implements custom integrations?
I see in latest version there is a field blockedPaymentMethods = ['sepadirectdebit'] to achieve it but I use api version v32.
https://docs.adyen.com/api-explorer/#/PaymentSetupAndVerificationService/v32/paymentSession
Thanks
Fabio
Hi guys, thanks for great and easy to use SDK!
We've experienced UI defect in the SDK.
After a user makes payment - success/fail no matter, payment screen turns black for a while and then returns to the previous screen.
Please, see attached video for more context.
https://youtu.be/uOU_WwVjndA
After i jump to the webview, it can't back
I kill my app and restart it , it also start the miui brownser
I download the source code and try it ,
I find in xiaomi miui brownser should add the
redirectIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
before the
if (redirectIntent.resolveActivity(getPackageManager()) != null) {
startActivityForResult(redirectIntent, REQUEST_CODE_REDIRECT);
} else {
Toast.makeText(getApplicationContext(), R.string.checkout_error_redirect_failed, Toast.LENGTH_LONG).show();
finish();
}
on the RedirectHandlerActivity to fix it
Can you try and solver the issues thanks
Is it possible to not include support library 25.3.1? It creates a conflict in projects with different support library versions.
In release builds, com.adyen.ui.DefaultPaymentRequestListener
and com.adyen.ui.DefaultPaymentRequestDetailsListener
are removed by Proguard. This causes payment request to fail.
I'm looking for a way to have a credit card scanner while using adyen checkout like in checkoutdemo. In iOS you can set cardScanDelegate but I'm missing a similar connection here.
Hi! Is it possible to skip the Payment Method Select in the Quick Integration, going direct to the credit card screen? Also, i'm having trouble customizing the credit card screen, i can't change the edit text's text color. Is it possible to change it using Styles?
Thanks in advance!
Is there any plans to do a Xamarin official integration?
I need to implement Adyen in my Xamarin project, and I'm encountering a lot of trouble trying to do this.
I think we may need to change the payment hub because of the poor support, but we already spent a lot of time on this.
We had a crash in some situations after we integrated this module in our React Native app:
Fatal Exception: android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
at android.app.ContextImpl.startActivity(ContextImpl.java:672)
at android.app.ContextImpl.startActivity(ContextImpl.java:659)
at android.content.ContextWrapper.startActivity(ContextWrapper.java:331)
at android.content.ContextWrapper.startActivity(ContextWrapper.java:331)
at com.adyen.ui.DefaultPaymentRequestListener.onPaymentDataRequested(DefaultPaymentRequestListener.java:34)
at com.adyen.core.PaymentStateHandler.requestPaymentData(PaymentStateHandler.java:191)
at com.adyen.core.PaymentStateHandler.onStateChanged(PaymentStateHandler.java:121)
at com.adyen.core.internals.PaymentProcessorStateMachine.onStateChanged(PaymentProcessorStateMachine.java:26)
at com.adyen.core.internals.PaymentProcessorStateMachine.onTrigger(PaymentProcessorStateMachine.java:39)
at com.adyen.core.PaymentRequest.start(PaymentRequest.java:60)
...
After I changed React context passed to Payment request to getCurrentActivity() everything seems to work smooth (it's under testing now).
But anyway, it seems that it will be better to add intent.setFlag(Intent.FLAG_ACTIVITY_NEW_TASK);
to the DefaultPaymentRequestListener.java before line 34, it would resolve the similar problems in the future.
I tried version 2.0 and it fails with "Error parsing payment session data.". How can I find out what is going wrong?
"Request failed. Unexpected developer error, please try again later"
Most likely due to GooglePayUtil.java:156 where you are formatting the display amount. The code looks like it would format it as $1.99 but it is actually getting formatted to $1,99. If I edit the code in that method to replace the , with a . then Google Pay works.
In android, a fragment might be asked to keep its instance state in a bundle,
then when the fragment is reinstantiated, the data of the bundle is used.
However IssuerSelectionFragment is setting the paymentMethod in the setArguments call in memory, this will mean it will not be there after the fragment is restored (if the app is asked to be paused and destroyed by the fragment life cycle).
When the app wants to show the fragment again it crashes:
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.Collection com.adyen.core.models.PaymentMethod.getInputDetails()' on a null object reference at com.adyen.ui.fragments.IssuerSelectionFragment.onCreateView(IssuerSelectionFragment.java:69) at android.support.v4.app.Fragment.performCreateView(Fragment.java:2192) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1299) at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595) at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:2900) at android.support.v4.app.FragmentController.dispatchActivityCreated(FragmentController.java:201) at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:603) at android.support.v7.app.AppCompatActivity.onStart(AppCompatActivity.java:178) at com.tiqets.tiqetsapp.base.DebugActivity.onStart(BaseActivity.java:37) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1256) at android.app.Activity.performStart(Activity.java:6959) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2890) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2988) at android.app.ActivityThread.-wrap14(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1631) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6682) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410) 09-14 16:20:40.732 2870-2870/? E/Zygote: v2 09-14 16:20:40.732 2870-2870/? E/Zygote: accessInfo : 0 09-14 16:20:40.844 2890-2890/? E/Zygote: v2 09-14 16:20:40.845 2890-2890/? E/Zygote: accessInfo : 0
IssuerFragment should implement the proper lifecycle methods:
Hi guys, I have a problem running your example on Android (checkoutdemo), I cloned the latest version. The log is attached below. My API configuration looks like this:
SERVER_URL: https://checkout-test.adyen.com/services/PaymentSetupAndVerification/v31/
API_HEADER_KEY: X-API-Key
API_KEY: Checkout API Key from the Web Service User (for some strange reason Checkout Demo Server API Key does not work for me)
com.adyen.checkoutdemo E/PaymentBroadcastReceivers: Provided payment data response is invalid org.json.JSONException: No value for publicKeyToken at org.json.JSONObject.get(JSONObject.java:392) at org.json.JSONObject.getString(JSONObject.java:553) at com.adyen.core.models.PaymentResponse.(PaymentResponse.java:54) at com.adyen.core.PaymentBroadcastReceivers$2.completionWithPaymentData(PaymentBroadcastReceivers.java:57) at com.adyen.checkoutdemo.MainActivity$1$1.onSuccess(MainActivity.java:65) at com.adyen.core.utils.AsyncHttpClient$1.onNext(AsyncHttpClient.java:74) at com.adyen.core.utils.AsyncHttpClient$1.onNext(AsyncHttpClient.java:55) at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:200) at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:252) at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:109) at android.os.Handler.handleCallback(Handler.java:789) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6541) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767After setting publicKeyToken like this:
JSONObject jsonObject = null; try { jsonObject = new JSONObject(new String(response, Charset.forName("UTF-8"))); jsonObject.put("publicKeyToken", token); } catch (JSONException e) { e.printStackTrace(); } paymentDataCallback.completionWithPaymentData(jsonObject.toString().getBytes());this problem seems to be fixed, but the payment is still unsuccessful with another error in logs:
"E/CreditCardFragment: Public key is not available; credit card payment cannot be handled",
which I can't fix, because I don't have access to the CreditCardFragment initialization.
Please help me, because it's stopper for the SDK integration
Hi,
Could you please provide proguard rules for version 2.0.2 of the SDK? Thanks!
What is the PI102 error?
This is the response from SDK:
{
"errorCode":"PI102",
"errorMessage":"An error occurred processing the payment",
"type":"error"
}
Thank you
Is it possible to configure the SDK to be used to add methods only?
If I have already a method I see a dialog which offers me to pay the amount (in my case 0€) with existing payment methods. This option does not make sense for us.
I don't want to pay 0€ but rather add a payment method for later. Can the UI be adjusted for that?
I'm following the In-app quick integration documentation for Android and I am receiving the error:
Provided payment data response is invalid
org.json.JSONException: No value for generationtime
at org.json.JSONObject.get(JSONObject.java:389)
at org.json.JSONObject.getString(JSONObject.java:550)
at com.adyen.core.models.PaymentResponse.(PaymentResponse.java:49)
at com.adyen.core.PaymentBroadcastReceivers$2.completionWithPaymentData(PaymentBroadcastReceivers.java:57)
at md510efd7a204942edddcf434380b3266f7.DroisAdyenService.n_onSuccess(Native Method)
at md510efd7a204942edddcf434380b3266f7.DroisAdyenService.onSuccess(DroisAdyenService.java:65)
at com.adyen.core.utils.AsyncHttpClient$1.onNext(AsyncHttpClient.java:74)
at com.adyen.core.utils.AsyncHttpClient$1.onNext(AsyncHttpClient.java:55)
at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:200)
at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:252)
at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:109)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7229)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
onStateChanged: ABORTED
Payment aborted.
I am using the Demo Server.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.