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

com.razorpay.cordova

Package Overview
Dependencies
Maintainers
3
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

com.razorpay.cordova - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

package.json
{
"name": "com.razorpay.cordova",
"version": "1.1.0",
"version": "1.1.1",
"description": "Cordova/Phonegap bindings for Razorpay's Mobile SDKs",

@@ -5,0 +5,0 @@ "main": "Readme.md",

@@ -22,7 +22,7 @@ # Cordova/Phonegap bindings for Razorpay's Mobile SDKs

cordova platform add browser # optional
cordova plugin add https://github.com/razorpay/razorpay-cordova.git --save
cordova plugin add com.razorpay.cordova --save
```
(or, `phonegap plugin add https://github.com/razorpay/razorpay-cordova.git --save`)
(or, `phonegap plugin add com.razorpay.cordova --save`)

@@ -99,3 +99,21 @@ ## Integration code

```
### Android Lifecycle Guide
***It is recomended that you read [this](https://cordova.apache.org/docs/en/latest/guide/platforms/android/#lifecycle-guide) first before proceeding with this section***
Since our plugin launches a new activity on Android, the cordova activity goes in the background
and might get destroyed by the Android System. For this scenario, you need to add the following code to make sure the
payment result is delivered after the cordova activity is recreated:
```
// You need to register an event listener for the `resume` event
document.addEventListener('resume', onResume, false);
var onResume = function(event) {
// Re-register the payment success and cancel callbacks
RazorpayCheckout.on('payment.success', successCallback)
RazorpayCheckout.on('payment.cancel', cancelCallback)
// Pass on the event to RazorpayCheckout
RazorpayCheckout.onResume(event);
};
```
### Things to be taken care:

@@ -102,0 +120,0 @@

@@ -32,3 +32,14 @@ /*global cordova, module*/

}
},
onResume: function(event) {
if(event.pendingResult && event.pendingResult.pluginServiceName === 'Checkout'){
if(event.pendingResult.pluginStatus === "OK") {
this.callbacks['payment.success'](event.pendingResult.result);
}
else {
this.callbacks['payment.cancel'](event.pendingResult.result);
}
}
}
};

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