Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xpay-js

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xpay-js - npm Package Compare versions

Comparing version 0.0.3 to 0.1.0

2

package.json
{
"name": "xpay-js",
"version": "0.0.3",
"version": "0.1.0",
"description": "Soft integration with X-pay payment system\"",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,5 +0,59 @@

# xpay-js
Soft integration with X-pay payment system
xpay-js
=================
Soft integration with Cartasì virtual POS X-pay payment system
Installation
=================
npm install xpay-js
WORK_IN_PROGRESS
or clone:
https://github.com/auridevil/xpay-js.git
Init
=================
The module can be directly configured or globaly configured.
Direct configuration:
var xpay = require('xpay-js')({
XPAY_KEY: '123456789012345678901',
XPAY_ALIAS: '7654321',
XPAY_RETURN_URL_OK: 'http:/myserver/okrul',
XPAY_RETURN_URL_KO: 'http:/myserver/korul',
});
For the global configuration you must set the variables:
XPAY_KEY: the key given by cartasi
XPAY_ALIAS: the app alias given by cartasi
XPAY_RETURN_URL_OK: your url to be called on ok
XPAY_RETURN_URL_KO: your url to be called on back
XPAY_SERVLET_URL: the xpay servelt url, default is pre-production enviroment
and require simpler:
var xpay = require('xpay-js')();
Usage
=================
The init phase return a function, just invoke the function
var macCode;
var xpayLink = xpay(transactionCode, transactionQuantity, mac);
using the transactionCode you have generated and taking care of using the quantity without decimals dot (e.g. 10€ = 1000). The mac is the generated code to be used in the url.
Improvements
=================
- Add production URL and a switch by configuration
Feel free to add any improvements and open a pull request.
Info
=================
For more infos about xpay watch http://www.cartasi.it/gtwpages/common/?id=OiRGdkfJWU
Made with love by Aureliano Bergese
Cheers by digitalx. http://digitalx.it/

@@ -21,3 +21,5 @@ /* eslint-env jasmine */

var res = xpay(args.transactionCode, args.quantity);
var mac;
var res = xpay(args.transactionCode, args.quantity, mac);
expect(res).toBeDefined();

@@ -24,0 +26,0 @@ // TODO: think about more testing

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