Skip to content

SetuHQ/cou-wl-android

Repository files navigation

Setu COU WL Android App

A complete Android WebView application with integrated payment gateway for Setu's COU WL (Customer Onboard Utility - White Label) solution.

Features

  • URL input field in the center of the screen
  • Submit button to open the website
  • WebView to display websites with payment integration
  • JavaScript interface for Setu payment gateway
  • Mock payment screen with UPI and Card options
  • URL validation and network connectivity checks
  • Clean and modern UI design
  • Complete payment callback handling

How to Build

  1. Open the project in Android Studio
  2. Sync the project with Gradle files
  3. Build and run the app on your device or emulator

App Structure

  • MainActivity.java - URL input and app entry point
  • WebViewActivity.java - WebView with JavaScript payment interface
  • PaymentScreen.java - Mock payment gateway implementation
  • WebAppInterface.java - JavaScript bridge for Setu integration
  • activity_main.xml - Main screen layout
  • activity_webview.xml - WebView screen layout
  • activity_payment_screen.xml - Payment screen layout
  • AndroidManifest.xml - App configuration with internet permissions

Payment Integration

The app includes full integration with Setu's payment gateway:

  • JavaScript Interface: Android.initiatePayment() and Android.unload()
  • Payment Methods: UPI and Card payments
  • Callback Handling: Returns payment results to WebView
  • Mock Processing: Simulates real payment transactions

Permissions

The app requires the following permissions:

  • INTERNET - To load web pages
  • ACCESS_NETWORK_STATE - To check network connectivity

Usage

  1. Launch the Setu COU WL app
  2. Enter a website URL or use test URLs:
    • file:///android_asset/test.html - Basic WebView test
    • file:///android_asset/payment_test.html - Payment integration test
  3. Click "Open Website" button
  4. The website will load in the WebView
  5. Test payment integration if the website calls Android.initiatePayment()
  6. Use the back button to navigate within the WebView or exit the app

Testing Payment Integration

Use the built-in test page: file:///android_asset/payment_test.html

  • ✅ Verify Android interface detection
  • 🔧 Configure payment parameters
  • 💰 Test payment initiation
  • 📋 View callback results

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published