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
6
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyper-sdk-plugin - npm Package Compare versions

Comparing version 2.0.19 to 2.0.20-rc1

2

package.json
{
"name": "hyper-sdk-plugin",
"version": "2.0.19",
"version": "2.0.20-rc1",
"description": "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 updatable dynamically.",

@@ -5,0 +5,0 @@ "cordova": {

@@ -13,5 +13,11 @@ # HyperSDK Cordova plugin

## Minimum Requirement
### Android
The minimum version of cordova-android supported with HyperSDK is [10.0.0](https://github.com/apache/cordova-android/blob/master/RELEASENOTES.md#1000-jul-17-2021) which uses `androidx` and `AppCompatActivity`.
## Getting the SDK
SDK is available as a node depdendecy via:
SDK is available as a node depdendecy via:

@@ -22,6 +28,8 @@ ```sh

Also it can be added as direct branch reference:
## Updating your clientId
```sh
cordova plugin add git+ssh://git@bitbucket.org/juspay/hyper-sdk-cordova#master
Update your clientId provided by Juspay Support Team in the `MerchantConfig.txt` file present under `platforms/android/app/`
```txt
clientId = <clientId shared by Juspay Team>
```

@@ -107,26 +115,1 @@

### Backpress Handling
For android, system or hardware backpress needs to be handled. Override onBackPressed() method provided by activity and call HyperSDK's onBackPressed() method to check whether the activity needs to handle backpress or SDK is handling it.
```java
@Override
public void onBackPressed() {
boolean backPressHandled = HyperSDKPlugin.onBackPressed();
if (!backPressHandled) {
super.onBackPressed();
}
}
```
### Reset Activity
For android, override onDestroy method of the activity and call HyperSDK's resetActivity() method to avoid any memory leaks
```java
@Override
public void onDestroy() {
HyperSDKPlugin.resetActivity();
super.onDestroy();
}
```

@@ -116,9 +116,9 @@ const fs = require('fs');

// Add the Complete path to the MainActivity
const newActivityPath = utilities.getAndroidSourcePath(context) + "/" + packageName.replace(/\./g, "/") + '/MainActivity.java';
const mainActivityPath = utilities.getAndroidSourcePath(context) + "/" + packageName.replace(/\./g, "/") + '/MainActivity.java';
// will replace FragmentActivity with our HyperActivity.
let newSuperClass = fs.readFileSync(newActivityPath).toString();
const addedActivity = `in.juspay.hypersdk.HyperActivity`
newSuperClass = newSuperClass.replace("extends FragmentActivity", "extends " + addedActivity);
let mainActivityCode = fs.readFileSync(mainActivityPath).toString();
const newSuperClass = "extends in.juspay.hypersdk.HyperActivity";
mainActivityCode = mainActivityCode.replace("extends CordovaActivity", newSuperClass);

@@ -128,3 +128,3 @@

// so that HyperActivity.java could be accessed directly.
fs.writeFile(newActivityPath, newSuperClass, function(err) {
fs.writeFile(mainActivityPath, mainActivityCode, function(err) {
if (err) return console.error(err);

@@ -138,2 +138,2 @@ });

}
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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