New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hyper-sdk-plugin

Package Overview
Dependencies
Maintainers
9
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyper-sdk-plugin

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

  • 2.0.36
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-83.33%
Maintainers
9
Weekly downloads
 
Created
Source

HyperSDK Cordova plugin

Table of Contents

  • About
  • Getting Started
  • SDK API

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 depdendecy via:

cordova plugin add hyper-sdk-plugin

Updating your clientId

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

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.

License

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

Keywords

FAQs

Package last updated on 21 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc