paypal / android-checkout-sdk Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
I have archived get my app to LIVE, but in the time of capturing orders in client side with this SDK I get the following error
message=Capture order failed., reason=LSAT upgrade failed while capturing order.
This is my clientId in LIVE.
AdpuP9npnFtPPy5motOKzr5EglnWvbKjGwWWqXG9tCItxeeUHBfjBsjflQQwA6EOnQVzJHRfUFn93avl
@tdchow Please Help.
The success response i am getting from Paypal , is not in JSON format and payment ID is also null.
How to overcome these problems.
Describe the bug
Double-click an entry in the PayPal address list, the APP flashes back
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
Smartphone (please complete the following information):
minSdkVersion 23
targetSdkVersion 30
while Using SDK with server-side integration, client click the button "查看订单 check the order",there is no way to pay
CheckoutConfig:
CheckoutConfig config = new CheckoutConfig(
application,
Global.PayPalClientId,
Global.isUsePayPalSandBox ? Environment.SANDBOX : Environment.LIVE,
String.format("%s://paypalpay", getPackageName()),
CurrencyCode.USD,
UserAction.PAY_NOW,
new SettingsConfig(
true,
false
)
);
PayPalCheckout.setConfig(config);
Method Setup:
directPayPopupWindow?.view?.findViewById<PayPalButton>(R.id.btn_paypal_pay)?.setup(
object : CreateOrder {
override fun create(createOrderActions: CreateOrderActions) {
createOrderActions.set(transaction_id)
}
},
object : OnApprove {
override fun onApprove(approval: Approval) {
checkOrder(order_id, Global.PAYPAL_PAY, Constants.EVENT_PAY_SUCC, Companion.payCallBack)
}
},
object : OnCancel {
override fun onCancel() {
checkOrder(order_id, Global.PAYPAL_PAY, Constants.EVENT_PAY_CANCEL, Companion.payCallBack)
}
},
object : OnError {
override fun onError(errorInfo: ErrorInfo) {
checkOrder(order_id, Global.PAYPAL_PAY, Constants.EVENT_PAY_FAIL, Companion.payCallBack)
}
}
)
paypal SDK Version:0.3.1
environment: SANDBOX
It would be really nice, if the PurchaseUnit Object could be extended with the missing parameters payee
and payment_instruction
.
Enable code obfuscation mechanism, paypal checkout sdk does not work normally
@CodyEngel Hello, i'm having another issue.
If i tap on the cancel label my app crashes with the following exception:
Fatal Exception: kotlin.UninitializedPropertyAccessException: lateinit property accessToken has not been initialized
at com.paypal.pyplcheckout.utils.PYPLCheckoutUtils.getCheckoutLiteUrl(PYPLCheckoutUtils.kt:235)
at com.paypal.pyplcheckout.utils.PYPLCheckoutUtils.getCheckoutLiteUrl$default(PYPLCheckoutUtils.kt:167)
at com.paypal.pyplcheckout.utils.PYPLCheckoutUtils.fallBackToWeb(PYPLCheckoutUtils.kt:335)
at com.paypal.pyplcheckout.utils.PYPLCheckoutUtils.fallBack(PYPLCheckoutUtils.kt:309)
at com.paypal.pyplcheckout.home.viewmodel.MainPaysheetViewModel$3.authFailure(MainPaysheetViewModel.java:537)
at com.paypal.pyplcheckout.flavorauth.ThirdPartyAuth$2.completeWithFailure(ThirdPartyAuth.java:122)
at com.paypal.authcore.authentication.Authenticator$a.onReceive(:75)
at androidx.localbroadcastmanager.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:313)
at androidx.localbroadcastmanager.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:121)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Before you create a new issue, please search for similar issues. It's possible somebody has encountered this bug already. PLEASE REMOVE THIS LINE TO ACKNOWLEDGE THAT AN ISSUE DOESN'T ALREADY EXIST FOR THIS BUG
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
I am developing an android application which includes in-app Paypal payments for buying coins.
I am using the latest version 0.3.0.
I am facing the following error when clicking Paypal Button in LIVE mode
I have the following configuration in my code:
val environment: Environment = if (resources.getBoolean(R.bool.production)) Environment.LIVE else Environment.SANDBOX
val config = CheckoutConfig(
this,
getString(R.string.paypal_client_id), environment,
"by.the.way://paypalpay", CurrencyCode.USD, UserAction.PAY_NOW,
SettingsConfig(
true,
false
)
)
setConfig(config)
This is the code for buying coins:
btnPaymentPayPal.setup(object : CreateOrder {
override fun create(createOrderActions: CreateOrderActions) {
val purchaseUnits = ArrayList<PurchaseUnit>()
purchaseUnits.add(
PurchaseUnit.Builder()
.amount(
Amount.Builder()
.currencyCode(CurrencyCode.USD)
.value(coinsPakageModel.price.toString())
.build()
)
.description(coinsPakageModel.name)
.build()
)
val order: Order = Order.Builder().appContext(
AppContext.Builder()
.userAction(UserAction.PAY_NOW)
.build()
).intent(OrderIntent.CAPTURE)
.purchaseUnitList(purchaseUnits).build()
createOrderActions.create(order)
}
},
object : OnApprove {
override fun onApprove(approval: Approval) {
approval.orderActions.capture(object : OnCaptureComplete {
override fun onCaptureComplete(result: captureOrderResult) {
//...
}
})
}
},
object : OnCancel {
override fun onCancel() {
//...
}
},
object : OnError {
override fun onError(errorInfo: ErrorInfo) {
//...
}
}
)
And this is my Paypal Configuration in developers dashboard. My account is a business account :
My application id is "soft.agency.kbt.com.i69.stage". In Paypal Developer, when I try to add this in return url with "://paypalpay". it always says "Oauth invalid return URL".
But when I remove the number from my application id, it works but the problem is I cannot change my application id as it is already published in the google playstore. please tell me what to do?
I have imported com.paypal.checkout:android-sdk:0.1.0
into my project for native deposit flow - running into a number of issues on varying OS levels.
We are making use of the Server-side integration. There is no issue with our server implementation in regards to the creation of the orderId that we pass along to the SDK. As a reference, this is called once we get the orderId from our backend:
private fun startPayPalDeposit(paypalOrderId: String) {
checkoutSdk.start(
createOrder = CreateOrder { createOrderActions ->
createOrderActions.set(paypalOrderId)
},
onApprove = OnApprove {
viewModel.capturePaypalDeposit(paypalOrderId)
},
onCancel = OnCancel {
viewModel.onStopLoading()
},
onError = OnError {
viewModel.onStopLoading()
}
)
}
For what it is worth, this exact implementation has no issues on newer versions of Android, API 26+.
java.lang.RuntimeException: Feature only supported for versions Android-M and above
at com.paypal.authcore.security.BaseSecureKeyWrapper.generatePublicKey()
at com.paypal.authcore.security.NoAuthSecureKeyWrapper.generateAsymmetricKeyPair()
at com.paypal.authcore.authentication.Authenticator.a()
at com.paypal.authcore.authentication.Authenticator.authenticateForAccessTokenWithDelegate()
at com.paypal.pyplcheckout.flavorauth.ThirdPartyAuth.getUserAccessToken(ThirdPartyAuth.java:140)
at com.paypal.pyplcheckout.home.viewmodel.MainPaysheetViewModel.logInUser(MainPaysheetViewModel.java:1036)
at com.paypal.pyplcheckout.home.viewmodel.MainPaysheetViewModel.lambda$u3bJQV5CM255mmoJkHAH5Y7Tgzs(MainPaysheetViewModel.java)
at com.paypal.pyplcheckout.home.viewmodel.-$$Lambda$MainPaysheetViewModel$u3bJQV5CM255mmoJkHAH5Y7Tgzs.onUpdateClientConfig(lambda)
at com.paypal.pyplcheckout.home.viewmodel.MainPaysheetViewModel.lambda$updateClientConfigBefore$11(MainPaysheetViewModel.java:394)
at com.paypal.pyplcheckout.home.viewmodel.-$$Lambda$MainPaysheetViewModel$bZWZcCIiVLiE6wcvi0c3LrRX6pk.onEvent(lambda)
at com.paypal.pyplcheckout.events.Events.fire(Events.java:109)
at com.paypal.pyplcheckout.services.callbacks.ClientConfigUpdateCallback.onApiSuccess(ClientConfigUpdateCallback.kt:53)
at com.paypal.pyplcheckout.services.callbacks.BaseCallback.onResponse(BaseCallback.kt:38)
at com.google.firebase.perf.network.InstrumentOkHttpEnqueueCallback.onResponse(InstrumentOkHttpEnqueueCallback.java:69)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
This doesn't make sense to me since the CHANGELOG.md only calls out API 23 as the minimum in Version 0.4.0
. However, after checking the source code pulled into the project, I can see this:
@TargetApi(23)
@NonNull
public PublicKey generatePublicKey(@NonNull String var1, boolean var2)
First, the app will launch the user to the browser to select which payment method they want to use from their account. Then upon selecting one and clicking the Continue button, it will display a loading screen and say something along the lines of "Returning you to XYZ Inc". When the application returns, this overlay is presented to the user and nothing happens. The only thing I can find in the logs that might be relevant is this:
No one listening to the event of type NATIVE_CHECKOUT_PAY_SHEET_LIFE_CYCLE.
If I try to upgrade the library to com.paypal.checkout:android-sdk:0.2.0
(I also add the necessary info to the project-level build.gradle file), I get this as output when running on API 21:
java.lang.RuntimeException: Feature only supported for versions Android-M and above
at com.paypal.authcore.security.BaseSecureKeyWrapper.generatePublicKey()
at com.paypal.authcore.security.NoAuthSecureKeyWrapper.generateAsymmetricKeyPair()
at com.paypal.authcore.authentication.Authenticator.a()
at com.paypal.authcore.authentication.Authenticator.authenticateForAccessTokenWithDelegate()
at com.paypal.pyplcheckout.flavorauth.ThirdPartyAuth.getUserAccessToken(ThirdPartyAuth.java:140)
at com.paypal.pyplcheckout.home.viewmodel.MainPaysheetViewModel.logInUser(MainPaysheetViewModel.java:1285)
at com.paypal.pyplcheckout.home.viewmodel.MainPaysheetViewModel.lambda$u3bJQV5CM255mmoJkHAH5Y7Tgzs(MainPaysheetViewModel.java)
at com.paypal.pyplcheckout.home.viewmodel.-$$Lambda$MainPaysheetViewModel$u3bJQV5CM255mmoJkHAH5Y7Tgzs.onUpdateClientConfig(lambda)
at com.paypal.pyplcheckout.home.viewmodel.MainPaysheetViewModel.lambda$updateClientConfigBefore$17(MainPaysheetViewModel.java:623)
at com.paypal.pyplcheckout.home.viewmodel.-$$Lambda$MainPaysheetViewModel$aNrB20LFlUkv6bj-6UgWWnDtt-A.onEvent(lambda)
at com.paypal.pyplcheckout.events.Events.fire(Events.java:109)
at com.paypal.pyplcheckout.services.callbacks.ClientConfigUpdateCallback.onApiSuccess(ClientConfigUpdateCallback.kt:54)
at com.paypal.pyplcheckout.services.callbacks.BaseCallback.onResponse(BaseCallback.kt:38)
at com.google.firebase.perf.network.InstrumentOkHttpEnqueueCallback.onResponse(InstrumentOkHttpEnqueueCallback.java:69)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Again, this is quite annoying since the CHANGELOG.md calls out this library bump in Version 0.4.0
, but the function is likely annotated like it was in 0.1.0
.
When running com.paypal.checkout:android-sdk:0.2.0
on API 23, we end up with the same issue as shown above for the same API version (the picture of the transparent Activity over our application) with a bunch of different errors:
E/InstrumentationErr: Error Parsing Experiment fetchAndHandleExperiments()
java.lang.Exception: Error Parsing Experiment
at com.paypal.pyplcheckout.ab.elmo.Elmo.fetchRemoteTreatment(Elmo.kt:94)
E/InstrumentationErr: java.lang.Exception: Experiment not found in cache fetchAndHandleExperiments()
java.lang.Exception: Experiment not found in cache
at com.paypal.pyplcheckout.ab.elmo.Elmo.getTreatment(Elmo.kt:111)
E/InstrumentationErr: java.lang.Exception: Experiment not found in cache fetchAndHandleExperiments()
java.lang.Exception: Experiment not found in cache
at com.paypal.pyplcheckout.ab.elmo.Elmo.getTreatment(Elmo.kt:111)
E/InstrumentationErr: error in reading UserCheckoutResponse Binary XML file line #11: Binary XML file line #11: Error inflating class ImageView
android.view.InflateException: Binary XML file line #11: Binary XML file line #11: Error inflating class ImageView
at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
All of these errors are returned with just a single transaction attempt.
Regardless of what I upgrade the library to, if I update the project to target API 23, a device at that level crashes when pulling up wallet due to:
E/InstrumentationErr: error in reading UserCheckoutResponse Binary XML file line #11: Binary XML file line #11: Error inflating class ImageView
android.view.InflateException: Binary XML file line #11: Binary XML file line #11: Error inflating class ImageView
at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
The theme for the project: Theme.MaterialComponents.DayNight.NoActionBar
.
There seem to be a handful of issues at lower API levels. Specifically 21 and 23 having issues no matter which library version available. All of these tests ran on emulated Pixel devices with Google Play Services x86 straight from the AVD Manager. I haven't tested versions 24 and 25 at the moment, so I don't know where the exact floor is, but the same implementation in code works for API level 26, 29, 30 regardless of library version.
I get the orderid from the server and call createOrderActions.set(orderId), the order amount and information cannot be displayed, but when I create an order directly using CreateOrder{}, the order information and amount can be displayed. Why?
java.lang.IllegalStateException:
at com.paypal.openid.AuthorizationService.a (Unknown Source:9)
at com.paypal.openid.AuthorizationService.a (Unknown Source)
createCustomTabsIntentBuilder
dispose
performAuthorizationRequest
performTokenRequest
performTokenRequest
at com.paypal.authcore.authentication.Authenticator.a (Unknown Source:194)
a
a
a
a
authenticateForAccessTokenWithDelegate
getAuthService
getUriFromUrl
at com.paypal.authcore.authentication.Authenticator.a (Unknown Source:96)
a
a
a
a
authenticateForAccessTokenWithDelegate
getAuthService
getUriFromUrl
at com.paypal.pyplcheckout.flavorauth.ThirdPartyAuth.getUserAccessToken (SourceFile:2)
at com.paypal.pyplcheckout.home.viewmodel.MainPaysheetViewModel.logInUser (SourceFile:4)
at com.paypal.pyplcheckout.home.viewmodel.MainPaysheetViewModel.lambda$gzn7IQlqWzbNXDntwRSNZFJjIRk (Unknown Source)
lambda$new$0
lambda$new$0
lambda$new$0
lambda$new$0
lambda$new$3
lambda$new$4
lambda$onLifeCycleCreate$5
lambda$createContingencyEventListener$19
lambda$createContingencyEventListener$19
lambda$createContingencyEventListener$19
lambda$createContingencyEventListener$19
lambda$createContingencyEventListener$19
lambda$createContingencyEventListener$19
lambda$createContingencyEventListener$19
lambda$createContingencyEventListener$19
lambda$updateClientConfigBefore$22
lambda$startThreeDsFlow$25
at com.paypal.pyplcheckout.home.viewmodel.-$$Lambda$MainPaysheetViewModel$gzn7IQlqWzbNXDntwRSNZFJjIRk.onUpdateClientConfig (Unknown Source:2)
at com.paypal.pyplcheckout.home.viewmodel.MainPaysheetViewModel.lambda$gzn7IQlqWzbNXDntwRSNZFJjIRk (SourceFile:21)
lambda$updateClientConfigBefore$22
at com.paypal.pyplcheckout.home.viewmodel.-$$Lambda$MainPaysheetViewModel$0qi8S4gTaHTffyGJVKC2HNZy5Ng.onEvent (Unknown Source:2)
at com.paypal.pyplcheckout.events.Events.fire (SourceFile:5)
at com.paypal.pyplcheckout.services.callbacks.ClientConfigUpdateCallback.onApiSuccess (SourceFile:16)
at com.paypal.pyplcheckout.services.callbacks.BaseCallback.handleApiSuccess (SourceFile:7)
at com.paypal.pyplcheckout.services.callbacks.BaseCallback.onResponse (SourceFile:8)
at okhttp3.internal.connection.RealCall$AsyncCall.run (SourceFile:7)
at java.util.concurrent.ThreadPoolExecutor.processTask (ThreadPoolExecutor.java:1187)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:784)
Only Published App (eg: In Google Play, Apple Store, Huawei Application Market and so on) can pass the app review request to pay in live environment?
It work fine in sandbox mode, but when I switch to live mode, it shows the error "invalid scope"(issue #24 ).
I send the email to ur team and got the error msg:
Access denied to your site/application.
Hope u can answer my question!
Hello,
My application id contains underscore (_) and when i set it as return url it throws
Caused by: java.lang.IllegalArgumentException: Check your returnUrl! It should contain your app's package name appended with "://paypalpay".
And if i change the return url the checkout doesn't work and also i couldn't able to set return url on developer dashboard as it also doesn't support underscore.
I couldn't able to change my application ID as its already published on play store.
When I run this code after cloned it. Then Change my Client & Secret Key Live after that on the Client Integration button click open create order page after filling all forms then Submit it redirect on Paypal.com page but showing invalid scope nothing performs. Please see a screenshot from the attachment.
The PayPal client is installed, but now you can only call the web payment in the app.
Can we call the client on the mobile phone with PayPal client, and then call the web page without the client.
This makes the user feel more optimized.
Hi all,
In my integration, after completing the order with the onApproval callback, we have to send to our server a set of information regarding the order. To get this data we call the rest api /v2/checkout/orders/id with the order id received from the SDK.
Is it possible to get the same information with the current version of the SDK?
In the last version, some of the data of the order seems to have been added, are you planning to introduce the other data in a feature release?
Have a nice day,
Lorenzo
When I tried to setup buttons, after loading a while I can only see the button PayPalButton
. Two other buttons (PayLaterButton
, PayPalCreditButton
) were disappeared.
I'm sure what's wrong with my config.
Please help with this issue
We want to use paypal in our app.We have sent an email to [email protected] in order to permission to App review request,but we received an email reply from [email protected] stating that the review process has been modified and go to developer.paypal.com and create an app with Log in with PayPal scopes, this will trigger an app review to the right team.
It seems that we have created the APP. Could you advise us what should we do next? We don't know the steps about how to get the review request approved? We need you advise us how to do one step by one step, thanks.
Client ID of the live app:
AZ2qZ-_Qy3vY7prQSFwqA2BJiPRFLiWRuiCyPihQWp9DgEZPdDDmq4sX6G4NW2FjXvIlR43GcUcuZQLO
In IOS I used: PurchaseUnit(payee: PurchaseUnit.Payee(merchantId: someMerchantID))
. But in Android I can't find this option
Describe the bug
My client is always getting this error. As you said to contact the Paypal Support team, I contacted them and they said to try with one of the relatives or another person's PayPal account. We tried that. But We are having always the same error in PayPal Live Mode. Images Attached. Please help me. It's happening always. The Screenshots are written in France Language But In English we get the error that "This card can't be used for this type of transaction"
Smartphone (please complete the following information):
Hi @CodyEngel ,
We have implemented refunds with the PHP SDK, and for that we need the paymentID or captureID (i don´t know).
On iOS we get this value on the success response of the capture method. However, in android we only get an orderStatus which is an enum and an ID which is the orderID and is no good for us to call the refund method.
Could you please implemente on the android SDK the same information that we get on the iOS SDK?
Click the button PayPalButton continuously and the page disappears without displaying,PayPalButton don't do continuous click exception handling
Describe the bug
While capturing payment inside onApprove
, app crashed giving OrderContextNotAvailableException
To Reproduce
Steps to reproduce the behavior:
createOrder
Expected behavior
It should work without crashing
Smartphone (please complete the following information):
Additional context
com.paypal.checkout.order.OrderContextNotAvailableException: Tried to retrieve OrderContext before it was created.
at com.paypal.checkout.order.OrderContext$Companion.get(OrderContext.kt:27)
at com.paypal.checkout.order.UpdateOrderStatusAction$execute$orderContext$1.invokeSuspend(UpdateOrderStatusAction.kt:27)
at com.paypal.checkout.order.UpdateOrderStatusAction$execute$orderContext$1.invoke(Unknown Source:10)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:91)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:161)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)
at com.paypal.checkout.order.UpdateOrderStatusAction.execute(UpdateOrderStatusAction.kt:26)
at com.paypal.checkout.order.CaptureOrderAction$execute$2.invokeSuspend(CaptureOrderAction.kt:21)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
After updating the SDK to version 0.4.0 and 0.4.1 all transactions on the LIVE environment started failing with the error on the screenshot. This happens right after tapping on the PayPalButton.
Prior to this update, everything was working fine. We also have an iOS implementation using the same account and it works ok.
When you have the Android Gradle plugin version 7.0.2 or 7.0.3 and targeting Android 12 (compileSdkVersion = 31 and targetSdkVersion = 31 in the app Gradle file), the manifest merging when building the app fails due to some Activities with intent filters don't have explicitly set the exported attribute in the checkout SDK's manifest file.
Steps to reproduce the behavior:
Expected behavior
The app should build and install.
Smartphone (please complete the following information):
Can we customize the paypalbutton's onClick event? If can , how?
Cuz I want to deal with other things before I click the paypalbutton. Hope u can answer my question~
Hi @CodyEngel,
After migrating to version 0.4.0 the payment button always appears loading and the gets hidden.
I have this code to make a log:
payPal.setPaymentButtonEligibilityStatusChanged(paymentButtonEligibilityStatus -> Log.i("PaymentButtonEligibility", String.format("paymentButton : %s", paymentButtonEligibilityStatus)));
The output is the following:
2021-08-09 14:48:40.733 23927-23927/pt.zonesoft.biip I/PaymentButtonEligibility: paymentButton : Loading
2021-08-09 14:49:10.778 23927-23927/pt.zonesoft.biip I/PaymentButtonEligibility: paymentButton : Error
Hi, after the login with a sandbox account the order is confirmed and everything is ok.
While trying to create a new order however the SDK crash with the following
kotlin.UninitializedPropertyAccessException: lateinit property accessToken has not been initialized
at com.paypal.pyplcheckout.utils.PYPLCheckoutUtils.getCheckoutLiteUrl(PYPLCheckoutUtils.kt:239)
at com.paypal.pyplcheckout.utils.PYPLCheckoutUtils.getCheckoutLiteUrl$default(PYPLCheckoutUtils.kt:171)
at com.paypal.pyplcheckout.utils.PYPLCheckoutUtils.fallBackToWeb(PYPLCheckoutUtils.kt:337)
at com.paypal.pyplcheckout.utils.PYPLCheckoutUtils.fallBack(PYPLCheckoutUtils.kt:311)
at com.paypal.pyplcheckout.auth.AuthHandler.authFailure(AuthHandler.kt:84)
at com.paypal.pyplcheckout.flavorauth.ThirdPartyAuth$2.completeWithFailure(ThirdPartyAuth.java:122)
at com.paypal.authcore.authentication.Authenticator$b.onTokenRequestCompleted(Unknown Source:6)
at com.paypal.openid.AuthorizationService$b.a(Unknown Source:57)
at com.paypal.openid.AuthorizationService$b.onPostExecute(Unknown Source:2)
at android.os.AsyncTask.finish(AsyncTask.java:695)
at android.os.AsyncTask.access$600(AsyncTask.java:180)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:712)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
I'm using the last version of the sdk (0.3.1)
Action:
when I click the paypal button , anr shows(Two Nexus phone acts normally, A samsung phone does not behave properly ).
Logcat:
FATAL EXCEPTION: OkHttp Dispatcher Process: com.xxx.xxx, PID: 15025 android.content.ActivityNotFoundException at com.paypal.openid.AuthorizationService.a() at com.paypal.openid.AuthorizationService.performAuthorizationRequest() at com.paypal.authcore.authentication.Authenticator.a() at com.paypal.authcore.authentication.Authenticator.authenticateForAccessTokenWithDelegate() at com.paypal.pyplcheckout.flavorauth.ThirdPartyAuth.getUserAccessToken(ThirdPartyAuth.java:140) at com.paypal.pyplcheckout.home.viewmodel.MainPaysheetViewModel.logInUser(MainPaysheetViewModel.java:1423) at com.paypal.pyplcheckout.home.viewmodel.MainPaysheetViewModel.lambda$gzn7IQlqWzbNXDntwRSNZFJjIRk(MainPaysheetViewModel.java) at com.paypal.pyplcheckout.home.viewmodel.-$$Lambda$MainPaysheetViewModel$gzn7IQlqWzbNXDntwRSNZFJjIRk.onUpdateClientConfig(lambda) at com.paypal.pyplcheckout.home.viewmodel.MainPaysheetViewModel.lambda$updateClientConfigBefore$18(MainPaysheetViewModel.java:676) at com.paypal.pyplcheckout.home.viewmodel.-$$Lambda$MainPaysheetViewModel$7bqLPJINhX0FCLdPicr9f-mb2EU.onEvent(lambda) at com.paypal.pyplcheckout.events.Events.fire(Events.java:119) at com.paypal.pyplcheckout.services.callbacks.ClientConfigUpdateCallback.onApiSuccess(ClientConfigUpdateCallback.kt:54) at com.paypal.pyplcheckout.services.callbacks.BaseCallback.onResponse(BaseCallback.kt:38) at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:504) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)
Phone:
Samsung SM-G9280, Android 6.0.1, android-checkout-sdk 0.3.1
We want to use paypal in our app.We have sent an email to [email protected] in order to obtain the email permission to log in with paypa,but it's been more than 10 days and we haven't received a reply.Our client_id is: AWpMbiZI8NKS7Fq9LfqLi2iQeLNBGbSlQilzGvl8EtMKPjvNy8xd3PaRZKeZ1H63_b3Ag-LmKIY_51RZ
Thanks a lot for your reply.
When I start Charles and then start my App, My app crashes.
When I start my App and then start Charles, everything goes well.
Here is the log:
# OkHttp Dispatcher(6338)
kotlin.UninitializedPropertyAccessException
lateinit property abManager has not been initialized
com.paypal.pyplcheckout.services.callbacks.BaseCallback.retryOnError(BaseCallback.kt:78)
com.paypal.pyplcheckout.services.callbacks.BaseCallback.onFailure(BaseCallback.kt:40)
okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:525)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
java.lang.Thread.run(Thread.java:923)
Before you create a new issue, please search for similar issues. It's possible somebody has encountered this bug already. PLEASE REMOVE THIS LINE TO ACKNOWLEDGE THAT AN ISSUE DOESN'T ALREADY EXIST FOR THIS BUG
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
**Execution failed for task ':app:checkDebugAarMetadata'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not find android.arch.lifecycle:extensions:2.1.0.**
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/android/arch/lifecycle/extensions/2.1.0/extensions-2.1.0.pom
- https://repo.maven.apache.org/maven2/android/arch/lifecycle/extensions/2.1.0/extensions-2.1.0.pom
- https://oss.sonatype.org/content/repositories/snapshots/android/arch/lifecycle/extensions/2.1.0/extensions-2.1.0.pom
- https://cardinalcommerceprod.jfrog.io/artifactory/android/android/arch/lifecycle/extensions/2.1.0/extensions-2.1.0.pom
- file:/C:/Users/Administrator/.m2/repository/android/arch/lifecycle/extensions/2.1.0/extensions-2.1.0.pom
Required by:
project :app > com.paypal.checkout:android-sdk:0.2.0
Could not find android.arch.lifecycle:runtime:2.1.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/android/arch/lifecycle/runtime/2.1.0/runtime-2.1.0.pom
- https://repo.maven.apache.org/maven2/android/arch/lifecycle/runtime/2.1.0/runtime-2.1.0.pom
- https://oss.sonatype.org/content/repositories/snapshots/android/arch/lifecycle/runtime/2.1.0/runtime-2.1.0.pom
- https://cardinalcommerceprod.jfrog.io/artifactory/android/android/arch/lifecycle/runtime/2.1.0/runtime-2.1.0.pom
- file:/C:/Users/Administrator/.m2/repository/android/arch/lifecycle/runtime/2.1.0/runtime-2.1.0.pom
Required by:
project :app > com.paypal.checkout:android-sdk:0.2.0
Possible solution:
Before you create a new issue, please search for similar issues. It's possible somebody has encountered this bug already. PLEASE REMOVE THIS LINE TO ACKNOWLEDGE THAT AN ISSUE DOESN'T ALREADY EXIST FOR THIS BUG
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
AAPT: error: duplicate value for resource 'attr/button_color' with config ''.
During integration, I have conflicts with the existing three-party SDK resource names of the project. Could you modify the resource names?Or could you guide me to deal with this situation?
values.xml
<attr format="enum" name="button_size">
<enum name="small" value="0"/>
<enum name="medium" value="1"/>
<enum name="large" value="2"/>
</attr>
<attr format="enum" name="button_shape">
<enum name="rectangle" value="0"/>
<enum name="pill" value="1"/>
<enum name="rounded" value="2"/>
</attr>
</declare-styleable>
When we wake up SDK payment, we always encounter an occasional crash. The crash log is as follows:
UncaughtException: kotlin.UninitializedPropertyAccessException: lateinit property accessToken has not been initialized
What went wrong:
Execution failed for task ':quickstart-kotlin:mergeDebugNativeLibs'.
Could not resolve all files for configuration ':quickstart-kotlin:debugRuntimeClasspath'.
Could not download cardinalmobilesdk-2.2.4-1.aar (org.jfrog.cardinalcommerce.gradle:cardinalmobilesdk:2.2.4-1)
Could not get resource 'https://cardinalcommerceprod.jfrog.io/artifactory/android/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.4-1/cardinalmobilesdk-2.2.4-1.aar'.
Could not GET 'https://jfrog-prod-use1-shared-virginia-main.s3.amazonaws.com/aol-cardinalcommerceprod/filestore/d5/d5eedb4e46acee81da87bdcf572b3c0f90827b9f?x-jf-traceId=4b1ffcdec49adf39&response-content-disposition=attachment%3Bfilename%3D%22cardinalmobilesdk-2.2.4-1.aar%22&response-content-type=application%2Foctet-stream&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20210824T031059Z&X-Amz-SignedHeaders=host&X-Amz-Expires=60&X-Amz-Credential=AKIASG3IHPL6VGZWKQVB%2F20210824%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=f4dbd1c5179cc6cef60220eaec08f9e0fcad39e065933489bd0bd07f33c7ed40'.
Connect to jfrog-prod-use1-shared-virginia-main.s3.amazonaws.com:443 [jfrog-prod-use1-shared-virginia-main.s3.amazonaws.com/52.217.16.12] failed: Read timed out
allprojects {
repositories {
mavenCentral()
mavenLocal()
google()
jcenter()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
allprojects {
repositories {
mavenCentral()
mavenLocal()
google()
jcenter()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
maven {
url "https://cardinalcommerceprod.jfrog.io/artifactory/android"
credentials {
username 'braintree_team_sdk'
password 'AKCp8jQcoDy2hxSWhDAUQKXLDPDx6NYRkqrgFLRc3qDrayg6rrCbJpsKKyMwaykVL8FWusJpp'
}
}
}
I ran this demo and found this error. Please tell me how to solve this error. Thank you
Hello, I have an issue with my application. The webpage doesn't redirect back to the app after I've logged in. It goes back to the login screen (cc: the picture).
I've put the correct redirect URLs both on the dashboard and in code.
I've cross-checked the application ID too to be sure.
What could be the problem please
androidx.lifecycle.LiveData in observe at line 6
com.paypal.pyplcheckout.home.view.fragments.HomeFragment in initPYPLHomeViewModelObservers at line 13
com.paypal.pyplcheckout.home.view.fragments.HomeFragment in onActivityCreated at line 12
androidx.fragment.app.Fragment in performActivityCreated at line 4
androidx.fragment.app.FragmentStateManager in activityCreated at line 3
androidx.fragment.app.FragmentStateManager in moveToExpectedState at line 17
androidx.fragment.app.FragmentManager in executeOpsTogether at line 34
androidx.fragment.app.FragmentManager in removeRedundantOperationsAndExecute at line 10
androidx.fragment.app.FragmentManager in execPendingActions at line 4
androidx.fragment.app.FragmentManager in dispatchStateChange at line 9
androidx.fragment.app.FragmentManager in dispatchActivityCreated at line 4
androidx.fragment.app.FragmentController in dispatchActivityCreated at line 1
androidx.fragment.app.FragmentActivity in onStart at line 6
androidx.appcompat.app.AppCompatActivity in onStart at line 1
android.app.Instrumentation in callActivityOnStart at line 1433
android.app.Activity in performStart at line 7858
android.app.ActivityThread in handleStartActivity at line 3347
android.app.servertransaction.TransactionExecutor in performLifecycleSequence at line 221
android.app.servertransaction.TransactionExecutor in cycleToPath at line 201
android.app.servertransaction.TransactionExecutor in executeLifecycleState at line 173
android.app.servertransaction.TransactionExecutor in execute at line 97
android.app.ActivityThread$H in handleMessage at line 2063
android.os.Handler in dispatchMessage at line 107
android.os.Looper in loop at line 214
android.app.ActivityThread in main at line 7615
java.lang.reflect.Method in invoke
com.android.internal.os.RuntimeInit$MethodAndArgsCaller in run at line 492
com.android.internal.os.ZygoteInit in main at line 964
Hello,
I have a question related to the PayPal Native Checkout SDK. I've already tried to find a similar problem here, but didn't find any. Originally we asked this question in the PayPal issue tracker, but they directed us here.
Here is the issue's description:
The first payment attempt brings the full sized login window. Enters login/pass there and press "Log in" button. After that, the bottom panel should be shown in front of the app's window. However, it shows under app's window, please check the screenshot paypal1.png; the app's log for this attempt stored in the file paypal_log.txt.
On each next attempt, login window doesn't show, but bottom panel appears on the screen and the payment process is hanged up on a stage "Pulling up your digital wallet..."; please check the screenshot paypal2.png and the log file paypal_log2.txt. However, this process can be aborted by the device's "Back" button - it brings to screen the exit dialog, screenshot paypal3.png.
Restarting the app doesn't help and payment process finishes with the same result - process hangs on the same stage. If app's data/cache will be cleaned - only then payment process will be started with the login window.
The used device is Samsung SM-G900F Android 6.0.1, API 23. PayPal Native Checkout SDK version 5.0.1.
Could you, please, help with the resolving of this issue? Thank you in advance!
After setting up everything on my paypal account, i am able to use the paymentButton to start the payment.
However, after the authorization my app does not come to the foreground. The same happens if i cancel the payment process.
I verified and all the return URIs are correctly configured.
In iOS a don't have any problem, only on Android.
The payment was successfully initiated through the payment button provided by the SDK. It was found that the balance of the sandbox account was reduced, but the order notification could not be found on the developer platform. In the past, it was possible to pay through com.braintreepayments.api:paypal:4.+ Order notification
I encountered a problem. When I make the phone's network unavailable, PaypalButton shows loading, which is normal. But when I make the mobile network available, PaypalButton still shows loading. Even restarting the app will not solve this problem.
AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher
kotlin.UninitializedPropertyAccessException: lateinit property abManager has not been initialized
at com.paypal.pyplcheckout.services.callbacks.BaseCallback.retryOnError(BaseCallback.kt:78)
at com.paypal.pyplcheckout.services.callbacks.BaseCallback.onFailure(BaseCallback.kt:40)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:525)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
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.