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

hyper-sdk-plugin

v3.0.11

Published

Cordova plugin for HyperSDK which enables payment orchestration via different dynamic modules. More details available at https://developer.juspay.in/v2.0/docs/introduction . Some part of module depends heavily on native functionalities and are not updatab

Downloads

37

Readme

HyperSDK Cordova plugin

Table of Contents

About

Cordova plugin for HyperSDK.

Minimum Requirement

Android

The minimum version of cordova-android supported with HyperSDK is 10.0.0 which uses androidx and AppCompatActivity.

Getting the SDK

SDK is available as a node dependency via:

cordova plugin add hyper-sdk-plugin

Updating your clientId

Android

Update your clientId provided by Juspay Support Team in the ext block of the root(top) build.gradle file present under platforms/android/build.gradle.

    ext {
        clientId = "<clientId provided by Juspay Team>"
        hyperSDKVersion = "2.1.24"
    }

Optionally, you can also provide an override for base SDK version present in plugin (the newer version among both would be considered).

iOS

Update your clientId provided by Juspay Support Team in the MerchantConfig.txt file present under platforms/ios/

clientId = <clientId shared by Juspay Team>

SDK API

Create an instance for HyperSDK cordova plugin by using:

hyperSDKRef = cordova.plugins.HyperSDKPlugin

EC Headless - All payload ref is available at HyperSDK EC doc. Payment Page - All payload ref is available at HyperSDK Payment page doc.

PreFetch

To keep the sdk up to date with the latest changes, it is highly recommended to call preFetch as early as possible. To call preFetch, use the following snippet:

var payload = {
    "service" : "in.juspay.hyperpay",
    "betaAssets" : true,
    "payload" : {
        "clientId" : "<client_id>"
    }
}
hyperSDKRef.preFetch(JSON.stringify(payload))

Initiate

To serve dynamically changing requirements for the payments ecosystem HyperSDK uses a JS engine to improve user experience and enable faster iterations. Initiate API starts up the js engine and enables it to improve the performance and experience of the next SDK API calls. To call initiate, use the following snippet:

var payload = {
    "requestId": "8cbc3fad-8b3f-40c0-ae93-2d7e75a8624a",
    "service" : "in.juspay.hyperpay",
    "betaAssets" : true,
    "payload" : {
        "action": "initiate",
        "merchantKeyId": "2980",
        "merchantId": "merchant_id",
        "clientId": "merchant_id" + "_android",
        "customerId": "customer_id",
        "environment": "sandbox",
        "signaturePayload": "signaturePayloadString",
        "signature": "signature"
    }
}
hyperSDKRef.initiate(JSON.stringify(completePayload), hyperSDKCallback);

Initiate payload - All payload ref is available at HyperSDK initiate.

Process

Process api helps with all the required operation to be triggered via HyperSDK. Responses and various events triggered are streamed back to callback passed in Initiate.

var payload = {
    "requestId": "8cbc3fad-8b3f-40c0-ae93-2d7e75a8624a",
    "service" : "in.juspay.hyperpay",
    "betaAssets" : true,
    "payload" : {
        "action": "paymentPage",
        "merchantKeyId": "2980",
        "merchantId": "merchant_id",
        "clientId": "merchant_id" + "_android",
        "customerId": "customer_id",
        "environment": "sandbox",
        "signaturePayload": "signaturePayloadString",
        "signature": "signature"
    }
}
hyperSDKRef.process(JSON.stringify(completePayload));

Process payload - All payload ref is available at HyperSDK process.

Optional: isInitialised

This is a helper / optional method to check whether SDK has been initialised after step-2. It returns a boolean value in the callback function.

hyperSDKRef.isInitialised((response) => {
    // Make process call here if response is true
});

License

hyper-sdk-plugin (HyperSDK Cordova) is distributed under AGPL-3.0-only license.