Skip to content

Commit

Permalink
Add support for new 3DS SDK and upgrade gradle (#276)
Browse files Browse the repository at this point in the history
* [MIT-1742] Integrate Netcetera 3DS SDK

commit cda4211
Author: Natthawut Haematulin <[email protected]>
Date:   Wed Aug 30 14:01:41 2023 +0700

    feat: integrate Netcetera 3DS SDK

    feat: send authentication request

    feat: do challenge if status is challenge

    feat: display progress view and configure sdk logs

    feat: add comments

    feat: handle completio result

    feat: handle not authenticated status

    chore: move 3ds config to local properties

* [MIT-1788] Refactor authorizing payment (#274)

* feat: prepare Authentication request and response

* fix: revise authentication request

* refactor: create wrapper class to encapsulate ThreeDS2Service class

* test: add unit tests to test AuthorizingPaymentViewModel

* docs: add comments

* refactor: remove AuthenticationResult

* test: remove ignore annotations from AuthorizingPaymentActivityTest

* feat: adjust error deserializer to deserialize by error type

* test: fix mocking viewModel in AuthorizingPaymentActivityTest

* chore: update handling exception

* refactor: revamp AuthenticationRequestBuilder to builder pattern

* chore: remove network log

* chore: do not hide progress view when challenge is required

* fix: move load local props inside defaultConfig

* fix: create local.properties file on github actions

* docs: add comments

* [MIT-1925] Fix app crash from progress view (#278)

* fix: remove hide progress view

* test: add UI tests

* [MIT-1759] UI cutomization configuration (#277)

* feat: revamp UiCustomization config

* feat: update sample app

* feat: add EXTRA_UI_CUSTOMIZATION parameter and set ui customization to 3DS SDK

* feat: add support dark mode

* chore: update sample code

* docs: add UiCustomization comment docs

* test: fix failed test

* chore: uncomment code

* test: add unit tests

* test: run test with Robolectric and add unit tests

* Enable webview for legacy payments (#282)

* Enable webview for legacy payments

* Extract logic to private functions

* Remove file

* Fallback to web flow in case Netcetera 3DS SDK fails (#286)

* fallback to web

* Add more fallback cases and tests

* Format

* Formatting

Co-authored-by: Daniel Fowler <[email protected]>

---------

Co-authored-by: Daniel Fowler <[email protected]>

* Move Netcetera secret params to CI (#288)

* Move Netcetera secret params to CI

* Update EOF cd.yml

* Replace strings with enums (#289)

* Replace strings with enums

* Pass GITHUB_TOKEN in ci.yml

* Add pull_request trigger to ci.yml

* Remove GITHUB_TOKEN secret

* Remove period

* Change timedout => timed out

Co-authored-by: Daniel Fowler <[email protected]>

* Format array

* Renamed Open deep-link failed

Co-authored-by: Daniel Fowler <[email protected]>

---------

Co-authored-by: Daniel Fowler <[email protected]>

* Pass params from merchant to sdk (#287)

* Add passing params from merchant app to SDK

* Sync kotlin example with java example

* Update README.md

* Fix and add tests

* Add append query params function

* Remove old 3ds sdk components (#291)

* Update Netcetera SDK and replace deprecated methods (#293)

* Update Netcetera and replace license key with api key

* Remove NETCETERA_LICENSE_KEY from buildConfig

* Remove api key log

* Update UiCustomization to remove deprecated code

* Remove pkey

* Reference UiCustomizationType from Netcetera in omise-sdk

* Format

Co-authored-by: Daniel Fowler <[email protected]>

* switch UiCustomizationType to internal

* Fix tests

* Cover null/empty case

* Update README.md

* Sync Java example

---------

Co-authored-by: Daniel Fowler <[email protected]>

* Sync POC with master (#295)

* Bump version to 4.12.0 (#280)

* docs: update CHANGELOG.md

* chore: bump version to 4.12.0

* Update CHANGELOG.md

---------

Co-authored-by: AnasNaouchi <[email protected]>

* Replace TrueMoney with TrueMoneyJumpApp where available (#292)

* Added true money jump app

* Update comment

Co-authored-by: Daniel Fowler <[email protected]>

* Remove unnecessary comment

* Add truemoney_jumpapp key to example app for easier override of capability

---------

Co-authored-by: Daniel Fowler <[email protected]>

* Bump v4.13.0 (#294)

---------

Co-authored-by: Natthawut Haematulin <[email protected]>
Co-authored-by: Daniel Fowler <[email protected]>

* Lint POC code

* Fixed capitalization (#303) (#305)

* Update README.md
---------

Co-authored-by: muthuswamyopn <[email protected]>

* Upgrade targetSDKLevel and compileSDKLevel to 34 (#306)

* Use device info from Netcetera (#308)

* Use device info from Netcetera

* Change parameter to encrypted_device_info

* Fix unit tests

* Format

* Sync POC with master (#310)

* Fixed capitalization (#303)

* Update README.md

* Update README.md

---------

Co-authored-by: Anas Naouchi <[email protected]>

* Implement wechat_pay source (#307)

* Add wechat_pay source

* Add proper assets

* Format

* Format

Co-authored-by: Daniel Fowler <[email protected]>

---------

Co-authored-by: Daniel Fowler <[email protected]>

* Bump v4.14.0 (#309)

* Bump v4.14.0

* Update CHANGELOG.md

Co-authored-by: Daniel Fowler <[email protected]>

---------

Co-authored-by: Daniel Fowler <[email protected]>

---------

Co-authored-by: muthuswamyopn <[email protected]>
Co-authored-by: Daniel Fowler <[email protected]>

* Upgrade Android Gradle Plugin (AGP) 8.2.2 (#311)

* Upgrade AGP to 8.2.2 and fix build issues

* Resolve android studio warning inspection results

* Resolve kotlin migration warnings

* Resolve kotlin probable bugs and style warnings

* Resolve java warnings

* Resolve Groovy warnings

* Resolve Gradlew warnings where possible

* Resolve Markdown warnings

* Resolve XML warnings

* Resolve Lint correctness warnings where necessary

* Resolve Lint performance warnings where necessary

* Resolve Kotlin deprecation

* Fix unit tests

* Remove non-necessary changes

* Format

* Fix EContextFormFragment.kt

* Remove misc.xml changes

* Update java version to 21

* Revert "Update java version to 21"

This reverts commit c95d2f4.

* Add dependsOn tasks

* Add dependsOn tasks to correct task

* Fix space

Co-authored-by: Daniel Fowler <[email protected]>

* Remove not-null assertion operator

---------

Co-authored-by: Daniel Fowler <[email protected]>

* Add 3ds config endpoint (#316)

* Add 3DS config endpoint

* Add nullable option

* Format

* Fix unit tests

* Encapsulate encryption functions

* Format

* Format

* Add acs check (#320)

* Add acs check

* Format

* Update 3DS logo (#321)

* Update Auth and Config models (#323)

* Update Auth and Config models

* Format

* Remove TODO

* Update readme (#324)

* Update readme

* Update README.md

* Update README.md

* Update README.md

---------

Co-authored-by: muthuswamyopn <[email protected]>

* Handle config endpoint error and unavailability (#325)

* Handle config endpoint error and unavailability

* Format

* Move functions to ThreeDSConfigProvider class

* Update jsonProperty (#327)

* Set ThreeDSRequestorAppURL as optional (#331)

* Set ThreeDSRequestorAppURL as optional

* Add context to optional param

* Merge branch 'master' into feature/MIT-1760-poc-netcetera-3ds-sdk

* Format

* Fix failing unit test (#333)

* Fix failed test

* Format

* Revert "Set ThreeDSRequestorAppURL as optional (#331)" (#335)

This reverts commit f6a9cad.

* Remove TODO

---------

Co-authored-by: Anas Naouchi <[email protected]>
Co-authored-by: AnasNaouchi <[email protected]>
Co-authored-by: Daniel Fowler <[email protected]>
Co-authored-by: muthuswamyopn <[email protected]>
  • Loading branch information
5 people authored May 13, 2024
1 parent 80d94de commit fd1b37f
Show file tree
Hide file tree
Showing 112 changed files with 3,325 additions and 1,470 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
PGP_SIGNING_KEY: ${{ secrets.PGP_SIGNING_KEY }}
PGP_SIGNING_PASSWORD: ${{ secrets.PGP_SIGNING_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
13 changes: 12 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Android CI

on: push
on:
push:
pull_request:

jobs:
build:
Expand Down Expand Up @@ -30,6 +32,15 @@ jobs:
run: ./gradlew sdk:ktlintCheck

- name: Build project
env:
NETCETERA_LICENSE_KEY: ${{ secrets.NETCETERA_LICENSE_KEY }}
SCHEME_NAME: ${{ secrets.SCHEME_NAME }}
DS_ID: ${{ secrets.DS_ID }}
MESSAGE_VERSION: ${{ secrets.MESSAGE_VERSION }}
ACS_REF_NUMBER: ${{ secrets.ACS_REF_NUMBER }}
DS_PUBLIC_KEY: ${{ secrets.DS_PUBLIC_KEY }}
NETCETERA_API_KEY: ${{ secrets.NETCETERA_API_KEY }}

run: ./gradlew sdk:build -x test

unit-test:
Expand Down
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added 3ds-sdk/3ds-sdk-2.4.0.0.aar
Binary file not shown.
20 changes: 20 additions & 0 deletions 3ds-sdk/3ds-sdk-2.4.0.0.pom
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.netcetera.android-3dssdk</groupId>
<artifactId>3ds-sdk</artifactId>
<version>2.4.0.0</version>
<packaging>aar</packaging>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.36</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15to18</artifactId>
<version>1.69</version>
</dependency>
</dependencies>
</project>
2 changes: 2 additions & 0 deletions 3ds-sdk/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
configurations.maybeCreate("default")
artifacts.add("default", file("3ds-sdk-2.4.0.0.aar"))
179 changes: 103 additions & 76 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,167 +4,194 @@
* **ADDED:** Implemented new source `installment_wlb_ktc`

## V4.16.1
* **REMOVED:** Remove obsolete `points_citi`
* **ADDED:** Added installment terms calculations

- **REMOVED:** Remove obsolete `points_citi`
- **ADDED:** Added installment terms calculations

## V4.15.1
* **PATCH:** Fix error message for `installment_mbb`

- **PATCH:** Fix error message for `installment_mbb`

## V4.15.0
* **REMOVED:** Remove obsolete `ocbc_pao` and `installment_citi`

- **REMOVED:** Remove obsolete `ocbc_pao` and `installment_citi`

## V4.14.0
* **ADDED:** Support new source type `wechat_pay`

- **ADDED:** Support new source type `wechat_pay`

## V4.13.1
* **ADDED:** Add kotlin linting standards using ktlint-gradle library
* **CHANGED:** Removed nullability from text field callbacks
* **PATCH:** Fix api call for Atome source

- **ADDED:** Add kotlin linting standards using ktlint-gradle library
- **CHANGED:** Removed nullability from text field callbacks
- **PATCH:** Fix api call for Atome source

## V4.13.0
* **ADDED:** Support new source type `truemoney_jumpapp`

- **ADDED:** Support new source type `truemoney_jumpapp`

## V4.12.0
* **ADDED:** Prevent screenshot and screen recording in `AuthorizingPaymentActivity`, `PaymentCreatorActivity` and `CreditCardActivity` as default behavior
* **FIXED:** Fix app crash when non numeric characters characters are entered in expiry date field for credit cards
* **CHANGED:** Add new logo for OCBC payment method

- **ADDED:** Prevent screenshot and screen recording in `AuthorizingPaymentActivity`, `PaymentCreatorActivity` and `CreditCardActivity` as default behavior
- **FIXED:** Fix app crash when non numeric characters characters are entered in expiry date field for credit cards
- **CHANGED:** Add new logo for OCBC payment method

## v4.11.0
* **ADDED:** Supported OCBC Digital payment method
* **ADDED:** Supported authorize payment through the external app in the `AuthorizingPaymentActivity`
* **ADDED:** Put coverage report to SonarCloud

- **ADDED:** Supported OCBC Digital payment method
- **ADDED:** Supported authorize payment through the external app in the `AuthorizingPaymentActivity`
- **ADDED:** Put coverage report to SonarCloud

## v4.10.0
* **ADDED:** Supported billing address for credit card form

- **ADDED:** Supported billing address for credit card form

## v4.9.0
* **CHANGED:** Updated Android Gradle plugin to version 7.4.2
* **CHANGED:** Updated Kotlin to version 1.7.10
* **CHANGED:** Updated 3DS SDK to version 1.0.0-alpha12

- **CHANGED:** Updated Android Gradle plugin to version 7.4.2
- **CHANGED:** Updated Kotlin to version 1.7.10
- **CHANGED:** Updated 3DS SDK to version 1.0.0-alpha12

## v4.8.0
* **REMOVED:** Removed support for SCB and KTB Internet Banking payment method

- **REMOVED:** Removed support for SCB and KTB Internet Banking payment method

## v4.7.0
* **ADDED:** Added support for PayPay payment method

- **ADDED:** Added support for PayPay payment method

## v4.6.0
* **ADDED:** Added support for Krungthai NEXT (mobile_banking_ktb) payment method

- **ADDED:** Added support for Krungthai NEXT (mobile_banking_ktb) payment method

## v4.5.2
* **CHANGED:** Update logo and name of Lotus's Bill Payment

- **CHANGED:** Update logo and name of Lotus's Bill Payment

## v4.5.1
* **FIXED:** Patch explicit error thrown when redirecting to non-existing custom scheme uri

- **FIXED:** Patch explicit error thrown when redirecting to non-existing custom scheme uri

## v4.5.0
* **ADDED:** Added support for Atome payment method

- **ADDED:** Added support for Atome payment method

## v4.4.2
* **CHANGED:** Logo and label for Lotus Bill Payment

- **CHANGED:** Logo and label for Lotus Bill Payment

## v4.4.1
* **FIXED:** Patch 3DS SDK

- **FIXED:** Patch 3DS SDK

## v4.4.0
* **ADDED:** Installment Maybank for Malaysian merchants
* **REMOVED:** Unused and deprecated Installment Ezypay

- **ADDED:** Installment Maybank for Malaysian merchants
- **REMOVED:** Unused and deprecated Installment Ezypay

## v4.3.1
* **FIXED:** Fix JCenter deprecation
* **CHANGED:** Switch authorization to use only in-app browser

- **FIXED:** Fix JCenter deprecation
- **CHANGED:** Switch authorization to use only in-app browser

## v4.3.0
* **ADDED:** Added support ShopeePay JumpApp.

- **ADDED:** Added support ShopeePay JumpApp.

## v4.2.0
* **ADDED:** Added support for Boost, DuitNow QR, DuitNow Online Banking/Wallets, Maybank QRPay and ShopeePay payment method.
* **CHANGED** Update Touch 'n Go and Grabpay to support RMS provider.

- **ADDED:** Added support for Boost, DuitNow QR, DuitNow Online Banking/Wallets, Maybank QRPay and ShopeePay payment method.
- **CHANGED** Update Touch 'n Go and Grabpay to support RMS provider.

## v4.1.4
* **ADDED:** Added Bank of China logo for FPX payments.
* **CHANGED** Fixed allowed installment terms for UOB and TTB installments.

- **ADDED:** Added Bank of China logo for FPX payments.
- **CHANGED** Fixed allowed installment terms for UOB and TTB installments.

## v4.1.3
* **CHANGED:** Added support for GrabPay payment method.

- **CHANGED:** Added support for GrabPay payment method.

## v4.1.2
* **CHANGED:** Move OCBC Pay Anyone payment out of Mobile Banking section.

- **CHANGED:** Move OCBC Pay Anyone payment out of Mobile Banking section.

## v4.1.1
* **CHANGED** 3DS library version to 1.0.0-alpha09

- **CHANGED** 3DS library version to 1.0.0-alpha09

## v4.1.0
* **ADDED:** Support for GooglePay
* **ADDED:** Support for BBL mobile banking
* **CHANGED:** Logo and label for mobile banking payments: Kbank (TH), Bay (TH) and SCB (TH)

- **ADDED:** Support for GooglePay
- **ADDED:** Support for BBL mobile banking
- **CHANGED:** Logo and label for mobile banking payments: Kbank (TH), Bay (TH) and SCB (TH)

## v4.0.0

* **CHANGED:** Require minimum SDK version 21
* **ADDED:** 3D Secure version 2
* **ADDED:** Observing `ChargeStatus` change with Token ID
* **ADDED:** `platform_type` field for Source
* **ADDED:** Support for wallets: Alipay (SG), AlipayHK (SG), DANA (SG), GCash (SG), Kakao Pay (SG), Touch'n Go (SG) and Rabbit LINE Pay (TH)
* **ADDED:** Support for installments: Citi (TH), TTB (TH), UOB (TH) and Ezypay (MY)
* **ADDED:** Support for mobile banking payments: Kbank (TH), Bay (TH) and OCBC Pay Anyone (SG)
- **CHANGED:** Require minimum SDK version 21
- **ADDED:** 3D Secure version 2
- **ADDED:** Observing `ChargeStatus` change with Token ID
- **ADDED:** `platform_type` field for Source
- **ADDED:** Support for wallets: Alipay (SG), AlipayHK (SG), DANA (SG), GCash (SG), Kakao Pay (SG), Touch'n Go (SG) and Rabbit LINE Pay (TH)
- **ADDED:** Support for installments: Citi (TH), TTB (TH), UOB (TH) and Ezypay (MY)
- **ADDED:** Support for mobile banking payments: Kbank (TH), Bay (TH) and OCBC Pay Anyone (SG)

## v3.2.1

* **FIXED:** Fix can not open WebView on Android 5.0 (#178)
- **FIXED:** Fix can not open WebView on Android 5.0 (#178)

## v3.2.0

* **CHANGED:** Support Android API 30
* **CHANGED:** Support displaying dialog from JavaScript alert, confirm, prompt functions
- **CHANGED:** Support Android API 30
- **CHANGED:** Support displaying dialog from JavaScript alert, confirm, prompt functions

## v3.1.3

* **ADDED:** Support SCB installment
* **ADDED:** Support SCB mobile banking
* **CHANGED:** Drop CircleCI and migrate to Github Actions
- **ADDED:** Support SCB installment
- **ADDED:** Support SCB mobile banking
- **CHANGED:** Drop CircleCI and migrate to Github Actions

## v3.1.2

* **CHANGED:** Enhance `AuthorizingPaymentActivity` to support cache in the WebView for short life time
- **CHANGED:** Enhance `AuthorizingPaymentActivity` to support cache in the WebView for short life time

## v3.1.1

* **FIXED:** Fix a potential security on the `jackson-core` lib, issue #136
- **FIXED:** Fix a potential security on the `jackson-core` lib, issue #136

## v3.1.0

* **ADDED** Add `mobileNumber`, `scannableCode`, `zeroInterestInstallments` fields to Source model
* **ADDED:** Support new source types (PointsCiti, PromptPay, PayNow)
* **ADDED:** Support new payment methods in the `PaymentCreatorActivity` (PointsCiti, PromptPay, PayNow, TrueMoney)
* **ADDED:** Support the term zero-interest installments in the `PaymentCreatorActivity`
* **CHANGED:** Update payment method icons
- **ADDED** Add `mobileNumber`, `scannableCode`, `zeroInterestInstallments` fields to Source model
- **ADDED:** Support new source types (PointsCiti, PromptPay, PayNow)
- **ADDED:** Support new payment methods in the `PaymentCreatorActivity` (PointsCiti, PromptPay, PayNow, TrueMoney)
- **ADDED:** Support the term zero-interest installments in the `PaymentCreatorActivity`
- **CHANGED:** Update payment method icons

## v3.0.0

* **CHANGED:** API request process
* **ADDED:** PaymentCreatorActivity for creating different payment sources
* **ADDED:** Ability to retrieve account Capability
* **ADDED:** Ability to create Source
* **ADDED:** Theme Customization
* **REMOVED:** Laser card support
* **CHANGED:** Credit Card form design
* **CHANGED:** Converted most of the SDK from Java to Kotlin
- **CHANGED:** API request process
- **ADDED:** PaymentCreatorActivity for creating different payment sources
- **ADDED:** Ability to retrieve account Capability
- **ADDED:** Ability to create Source
- **ADDED:** Theme Customization
- **REMOVED:** Laser card support
- **CHANGED:** Credit Card form design
- **CHANGED:** Converted most of the SDK from Java to Kotlin

## v2.6.6

* **FIXED:** Fix expiry date spinner.
- **FIXED:** Fix expiry date spinner.

## v2.6.5

* **REMOVED:** Drop support TLS 1.1.
* **ADDED:** Add pin certification.
* **CHANGED:** Change result callback code to use default RESULT_OK/RESULT_CANCELED from Activity in CreditCardActivity.
- **REMOVED:** Drop support TLS 1.1.
- **ADDED:** Add pin certification.
- **CHANGED:** Change result callback code to use default RESULT_OK/RESULT_CANCELED from Activity in CreditCardActivity.

## v2.6.4

* **NEW:** Allow the user to authorize the payment with an external app.
- **NEW:** Allow the user to authorize the payment with an external app.

## v2.6.3

* **NEW:** Add `bank` field to Card.
- **NEW:** Add `bank` field to Card.
Loading

0 comments on commit fd1b37f

Please sign in to comment.