node-radial
Advanced tools
Comparing version 0.1.2 to 0.1.3
{ | ||
"name": "node-radial", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "NodeJS SDK for the Radial APIs", | ||
@@ -5,0 +5,0 @@ "main": "radial.js", |
@@ -13,3 +13,4 @@ /* LIB */ | ||
const defaults = { | ||
apiVersion: '1.0' | ||
apiVersion: '1.0', | ||
environment: process.env.NODE_ENV || 'development' | ||
}; | ||
@@ -32,5 +33,8 @@ | ||
params.apiVersion = configParams.apiVersion ? configParams.apiVersion.toString() : defaults.apiVersion; | ||
params.environment = configParams.environment ? configParams.environment : defaults.environment; | ||
Radial.params = params; | ||
Radial.paypal = require('./lib/paypal/index'); | ||
Radial.nonce = require('./lib/nonce'); | ||
Radial.creditCard = require('./lib/payments/creditCard/index'); | ||
Radial.paypal = require('./lib/payments/paypal/index'); | ||
@@ -37,0 +41,0 @@ return this; |
@@ -28,3 +28,20 @@ [![NPM version][npm-version-image]][npm-url] [![NPM downloads][npm-downloads-image]][npm-url] [![MIT License][license-image]][license-url] [![Build Status][travis-image]][travis-url] | ||
- `apiVersion` - API version as a numeric string **_defaults to '1.0'_** | ||
- `environment` - Set to either `development` or `production` **_defaults to the value of `NODE_ENV` or `development` if not set_** | ||
## Tokenization and 3D Secure | ||
<https://docs.ptf.radial.com/Content/Topics/payments/payment-3ds-tokenization.htm> | ||
### Get a Nonce | ||
``` | ||
radial.nonce(function(err, response) { | ||
/* | ||
response = { | ||
nonce: '1a83cd28-3847-4a41-8c52-48cc5ab1af61', | ||
expiresInSeconds: 1000 | ||
}; | ||
}); | ||
``` | ||
## PayPal Processing | ||
@@ -74,3 +91,4 @@ | ||
orderId: '12345', | ||
token: 'EC-5YE59312K56892714' | ||
token: 'EC-5YE59312K56892714', | ||
redirectUrl: 'https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-5YE59312K56892714' | ||
}; | ||
@@ -176,4 +194,4 @@ */ | ||
paymentStatus: 'Pending', | ||
paymentReason: 'Order', | ||
paymentCode: '12345' | ||
pendingReason: 'Order', | ||
reasonCode: '12345' | ||
} | ||
@@ -205,4 +223,4 @@ }; | ||
paymentStatus: 'Pending', | ||
paymentReason: 'Authorization', | ||
paymentCode: '1234' | ||
pendingReason: 'Authorization', | ||
reasonCode: '1234' | ||
} | ||
@@ -216,2 +234,3 @@ }; | ||
- **0.1.3:** Add method to get a nonce for use with Radial's JavaScript library. SetExpress returns a `redirectUrl` in addition to the raw token. Finalize doExpress method. | ||
- **0.1.2:** Add PayPal doExpress and doAuthorization endpoints. | ||
@@ -218,0 +237,0 @@ - **0.1.1:** Add PayPal getExpress endpoint and generalize the sendRequest lib. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
43749
15
1077
242
1
1