Skip to content

Latest commit

 

History

History
162 lines (121 loc) · 4.95 KB

README.md

File metadata and controls

162 lines (121 loc) · 4.95 KB

banner Fiuu x GooglePay

[Mobile Plugin] - Fiuu Google Pay Plugin

This is the complete and functional Fiuu Google Pay Plugin payment module that is ready to be implemented into Android Studio application project through Maven framework.

Recommended configurations

- Android Studio Flamingo | 2022.2.1 Patch 2

- Minimum target version: Android 5.0 - API Level 21

Installation Guidance

Installation

Maven

Maven primarily aids in the download of dependencies, which are libraries or JAR files, for Java-based applications. For usage and installation instructions, visit their website. To integrate Fiuu Google Pay Plugin into your Android Studio project using CocoaPods, specify it in your file:

In file settings.gradle

    pluginManagement {
        repositories {
            ...
            mavenCentral()
        }
    }
    dependencyResolutionManagement {
        ...
        repositories {
            ...
            mavenCentral()
            maven { url 'https://jitpack.io' }
        }
    }
    rootProject.name = "Application Name"
    include ':app'

 In file build.gradle under app folder

    plugins {
        id 'com.android.application'
    }

    android {
        ...

        defaultConfig {
            ...
            minSdk 21
            ...
        }
        ...
    }

    dependencies {
        ...
        implementation 'com.github.RazerMS:RazerMSGooglePayPlugin:1.0.3'

        implementation "com.google.android.gms:play-services-pay:16.1.0"
        implementation "com.google.android.gms:play-services-wallet:19.2.0-beta01"
        implementation 'androidx.appcompat:appcompat:1.5.1'
        implementation 'com.google.android.material:material:1.6.1'
        implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
        implementation "androidx.lifecycle:lifecycle-viewmodel:2.5.1"
        implementation 'org.apache.commons:commons-lang3:3.4'
        implementation 'com.google.zxing:core:3.5.0'
        ...

    }

Quick Guide

Demo App Link : https://github.com/RazerMS/RazerMSGooglePayPlugin/tree/demo-app

Refer to the Demo App for easy integration guidance.

All these 5 classes are compulsory to be created in your app :
1) CheckoutActivity
2) CheckoutSuccessActivity
3) PaymentsUtil
4) CheckoutViewModel
5) Constants

Create your own classes based on your app preferences.
Refer Demo App res folder for necessary resources guidance.

Payment results

=========================================
Sample transaction result in JSON string:
=========================================

{
    amount = "1.10";
    appcode = 179367;
    channel = CREDIT;
    currency = MYR;
    domain = "merchant_Dev";
    orderid = order54;
    paydate = "2022-09-22 17:49:08";
    skey = 54XXXXXXXXXXXXXXXXXXXXXXXXXXd;
    status = 00;
    tranID = 1278569348;
    xdkHTMLRedirection = "xxxxxxxxxx";
};

Parameter and meaning:

"status_code" - "00" for Success, "11" for Failed, "22" for *Pending. 

"amount" - The transaction amount
"paydate" - The transaction date
"order_id" - The transaction order id
"channel" - The transaction channel description
"txn_ID" - The transaction id generated by MOLPay

* Notes: You may ignore other parameters and values not stated above

=====================================
* Sample error result in JSON string:
=====================================

{
    "error_code" = A01;
    "error_desc" = "Fail to detokenize Google Pay Token given";
    status = 0;
}

Parameter and meaning:

"Fail to detokenize Google Pay Token given" - Error starting a payment process due to several possible reasons, please contact Fiuu support should the error persists.
1) Misconfigure GooglePay setup
2) API credentials (username, password, merchant id, verify key)
3) Fiuu server offline.

Resources

Support

Submit issue to this repository or email to our support@fiuu.com

Merchant Technical Support / Customer Care : support@fiuu.com
Sales/Reseller Enquiry : sales@fiuu.com
Marketing Campaign : marketing@fiuu.com
Channel/Partner Enquiry : channel@fiuu.com
Media Contact : media@fiuu.com
R&D and Tech-related Suggestion : technical@fiuu.com
Abuse Reporting : abuse@fiuu.com