Skip to content

Commit

Permalink
chore: embedded the contents of ipay88-my.aar (#10)
Browse files Browse the repository at this point in the history
* chore: embedded ipay88 SDK

* chore: added missing translation

---------

Co-authored-by: Semir <[email protected]>
  • Loading branch information
vasi-twks and semirp authored Mar 25, 2024
1 parent f64ab61 commit 7f93256
Show file tree
Hide file tree
Showing 20 changed files with 145 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ build-and-publish:
- if: $CI_COMMIT_TAG
artifacts:
paths:
- ipay88/build/outputs/aar/
- ipay88/build/outputs/
when: manual
2 changes: 0 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,3 @@ RELEASE_SIGNING_ENABLED=true

android.defaults.buildfeatures.buildconfig=true
android.nonFinalResIds=false

PRIMER_ANDROID_ARTIFACTORY_URL=https://primer.jfrog.io/artifactory/primer-android/
3 changes: 0 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@
kotlin = "1.8.20"
appcompat = "1.6.1"

ipay88 = "1.0.1"

# plugin versions
androidGradlePlugin = "8.1.3"
ktlint = "11.6.1"
mavenPublish = "0.22.0"

[libraries]
android-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
ipay88 = { group = "io.primer", name = "ipay88-my", version.ref = "ipay88" }

[plugins]
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
Expand Down
15 changes: 11 additions & 4 deletions ipay88/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ plugins {
}

android {
namespace 'io.primer.ipay88'
compileSdkVersion 34
// in order not to crash their SDK, we can use their namespace to correctly find R class
namespace 'com.androids.ipay'
compileSdk 34

defaultConfig {
minSdkVersion 21
Expand Down Expand Up @@ -38,9 +39,15 @@ android {
}
}

tasks.configureEach { task ->
if (task.name == "generateReleaseBuildConfig") {
task.enabled = false
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation libs.android.appcompat
api libs.ipay88
}

apply from: "$rootDir/config/publish.gradle"
apply from: "$rootDir/config/publish.gradle"
Binary file added ipay88/libs/classes.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion ipay88/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
# keep class BuildConfig
-keep public class **.BuildConfig { *; }

-keep class com.ipay.IPayIH { *; }

-keep class io.primer.ipay88.api.** {
public *;
}
Expand All @@ -52,4 +54,3 @@
java.lang.Object writeReplace();
java.lang.Object readResolve();
}

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ipay88/src/main/res/drawable-hdpi-v4/ic_ipay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ipay88/src/main/res/drawable-mdpi-v4/ic_ipay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ipay88/src/main/res/drawable-xhdpi-v4/ic_ipay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions ipay88/src/main/res/layout/tool_bar.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/color_toolbar"
android:orientation="vertical"
android:padding="5dp">

<ImageView
android:id="@+id/iv_back"
android:layout_width="30dp"
android:layout_height="30dp"
android:visibility="gone"
android:src="@drawable/ic_arrow_back_white_48dp" />

<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:gravity="center"
android:text="ePayment"
android:textColor="@color/color_toolbar_item"
android:textSize="20sp" />

</androidx.appcompat.widget.Toolbar>
49 changes: 49 additions & 0 deletions ipay88/src/main/res/values-vi/values-vi.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="Amount">Số tiền (RM)</string>
<string name="ProdDesc">Miêu tả sản phẩm</string>
<string name="Result">Kết quả</string>
<string name="UserEmail">Email</string>
<string name="UserName">Tên khách hàng</string>
<string name="app_name">v3 IPAY88 Android Payment</string>
<string name="btnHome">Home</string>
<string name="btnPrint">In hóa đơn</string>
<string name="imgDesc">ipay demo logo</string>
<string name="msg_decode_error">Quá trình giải mã thất bại với một lỗi không mong muốn</string>
<string name="msg_error_ssl_date_invalid">Chứng chỉ SSL ngày không hợp lệ!</string>
<string name="msg_error_ssl_expired">Chứng chỉ SSL đã hết hạn!</string>
<string name="msg_error_ssl_idmismatch">Mã chứng chỉ SSL không phù hợp!</string>
<string name="msg_error_ssl_invalid">Chứng chỉ SSL không hợp lệ!</string>
<string name="msg_error_ssl_notyet_valid">Chứng chỉ SSL chưa hợp lệ!</string>
<string name="msg_error_ssl_untrusted">Chứng chỉ SSL không đáng tin cậy!</string>
<string name="msg_oh_no">Ôi không!</string>
<string name="msg_select_method">Hãy chọn 1 phương thức thanh toán</string>
<string name="msg_transition_empty">Thông tin giao dịch bị trống</string>
<string name="strAmount">Số tiền</string>
<string name="strAuthCode">Mã xác thực</string>
<string name="strBackendPost">Backend Post URL</string>
<string name="strCancel">Hủy bỏ</string>
<string name="strCountry">Quốc gia</string>
<string name="strCreditCard">Credit Card</string>
<string name="strCurrency">Đơn vị tiền tệ</string>
<string name="strErrDesc">ErrDesc</string>
<string name="strLang">Ngôn ngữ</string>
<string name="strMerchantCode">Merchant Code</string>
<string name="strMerchantKey">Merchant Key</string>
<string name="strOK">Đồng ý</string>
<string name="strPay">Thanh toán</string>
<string name="strPaymentID">Mã thanh toán</string>
<string name="strPaymentId">Mã thanh toán</string>
<string name="strREFID">Mã Tham chiếu</string>
<string name="strRefNo">RefNo</string>
<string name="strRemark">Ghi chú</string>
<string name="strRequery">Yêu cầu</string>
<string name="strRhbMerchantId">Rhb Merchant Id</string>
<string name="strRhbOrderId">Rhb Order Id</string>
<string name="strRhbOwnHash">Use own hash?</string>
<string name="strRhbShaKey">Rhb Sha key</string>
<string name="strSelectPayment">Chọn cách thức thanh toán</string>
<string name="strSignature">Chữ ký</string>
<string name="strStatus">Trạng thái</string>
<string name="strTransId">Mã chuyển đổi</string>
</resources>
55 changes: 55 additions & 0 deletions ipay88/src/main/res/values/values.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="bg_notice_color">#a0f16822</color>
<color name="color_toolbar">#2a5381</color>
<color name="color_toolbar_item">#ffffff</color>
<color name="viewfinder_border">#fff5f5</color>
<color name="viewfinder_laser">#ffcc0000</color>
<color name="viewfinder_mask">#60000000</color>
<string name="Amount">Amount (RM)</string>
<string name="ProdDesc">Product Description</string>
<string name="Result">Result</string>
<string name="UserEmail">Email</string>
<string name="UserName">Customer Name</string>
<string name="app_name">v3 IPAY88 Android Payment</string>
<string name="btnHome">Home</string>
<string name="btnPrint">Print Receipt</string>
<string name="imgDesc">ipay demo logo</string>
<string name="msg_decode_error">Decoding operation failed with an unexpected error</string>
<string name="msg_error_ssl_date_invalid">SSL Certificate date invalid!</string>
<string name="msg_error_ssl_expired">SSL Certificate expired!</string>
<string name="msg_error_ssl_idmismatch">SSL Certificate id mismatch!</string>
<string name="msg_error_ssl_invalid">SSL Certificate invalid!</string>
<string name="msg_error_ssl_notyet_valid">SSL Certificate not yet valid!</string>
<string name="msg_error_ssl_untrusted">SSL Certificate untrusted!</string>
<string name="msg_oh_no">Oh no!</string>
<string name="msg_select_method">Please select a payment method</string>
<string name="msg_transition_empty">Transaction information is empty</string>
<string name="strAmount">Amount</string>
<string name="strAuthCode">AuthCode</string>
<string name="strBackendPost">Backend Post URL</string>
<string name="strCancel">Cancel</string>
<string name="strCountry">Country</string>
<string name="strCreditCard">Credit Card</string>
<string name="strCurrency">Currency</string>
<string name="strErrDesc">ErrDesc</string>
<string name="strLang">Language</string>
<string name="strMerchantCode">Merchant Code</string>
<string name="strMerchantKey">Merchant Key</string>
<string name="strOK">OK</string>
<string name="strPay">Pay Now</string>
<string name="strPaymentID">Payment ID</string>
<string name="strPaymentId">PaymentId</string>
<string name="strREFID">Reference ID</string>
<string name="strRefNo">RefNo</string>
<string name="strRemark">Remark</string>
<string name="strRequery">Requery</string>
<string name="strRhbMerchantId">Rhb Merchant Id</string>
<string name="strRhbOrderId">Rhb Order Id</string>
<string name="strRhbOwnHash">Use own hash?</string>
<string name="strRhbShaKey">Rhb Sha key</string>
<string name="strSelectPayment">Select your payment</string>
<string name="strSignature">Signature</string>
<string name="strStatus">Status</string>
<string name="strTransId">TransId</string>
</resources>
3 changes: 0 additions & 3 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ dependencyResolutionManagement {
google()
mavenCentral()
mavenLocal()
maven {
setUrl(providers.gradleProperty("PRIMER_ANDROID_ARTIFACTORY_URL"))
}
}
}
rootProject.name = "primer-ipay88-sdk-android"
Expand Down

0 comments on commit 7f93256

Please sign in to comment.