omise / omise-android Goto Github PK
View Code? Open in Web Editor NEWOmise Android SDK
Home Page: https://docs.opn.ooo
License: Other
Omise Android SDK
Home Page: https://docs.opn.ooo
License: Other
I got this MasterCard test 2221 0000 0000 0009. In iOS version, the CreditCardText can identify that is MasterCard but in Android it can't https://prnt.sc/p214ux
Android Studio Chipmunk
classpath 'com.android.tools.build:gradle:4.0.1'
distributionUrl=https://services.gradle.org/distributions/gradle-6.1.1-all.zip
compileSdkVersion : 31,
buildToolsVersion :"30.0.2",
minSdkVersion :21,
targetSdkVersion :31
root ------------------------------------------------------------------------------->build.gradle
buildscript {
ext.kotlin_version = '1.6.10'
repositories {
maven { url 'https://maven.aliyun.com/repository/google'}
maven { url 'https://maven.aliyun.com/repository/public'}
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
maven { url 'https://maven.aliyun.com/repository/google'}
maven { url 'https://maven.aliyun.com/repository/public'}
maven { url 'https://jitpack.io' }
flatDir {
dirs 'libs'
}
}
}
app ------------------------------------------------------------------------------->build.gradle
dependencies {
implementation 'co.omise:omise-android:3.2.1'
}
------------------------------------------------------------------------------------->
According to the above configuration, version 3.2.1 can be integrated and used normally.
You can see it under the External Libraries directory:
Gradle:co.omise:omise-android:3.2.1@aar
But when I changed 3.2.1 to 4.8.0 and synchronized the project, I finally found that the integration failed.
Package name cannot be found for all classes.Please help me see if there is a problem with my integration configuration.
@nuxzero
I read omise cards-api document i see bank
in the table.
But. I no see in Card
model class
public final String country;
public final String city;
public final String postalCode;
public final String financing;
public final String lastDigits;
public final String brand;
public final int expirationMonth;
public final int expirationYear;
public final String fingerprint;
public final String name;
public final boolean securityCodeCheck;
Do you explain for me why it difference?
Best Regard.
this version is open or not. but i can use version 2.2.0
When i set minifyEnabled is true
Compiler return below
Warning:co.omise.android.CardIO: can't find referenced class io.card.payment.CardIOActivity
Warning:co.omise.android.ui.CreditCardActivity: can't find referenced class io.card.payment.CardIOActivity
Warning:co.omise.android.ui.CreditCardActivity: can't find referenced class io.card.payment.CreditCard
How to fix it?
can you research if there is a treading issue. if i test too quickly on the authorize activity then odd time it fails. out of 10 times testing it can fail twice if i go too quickly hitting the success button produces failure at odd times. we want to put this in espresso test so we dont want it to be flaky. Confirmed i am passing in authorize uri and return uri to the activity. it all works just sometimes it fails if i go quickly.
Hi there, I recently got my app approved from the omise review team and they suggested that I should add 3d secure as well. They mentioned that they have activated 3d secure on my account. I have a few questions:
Hi team omise,
The current lib supports android 19 and up. Is there any possibility for android version prior to 19 to leverage this library?I'd like to go down as far as 15 in my case. If not ,what would be the solution for those old android versions? Thanks.
Hi,
It seems that the card brand logo (within the SDK) for VISA and MasterCard (at least) are white and not colored like the original. Not sure if this is intended ?
The resources are retrieved from the code below (as in CreditCardActivity):
CardBrand.getLogoResourceId()
Thank you,
Jitrapon
I am using Credit Card Activity, and as far I know, I should handle the result in here
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (resultCode == RESULT_CANCELED) {
// handle the cancellation
return
}
if (requestCode == REQUEST_CC) {
val token = data?.getParcelableExtra<Token>(EXTRA_TOKEN_OBJECT)
// process your token here
}
}
I have two questions.
on iOS SDK, I can differentiate very easily using the code below
extension ViewController: CreditCardFormViewControllerDelegate {
func creditCardFormViewController(_ controller: CreditCardFormViewController, didSucceedWithToken token: Token) {
dismissCreditCardForm()
// Sends `Token` to your server to create a charge, or a customer object.
}
func creditCardFormViewController(_ controller: CreditCardFormViewController, didFailWithError error: Error) {
dismissCreditCardForm()
// Only important if we set `handleErrors = false`.
// You can send errors to a logging service, or display them to the user here.
}
}
this is not a bug actually
this is not a bug actually
No response
No response
implementation 'co.omise:omise-android:4.+'
During builds. Might need to fix some XML.
Is it possible to use real debit/credit cards to make test transactions without deducting the balance from the cards?
Request createChargeRequest = new Charge.CreateRequestBuilder()
.amount(100000)
.currency("THB")
.card(token.getId())
.build();
Charge charge = client().sendRequest(createChargeRequest);
in this code Charge class not found in sdk
Most of the apps now are based on APPCompat, are you going to update the library or at least add a different AppCompat Activity?
Android Studio->
Android Studio Dolphin | 2021.3.1 Patch 1
AGP ->
classpath 'com.android.tools.build:gradle:7.2.2'
distributionUrl=https://services.gradle.org/distributions/gradle-7.3.3-all.zip
Omise Sdk ->
implementation 'co.omise:omise-android:4.10.0'
The following errors are often encountered during Android Studio compilation
Unable to locate resourceFile (D:.........\app\build\intermediates\merged-not-compiled-resources\google_dev\debug\drawable\bg_edit_text_outlined.xml) in source-sets.
bg_edit_text_outlined.xml , I found that it was only used in Omise Sdk.
I can temporarily resolve it through the following methods:
Can you help me check this issue?
Card must be a hash is required ?
Unable to start activity
java.lang.ClassCastException: co.omise.android.ui.AuthorizingPaymentActivity cannot be cast to androidx.appcompat.app.AppCompatActivity
Is it possible to save the customer card details (name, card number, cvv and expiry) on the client side using the android sdk?
I think this issue was fixed on branch handle-alipay-authorize-uri but not merged.
co.omise:omise-android:4.8.0 Include the following dependencies:
com.google.android.gms:play-services-ads-lite:18.3.0
com.google.android.gms:play-services-ads:18.3.0
My app did not add these two dependent libraries.
Google Paly Store Reminder:
The SDK version has been reported as outdated, please upgrade to a newer version (19.3.0+).
Starting from 00:00 Universal Coordinated Time (UTC) on July 27, 2023, you will no longer be able to release new versions of applications containing this SDK version.
How should I handle this problem?
Proguard rules are missing in documentation.
Hi team,
Could you please provide authorize URLs and Return URLs for testing?
Hi
My app got this warning when submitting to Google Play Store. The warning came omise-android
because it is using outdated com.google.android.gms:play-services-ads 18.3.0
.
Dependencies output
+--- co.omise:omise-android:4.8.0
| +--- co.omise:threeds-android:1.0.0-alpha11
| | +--- com.google.android.gms:play-services-ads:18.3.0
Full warning from Google Play:
Warning
The developer of Google Mobile Ads (GMA) SDK (com.google.android.gms:play-services-ads) has reported version 18.3.0 as outdated. Consider upgrading to one of the following versions before publishing a new release: 19.2.0+.
Learn more about the SDKs that you're using and make informed SDK choices with Google Play SDK Index.
Warning
The developer of Google Mobile Ads (GMA) SDK (com.google.android.gms:play-services-ads) added the following note to SDK version 18.3.0:
This version is officially deprecated, and will soon disable ad loading. Please update to a new version. See Deprecation and sunset | Android | Google Developers for more details.
Learn more about the SDKs that you're using and make informed SDK choices with Google Play SDK Index.
Warning
The developer of Google Mobile Ads (GMA) SDK (com.google.android.gms:play-services-ads-lite) has reported version 18.3.0 as outdated. Consider upgrading to one of the following versions before publishing a new release: 19.2.0+.
Learn more about the SDKs that you're using and make informed SDK choices with Google Play SDK Index.
Same to the question above, could we have DomStorage
enable from WebView in AuthorizingPaymentActivity? Or can you provide a way to enable DomStorage on AuthorizingPaymentActivity's WebView via Intent data 🤔
The context is:
2020-07-29 17:41:48.469 14598-14598/co.omise.gcpf.app.staging I/chromium: [INFO:CONSOLE(1154)] "Uncaught TypeError: Cannot read property 'removeItem' of null", source: webpack:///../deps/phoenix_live_view/priv/static/phoenix_live_view.js? (1154)
removeItem
comes from a dom sessionStorage.
I'm not sure if there is any security concerns to enable DOM storage on AuthorizingPaymentActivity's WebView
domStorageEnabled = true
#When building a signed apk i get the following warning:
Warning:co.omise.android.ui.CreditCardActivity$ActivityTokenRequestListener: can't find referenced field 'int text_error_message' in program class co.omise.android.R$id
here are my gradle dependencies:
implementation 'co.omise:omise-android:2.3.+'
adding the following to proguard does not rectify the warning:
# Omise
-dontwarn okio.**
-dontwarn com.google.common.**
-dontwarn org.joda.time.**
if it makes any difference we are also using the following dependencies:
//barcode scanner
implementation 'com.journeyapps:zxing-android-embedded:3.5.0'
//card scanner
implementation 'io.card:android-sdk:5.5.1'
and we have been using your sdk in production for many months now with no issue but we have task to clean this warning.
EXTRA_EXPECTED_RETURN_URLSTRING_PATTERNS i set to https://www.mywebsite.com
but the problem is i am using a native app and i do not want to leave the application after i get the authorization call back of either success/failure in the acitivityResult. I tried setting the EXTRA_EXPECTED_RETURN_URLSTRING_PATTERNS to an empty array but its not helping. What i want to accomplish is that after the user authenticates your activity then closes and sends me a result code, i'll open a native window depending on that result. How can i accomplish this ?
when i try to send an empty string for return URL i get the following stack trace error:
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equalsIgnoreCase(java.lang.String)' on a null object reference
03-09 03:23:29.990 3196-3196/com.mobile.myapp.labs W/System.err: at co.omise.android.ui.AuthorizingPaymentActivity$a.a(SourceFile:75)
03-09 03:23:29.990 3196-3196/com.mobile.myapp.labs W/System.err: at co.omise.android.ui.AuthorizingPaymentActivity$1.shouldOverrideUrlLoading(SourceFile:110)
03-09 03:23:29.990 3196-3196/com.mobile.myapp.labs W/System.err: at com.android.webview.chromium.WebViewContentsClientAdapter.shouldOverrideUrlLoading(WebViewContentsClientAdapter.java:331)
03-09 03:23:29.990 3196-3196/com.mobile.myapp.labs W/System.err: at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(AwContentsClientBridge.java:265)
03-09 03:23:29.990 3196-3196/com.mobile.myapp.labs W/System.err: at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
03-09 03:23:29.990 3196-3196/com.mobile.myapp.labs W/System.err: at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:53)
03-09 03:23:29.990 3196-3196/com.mobile.myapp.labs W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
03-09 03:23:29.990 3196-3196/com.mobile.myapp.labs W/System.err: at android.os.Looper.loop(Looper.java:148)
03-09 03:23:29.990 3196-3196/com.mobile.myapp.labs W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5417)
03-09 03:23:29.990 3196-3196/com.mobile.myapp.labs W/System.err: at java.lang.reflect.Method.invoke(Native Method)
03-09 03:23:29.990 3196-3196/com.mobile.myapp.labs W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
03-09 03:23:29.990 3196-3196/com.mobile.myapp.labs W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Line 27 in 9698f26
Please can you upgrade jackson-databind to version 2.10.0 or higher?
currently It is possible to conduct a Deserialization attack using the oadd.org.apache.xalan.lib.sql.JNDIConnectionPool (apache/drill) class gadget if polymorphic type handling is enabled and an application using this package allows user input which gets deserialized
https://cwe.mitre.org/data/definitions/502.html
Just added a dependency to the gradle build script and tried to build. It conflicts with other lib we use.
> Duplicate class a.a.a.a.a found in modules jetified-frames-android-3.0.1-runtime (com.github.checkout:frames-android:3.0.1) and jetified-threeds-android-1.0.0-alpha08-runtime (co.omise:threeds-android:1.0.0-alpha08)
Duplicate class a.a.a.a.b found in modules jetified-frames-android-3.0.1-runtime (com.github.checkout:frames-android:3.0.1) and jetified-threeds-android-1.0.0-alpha08-runtime (co.omise:threeds-android:1.0.0-alpha08)
Duplicate class a.a.a.a.c found in modules jetified-frames-android-3.0.1-runtime (com.github.checkout:frames-android:3.0.1) and jetified-threeds-android-1.0.0-alpha08-runtime (co.omise:threeds-android:1.0.0-alpha08)
Duplicate class a.a.a.a.e.a found in modules jetified-frames-android-3.0.1-runtime (com.github.checkout:frames-android:3.0.1) and jetified-threeds-android-1.0.0-alpha08-runtime (co.omise:threeds-android:1.0.0-alpha08)
Duplicate class a.a.a.a.e.b found in modules jetified-frames-android-3.0.1-runtime (com.github.checkout:frames-android:3.0.1) and jetified-threeds-android-1.0.0-alpha08-runtime (co.omise:threeds-android:1.0.0-alpha08)
Duplicate class a.a.a.a.e.c found in modules jetified-frames-android-3.0.1-runtime (com.github.checkout:frames-android:3.0.1) and jetified-threeds-android-1.0.0-alpha08-runtime (co.omise:threeds-android:1.0.0-alpha08)```
Both the project and the third-party SDK use okhttp3 dependencies, resulting in an error in the interface call
implementation "co.omise:omise-android:4.10.0"
Hello Omise team
Thank you library for android
I try library for android and it can get token ok
but can i user android library for create customer and store card to customer or I just get token by android library and sent it to server site for create customer and store card to customer
i saw in README.md
" This library also allows you to securely store customers card data and can be used for their next payment with out input it again "
but i can not saw in example
Thank you so much
Adisak.
Hi team
I am facing crash issue when inputting asterisk (*) into ExpiryDateEditText, please help to check
Omise version: 4.8.0
Crash log:
java.lang.NumberFormatException: For input string: "*" at java.lang.Integer.parseInt(Integer.java:604) at java.lang.Integer.parseInt(Integer.java:650) at co.omise.android.ui.ExpiryDateEditText.formatString(SourceFile:1) at co.omise.android.ui.ExpiryDateEditText.setExpiryDateText(SourceFile:3) at co.omise.android.ui.ExpiryDateEditText.access$setExpiryDateText(SourceFile:1) at co.omise.android.ui.ExpiryDateEditText$a.onTextChanged(SourceFile:15) at android.widget.TextView.sendOnTextChanged(TextView.java:10961) at android.widget.TextView.handleTextChanged(TextView.java:11076) at android.widget.TextView$ChangeWatcher.onTextChanged(TextView.java:14205) at android.text.SpannableStringBuilder.sendTextChanged(SpannableStringBuilder.java:1268) at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:577) at androidx.emoji2.text.SpannableBuilder.replace(SpannableBuilder.java:314) at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:508) at androidx.emoji2.text.SpannableBuilder.replace(SpannableBuilder.java:304) at androidx.emoji2.text.SpannableBuilder.replace(SpannableBuilder.java:48) at android.view.inputmethod.BaseInputConnection.replaceText(BaseInputConnection.java:944) at android.view.inputmethod.BaseInputConnection.commitText(BaseInputConnection.java:219) at com.android.internal.widget.EditableInputConnection.commitText(EditableInputConnection.java:204) at android.view.inputmethod.InputConnectionWrapper.commitText(InputConnectionWrapper.java:192) at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:572) at com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:134) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:233) at android.os.Looper.loop(Looper.java:334) at android.app.ActivityThread.main(ActivityThread.java:8513) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1068)
Is there any Java code? This is all kotlin code for Android .
Error description:-
javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x59188280: Failure in SSL library, usually a protocol error error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:741 0x5c43ed38:0x00000000)
Can you please check that proper certificates are provided in the client builder to fix this.
**Android 5.1.1,level 22 ---> i-mobile IQ Z BRIGHT ---> arm64-v8a **
String resource ID #0x2040003
java.lang.RuntimeException:Unable to start activity ComponentInfo{com.xxx.xxx/co.omise.android.ui.AuthorizingPaymentActivity}: android.view.InflateException: Binary XML file line #9: Error inflating class android.webkit.WebView
5 android.content.res.Resources$NotFoundException:String resource ID #0x2040003
6 android.content.res.Resources.getText(Resources.java:299)
7 android.content.res.Resources.getString(Resources.java:385)
8 com.android.org.chromium.content.browser.ContentViewCore.setContainerView(ContentViewCore.java:684)
9 com.android.org.chromium.content.browser.ContentViewCore.initialize(ContentViewCore.java:608)
10 com.android.org.chromium.android_webview.AwContents.createAndInitializeContentViewCore(AwContents.java:631)
11 com.android.org.chromium.android_webview.AwContents.setNewAwContents(AwContents.java:780)
12 com.android.org.chromium.android_webview.AwContents.(AwContents.java:619)
13 com.android.org.chromium.android_webview.AwContents.(AwContents.java:556)
14 com.android.webview.chromium.WebViewChromium.initForReal(WebViewChromium.java:312)
15 com.android.webview.chromium.WebViewChromium.access$100(WebViewChromium.java:96)
16 com.android.webview.chromium.WebViewChromium$1.run(WebViewChromium.java:264)
17 com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue.drainQueue(WebViewChromium.java:123)
18 com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue$1.run(WebViewChromium.java:110)
19 com.android.org.chromium.base.ThreadUtils.runOnUiThread(ThreadUtils.java:144)
20 com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue.addTask(WebViewChromium.java:107)
21 com.android.webview.chromium.WebViewChromium.init(WebViewChromium.java:261)
22 android.webkit.WebView.(WebView.java:554)
23 android.webkit.WebView.(WebView.java:489)
24 android.webkit.WebView.(WebView.java:472)
25 android.webkit.WebView.(WebView.java:459)
26 java.lang.reflect.Constructor.newInstance(Native Method)
27 java.lang.reflect.Constructor.newInstance(Constructor.java:288)
28 android.view.LayoutInflater.createView(LayoutInflater.java:607)
29 com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:55)
30 android.view.LayoutInflater.onCreateView(LayoutInflater.java:682)
31 android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741)
32 android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
33 android.view.LayoutInflater.inflate(LayoutInflater.java:504)
34 android.view.LayoutInflater.inflate(LayoutInflater.java:414)
35 android.view.LayoutInflater.inflate(LayoutInflater.java:365)
36 androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:9)
37 androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:1)
38 co.omise.android.ui.AuthorizingPaymentActivity.onCreate(SourceFile:2)
As an Omise developer, I want to add the new payment method in the payment form page of the Omise Android SDK. But it’s slightly complicated because there are many places required for me to change in the codebase.
To accomplish this story, the Omise Android SDK shall contain all resources of payment methods in a single source. And the Omise Android SDK shall consume the resources for displaying in the payment creator page.
Declaration
sealed class PaymentMethodResource(...) {
object CreditCard(
iconRes = R.drawable.payment_card,
titleRes = R.string.payment_method_credit_card_title,
indicatorIconRes = R.drawable.ic_next
): PaymentMethodResource
object InstallmentBbl(
iconRes = R.drawable.payment_bbl,
titleRes = R.string.payment_method_installment_bbl_title,
indicatorIconRes = R.drawable.ic_next,
sourceType = InstallmentChooserItem.Bbl
): PaymentMethodResource
object InternetBankingScb(
iconRes = R.drawable.payment_scb,
titleRes = R.string.payment_method_internet_banking_scb_title,
indicatorIconRes = R.drawable.ic_redirect,
sourceType = SourceType.InternetBanking.Scb
): PaymentMethodResource
}
Usage
class OmiseItemViewHolder(val view: View, val listener: OmiseListItemClickListener?) : RecyclerView.ViewHolder(view) {
fun bind(item: PaymentMethodResource) {
...
optionImage.setImageResource(item.iconRes)
optionImage.visibility = View.VISIBLE
nameText.text = item.titleRes
typeImage.setImageResource(item.indicatorIconRes)
view.setOnClickListener { listener?.onClick(item) }
}
}
I tested and it worked now for sony and asus device
Hello Omise Team
we are going to implement Prompt Pay feature on our Android and iOS app
is it ready to be used?
it would be great if you add Prompt Pay to PaymentCreator Activity too
I've got the error from 'Invocation.java line 51' co.omise.android.Invocation.processCall.
Hi team,
I notice the SDK doesnt support to set FLAG_SECURE to SDK activities
Payment applications nowadays require to prevent the app not to show Preview in Recent Apps and record video/screenshot in screens which have sensitive data like user payment information
So is there any plan to add SDK configuration to enable FLAG_SECURE in the future ?
Please use appcompact activity. This is required to have material theme with toolbar with style. Also please support to light theme also. Currently background is black. If we change it to light then spinner item text is not showing.
Any a particular reason to update your Android SDK min version to Android 18?
I am currently using omise-sdk version 2.0.1 and cannot update it to 2.6.4 because my application minSdk version is set to Android 15.
Is it possible to bring your minimum support sdk down to 15?
Am I crazy or does 'requestToken' not include the card branding information?
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.