Giter Site home page Giter Site logo

hipay / hipay-fullservice-sdk-android Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 7.0 7.67 MB

Official repository of the HiPay Fullservice SDK for Android.

Home Page: https://developer.hipay.com/doc/hipay-fullservice-sdk-android/

License: Apache License 2.0

Java 99.55% Ruby 0.39% Shell 0.06%

hipay-fullservice-sdk-android's People

Contributors

etiennelandais avatar legithubdeaymeric avatar nfillion21 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hipay-fullservice-sdk-android's Issues

Italian language localization

Hi, we would like to add localization for "payment screen" targeting the italian language

We're about to open a pull request for that

Enable Proguard

Hi,

I've some errors when i'm trying to enable proguard (org.apache.*)
Is there a specific configuration to add to proguard configuration file ?

Thank you

Target SDK version 31

Hello,

When we set the targetSDKVersion to 31, we get this error :

Manifest merger failed : android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.

To resolve this, we have to edit manually the Hipay's section in the manifest at each gradle sync.

Incorrect connection string on SecureVaultClient

Hi,

Few days ago, you have released a new version of SDK (v.1.4.0).
Something wrongs here :

a81cacb

As you can see, the connection string about SecureVaultClientBaseURLProduction is incorrect for Production Environment.

Can you please fix that quickly ?

Thanks a lot

Crash when removing the first character from the card number when it's a space.

Hi HiPay team.

I crash when I remove the first character of the card number if it is the space " " from the card number.
I am using compile 'com.hipay.fullservice:hipayfullservice:1+' so I have your last sdk version (1.3.1).

05-02 14:35:18.124 23537-23537/ D/Error: ERR: stack=java.lang.IndexOutOfBoundsException: replace (-1 ... 0) starts before 0
at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1270)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:515)
at android.text.SpannableStringBuilder.delete(SpannableStringBuilder.java:230)
at android.text.SpannableStringBuilder.delete(SpannableStringBuilder.java:229)
at com.hipay.fullservice.screen.fragment.TokenizableCardPaymentFormFragment$GenericTextWatcher.afterTextChanged(TokenizableCardPaymentFormFragment.java:645)
at android.widget.TextView.sendAfterTextChanged(TextView.java:8202)
at android.widget.TextView$ChangeWatcher.afterTextChanged(TextView.java:10381)
at android.text.SpannableStringBuilder.sendAfterTextChanged(SpannableStringBuilder.java:1218)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:579)
at android.text.SpannableStringBuilder.delete(SpannableStringBuilder.java:230)
at android.text.SpannableStringBuilder.delete(SpannableStringBuilder.java:229)
at com.hipay.fullservice.screen.fragment.TokenizableCardPaymentFormFragment$GenericTextWatcher.afterTextChanged(TokenizableCardPaymentFormFragment.java:645)
at android.widget.TextView.sendAfterTextChanged(TextView.java:8202)
at android.widget.TextView$ChangeWatcher.afterTextChanged(TextView.java:10381)
at android.text.SpannableStringBuilder.sendAfterTextChanged(SpannableStringBuilder.java:1218)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:579)
at android.text.SpannableStringBuilder.delete(SpannableStringBuilder.java:230)
at android.text.SpannableStringBuilder.delete(SpannableStringBuilder.java:229)
at com.hipay.fullservice.screen.fragment.TokenizableCardPaymentFormFragment$GenericTextWatcher.afterTextChanged(TokenizableCardPaymentFormFragment.java:645)
at android.widget.TextView.sendAfterTextChanged(TextView.java:8202)
at android.widget.TextView$ChangeWatcher.afterTextChanged(TextView.java:10381)
at android.text.SpannableStringBuilder.sendAfterTextChanged(SpannableStringBuilder.java:1218)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:579)
at android.text.SpannableStringBuilder.delete(SpannableStringBuilder.java:230)
at android.text.SpannableStringBuilder.delete(SpannableStringBuilder.java:229)
at com.hipay.fullservice.screen.fragment.TokenizableCardPaymentFormFragment$GenericTextWatcher.afterTextChanged(TokenizableCardPaymentFormFragment.java:645)
at android.widget.TextView.sendAfterTextChanged(TextView.java:8202)
at android.widget.TextView$ChangeWatcher.afterTextChanged(TextView.java:10381)
at android.text.SpannableStringBuilder.sendAfterTextChanged(SpannableStringBuilder.java:1218)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:579)
at android.text.SpannableStringBuilder.delete(SpannableStringBuilder.java:230)
at android.text.SpannableStringBuilder.delete(SpannableStringBuilder.java:229)
at com.hipay.fullservice.screen.fragment.TokenizableCardPaymentFormFragment$GenericTextWatcher.afterTextChanged(TokenizableCardPaymentFormFragment.java:645)
at android.widget.TextView.sendAfterTextChanged(TextView.java:8202)
at android.widget.TextView$ChangeWatcher.afterTextChanged(TextView.java:10381)
at android.text.SpannableStringBuilder.sendAfterTextChanged(SpannableStringBuilder.java:1218)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:579)
at android.text.SpannableStringBuilder.delete(SpannableStringBuilder.java:230)
at android.text.SpannableStringBuilder.delete(SpannableStringBuilder.java:229)
at com.hipay.fullservice.screen.fragment.TokenizableCardPaymentFormFragment$GenericTextWatcher.afterTextChanged(TokenizableCardPaymentFormFragment.java:645)
at android.widget.TextView.sendAfterTextChanged(TextView.java:8202)
at android.widget.TextView$ChangeWatcher.afterTextChanged(TextView.java:10381)
at android.text.SpannableStringBuilder.sendAfterTextChanged(SpannableStringBuilder.java:1218)
at android.text.SpannableStringBu

Missing methods

Hello,
I'm using your SDK your storing/getting cards on iOS and Android.
I saw a LOT of difference between the two platform, why??
There are missing MANDATORY method for managing the token inside your Android SDK, where is the lookupPaymentCardWithToken method?
I look up on your source code and saw something like LookupPaymentCardRequestCallback class, so?

Cheers
François

HTTP 400 error when generating card token

I get "An error occurred: Your request could not be completed" every time I attempt to make a payment. It may not be SDK related because this happens in versions 1.0.1, 1.0.2 and 1.1.0 (I didn't tested v1.0.0).
However everything is working fine with iOS SDK.

The payment process fails at card token creation:
https://stage-secure-vault.hipay-tpp.com/rest/v1/token/create

The httpResult.errorStream looks like this:

{  
   "code":"410",
   "message":"cardNumber format expected integer but was : ",
   "description":"- code : 410 - msg : cardNumber format expected integer but was : ",
   "brand":"",
   "pan":"",
   "card_holder":"",
   "card_expiry_month":"",
   "card_expiry_year":"",
   "issuer":"",
   "country":"",
   "domesticNetwork":""
}

SecurePayment and RecuringPayment : pending or completed transaction result.

Hi HiPay Team.

I have been issuing a problem with my test payment. When I use the Secure one, I get pending transaction back while using a Recuring one returns me a completed transaction. In the two cases, I use the same test Card.

Here my debug information about my two transactions :

Secure transaction

attemptId = "1"
avsResult = {Transaction$AVSResult@6891} "AVSResultNotApplicable"
cdata1 = "job-59120e1a2d00000b0067dfcb"
cdata10 = ""
cdata2 = "PaymentDeposit"
cdata3 = "user-56658bc71200003e6ac68f56"
cdata4 = "petite_plomberie"
cdata5 = ""
cdata6 = ""
cdata7 = ""
cdata8 = ""
cdata9 = ""
cvcResult = {Transaction$CVCResult@6902} "CVCResultNotApplicable"
deviceId = ""
eci = {Transaction$ECI@6904} "SecureECommerce"
forwardUrl = null
fraudScreening = {FraudScreening@6978}
ipAddress = "0.0.0.0"
ipCountry = ""
order = {Order@6981}
paymentMethod = {PaymentCardToken@6982}
paymentProduct = "visa"
reason = ""
referenceToPay = null
state = {Transaction$TransactionState@6912} "TransactionStatePending"
threeDSecure = null
authorizationCode = "test123"
authorizedAmount = {Float@6985} "8.55"
capturedAmount = {Float@6986} "0.0"
currency = "EUR"
dateAuthorized = {Date@6988} "Tue May 09 19:30:16 GMT+00:00 2017"
dateCreated = {Date@6989} "Tue May 09 19:30:12 GMT+00:00 2017"
dateUpdated = {Date@6990} "Tue May 09 19:30:16 GMT+00:00 2017"
decimals = {Float@6991} "2.0"
message = "Risk Challenged"
mid = "00001328317"
refundedAmount = {Float@6994} "0.0"
status = {TransactionRelatedItem$TransactionStatus@6924} "TransactionStatusAuthorizedAndPending"
test = {Boolean@6925} "true"
transactionReference = "134378436570"
shadow$klass = {Class@5934} "class com.hipay.fullservice.core.models.Transaction"
shadow$monitor = -2140249256

Recuring transaction

attemptId = "1"
avsResult = {Transaction$AVSResult@6891} "AVSResultNotApplicable"
cdata1 = "job-59120e1a2d00000b0067dfcb"
cdata10 = ""
cdata2 = "PaymentDeposit"
cdata3 = "user-56658bc71200003e6ac68f56"
cdata4 = "petite_plomberie"
cdata5 = ""
cdata6 = ""
cdata7 = ""
cdata8 = ""
cdata9 = ""
cvcResult = {Transaction$CVCResult@6902} "CVCResultNotApplicable"
deviceId = ""
eci = {Transaction$ECI@7058} "RecurringECommerce"
forwardUrl = null
fraudScreening = {FraudScreening@7059}
ipAddress = "0.0.0.0"
ipCountry = ""
order = {Order@7062}
paymentMethod = {PaymentCardToken@7063}
paymentProduct = "visa"
reason = ""
referenceToPay = ""
state = {Transaction$TransactionState@7066} "TransactionStateCompleted"
threeDSecure = null
authorizationCode = "test123"
authorizedAmount = {Float@7068} "8.55"
capturedAmount = {Float@7069} "8.55"
currency = "EUR"
dateAuthorized = {Date@7071} "Tue May 09 19:34:31 GMT+00:00 2017"
dateCreated = {Date@7072} "Tue May 09 19:34:23 GMT+00:00 2017"
dateUpdated = {Date@7073} "Tue May 09 19:34:31 GMT+00:00 2017"
decimals = {Float@7074} "2.0"
message = "Captured"
mid = "00001328317"
refundedAmount = {Float@7077} "0.0"
status = {TransactionRelatedItem$TransactionStatus@7078} "TransactionStatusCaptured"
test = {Boolean@6925} "true"
transactionReference = "134378437061"
shadow$klass = {Class@5934} "class com.hipay.fullservice.core.models.Transaction"
shadow$monitor = -2029721558

Do you have any tips about what I am doing wrong ?
Thanks for your answer.

Bastien.

3D secure : captured into the ForwardWebViewActivity

Hi Hipay Team.

Once again, I open an issue.
When I use 3D secure, I am redirected to my website, with its own url.

You are waiting for urls like hipay://hipay-fullservice/gateway/orders/.../pending with "..." replacing anything according to the code :

if ( data.getHost().equals(getString(R.string.hipay_host)) &&
           data.getScheme().equals(getString(R.string.hipay_scheme))) {
   ...
   }

and in transactionFromCallbackIntent(Uri data)

     if (!pathSegments.isEmpty() && pathSegments.size() == 4) {
                if (pathSegments.get(0).equalsIgnoreCase(OrderRelatedRequest.GatewayCallbackURLPathName) && 
                pathSegments.get(1).equalsIgnoreCase(OrderRelatedRequest.GatewayCallbackURLOrderPathName) &&  
                transactionStatus.containsKey(pathSegments.get(3)))

In my case, i have urls like : https://example.com/.../.../pending.

I an easily override the scheme and the host, but there is no easy way to change the last ifs conditions.
Is there a solution ?

Pull request following

Focusing the username field first

Hi HiPay team.

when i open HiPay with the easiest integration, I notice that the card number is the field focused in the new card input screen.

Can you consider focusing the user name first since it is required and empty ?

Thank you for the improvement.

Simple integration :: transactionReference is null

In onActivityResult after a successful payment with HiPay SDK simple integration, I get the transaction from bundle with the following line of code:
Transaction transaction = Transaction.fromBundle(transactionBundle);
At this point it looks like some transaction details are missing. For example:
transaction.getTransactionReference() returns null

All the transaction details are available in PaymentFormActivity, in method
private FormResult manageTransactionState(Transaction transaction) at line 364:
intent.putExtra(Transaction.TAG, transaction.toBundle()); //transactionReference is non-null here

I believe the bug is at line 34 in TransactionRelatedItemSerialization.java,
in method public Bundle getSerializedBundle().
Instead of using the TransactionRelatedItem instance which was passed via constructor argument , a new object is instantiated:
TransactionRelatedItem object = new TransactionRelatedItem();

Android API Target should be API 34 (and min API can be 21)

You should target the last version of Android
Also I don't see why min sdk is now 23

And please update your doc :)

`PREREQUISITES
Build settings

The project minSdkVersion is 14 (Ice Cream Sandwich), which means that the SDK won’t build on applications targeting a lower version of Android.`

Retrying to make a payment after unsuccesful attempt cause crash in TokenizableCardPaymentFormFragment

After one unsuccesful payment with a Visa card, when I try to pay again I get a NullPointerException in TokenizableCardPaymentFormFragment at line 777:
CheckoutData.checkoutData.setPaymentMethod(paymentProduct.getCode());

I am using version 1.5.1. Can you please help? The stack trace is:

java.lang.NullPointerException: Attempt to invoke virtual method 'void com.hipay.fullservice.core.monitoring.CheckoutData.setPaymentMethod(java.lang.String)' on a null object reference at com.hipay.fullservice.screen.fragment.TokenizableCardPaymentFormFragment$6.onSuccess(TokenizableCardPaymentFormFragment.java:777) at com.hipay.fullservice.core.client.interfaces.SecureVaultReqHandler.onSuccess(SecureVaultReqHandler.java:31) at com.hipay.fullservice.core.client.interfaces.AbstractReqHandler.handleCallback(AbstractReqHandler.java:205) at com.hipay.fullservice.core.client.AbstractClient.onLoadFinished(AbstractClient.java:244) at com.hipay.fullservice.core.client.AbstractClient.onLoadFinished(AbstractClient.java:42) at androidx.loader.app.LoaderManagerImpl$LoaderObserver.onChanged(LoaderManagerImpl.java:250) at androidx.lifecycle.LiveData.considerNotify(LiveData.java:113) at androidx.lifecycle.LiveData.dispatchingValue(LiveData.java:131) at androidx.lifecycle.LiveData.setValue(LiveData.java:289) at androidx.lifecycle.MutableLiveData.setValue(MutableLiveData.java:33) at androidx.loader.app.LoaderManagerImpl$LoaderInfo.setValue(LoaderManagerImpl.java:189) at androidx.loader.app.LoaderManagerImpl$LoaderInfo.onLoadComplete(LoaderManagerImpl.java:174) at androidx.loader.content.Loader.deliverResult(Loader.java:132) at com.hipay.fullservice.core.network.AbstractHttpClient.deliverResult(AbstractHttpClient.java:97) at androidx.loader.content.AsyncTaskLoader.dispatchOnLoadComplete(AsyncTaskLoader.java:258) at androidx.loader.content.AsyncTaskLoader$LoadTask.onPostExecute(AsyncTaskLoader.java:83) at androidx.loader.content.ModernAsyncTask.finish(ModernAsyncTask.java:490) at androidx.loader.content.ModernAsyncTask$InternalHandler.handleMessage(ModernAsyncTask.java:507) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

Unused pictures in drawable

Hi,

Please make sure that there is no unused picture in your res/drawable* folders.
It seem like all the icon_*.png files are unused and took a lot of spaces.

Error Dialog with Transaction Completed

On version 1.6.3 of your sdk integrated with fast integration in app when the user pay with a saved card (so using PaymentCardsActivity) and the transaction is in TransactionStateCompleted or TransactionStatePending it will be merged with FormActionQuit as form result.

This will cause the opening of a dialog with the following message res id
Title: R.string.alert_error_default_title -> An error occurred
Content: R.string.alert_error_default_body -> Your request could not be completed

Incorrect Credentials when using production account

Everything works fine when using a staging account.
However, when I use credentials for Production/Live account I receive the generic error message:
"Your request could not be completed".

This happens when requesting the list of available payment products.
The underlying error is:
{ "code" : "100001", "message": "Incorrect Credentials : Insufficient Privilege", "description": "" }
This problem does not occur with the SDK for iOS. However, I noticed that iOS SDK uses /rest/v2/
Although all I changed in the Android project was the environment, username and password, I decided to test this further and to make sure that the problem is not from my code.
I changed the passphrase for the production account to 32JUWB3veDWWmHySNJvtvPyBnqrDFEHbaP3jr in order to test with the example project provided in this github repo. I get the same error.

Let me now if you need more info about this issue.

Please treat this issue with high priority because it prevents us from releasing an app after successfully testing it for a long time using a staging account.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.