npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ippopay.ionic.cordova

v0.0.3

Published

Integrate the IppoPay Checkout with your Cordova App.

Downloads

9

Readme

Integrate IppoPay With Cordova SDK

Integrate the IppoPay Checkout with your Cordova App.

Integrate IppoPay Payment Gateway on your Cordova app to accept payments.

Installation

ionic cordova plugin add ippopay.ionic.cordova

In your Cordova project folder, run the below commands to install the plugin:

cd your-cordova-project-folder
ionic cordova platform add ios
ionic cordova platform add android
ionic cordova platform add browser

Android Changes

Make Sure to you have to update Compile & Target SDK versions to above or equal to 33 in applevel build.gradle

Import Kotlin plugin to Project level build.gradle like below

plugins {
    id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
}

PodFile Changes for iOS

Open the PodFile using below command. Go to Cordova Project and run the below steps.

cd platforms/ios
open podfile

Update the below changes in PodFile

platform :ios, '12.0' 

Deintegrate POD and update POD using below commands

pod deintegrate
pod install
pod update

Enable UPI Intent Flow on iOS

To enable UPI Intent in iOS integration, you must do the following changes in your app's info.plist file.

<key>LSApplicationQueriesSchemes</key>
<array>
    <string>amazonToAlipay</string>
    <string>paytmmp</string>
    <string>whatsapp</string>
    <string>phonepe</string>
    <string>bhim</string>
    <string>gpay</string>
</array>

Create Order

Create order from Server side using below API and get the Order id. Click here to know how to create a order.

Usage

1. In your app's home.page.html file, add the following code. It allows your customer to open the Checkout and make the payment.
    <ion-button (click)="payWithIppopay()">
        Pay With Ippopay
    </ion-button>
2. In your app's home.page.ts file, import IppopayCheckout like below:
declare var IppopayCheckout:any;
3. Add the below code with the order_id generated in Create Order step. Add the Public key generated on the IppoPay Dashboard.
payWithIppopay() {
    var options = {
      order_id: "<ORDER_ID>",
      public_key: '<PUBLIC_KEY>',
      progress_color: "<HEX_COLOR>"
    }
    var successCallback = function (success: string) {
      alert('payment_id: ' + JSON.parse(success).transaction_id)
    }
    var cancelCallback = function (error: string) {
      alert('Error:'+JSON.parse(error).message)
    }
    IppopayCheckout.on('payment.success', successCallback)
    IppopayCheckout.on('payment.cancel', cancelCallback)
    IppopayCheckout.open(options)
}

Sample code

home.page.ts file

import { Component } from '@angular/core';
declare var IppopayCheckout: any;
@Component({
  selector: 'app-home',
  templateUrl: 'home.page.html',
  styleUrls: ['home.page.scss'],
})
export class HomePage {
  constructor() {}
  payWithIppopay() {
    var options = {
      order_id: "<ORDER_ID>",
      public_key: '<PUBLIC_KEY>',
      progress_color: "<HEX_COLOR>"
    }
    var successCallback = function (success: string) {
      alert('payment_id: ' + JSON.parse(success).transaction_id)
    }
    var cancelCallback = function (error: string) {
      alert('Error:'+JSON.parse(error).message)

    }
    IppopayCheckout.on('payment.success', successCallback)
    IppopayCheckout.on('payment.cancel', cancelCallback)
    IppopayCheckout.open(options)
  }
}

home.page.html file

<ion-header [translucent]="true">
  <ion-toolbar>
    <ion-title>
      IppoPay
    </ion-title>
  </ion-toolbar>
</ion-header>

<ion-content [fullscreen]="true">
  <ion-header collapse="condense">
    <ion-toolbar>
      <ion-title size="large">Blank</ion-title>
    </ion-toolbar>
  </ion-header>

  <ion-button (click)="payWithIppopay()">
    Pay With Ippopay
  </ion-button>
</ion-content>