node-radial
Advanced tools
Comparing version 0.5.0 to 0.6.0
@@ -19,2 +19,3 @@ /* LIB */ | ||
Risk.confirm = require('./confirm'); | ||
Risk.status = require('./status'); | ||
@@ -21,0 +22,0 @@ /* NPM EXPORT */ |
{ | ||
"name": "node-radial", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"description": "NodeJS SDK for the Radial APIs", | ||
@@ -5,0 +5,0 @@ "main": "radial.js", |
@@ -549,6 +549,44 @@ [![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] | ||
### Risk Order Status | ||
Retrieve the fraud status of one or multiple orders. | ||
<https://docs.ptf.radial.com/Content/Topics/risk/risk-order-status.htm> | ||
#### Get Fraud Status For a Single Order | ||
``` | ||
RADIAL.risk.status({ | ||
orderId: '123-456' | ||
}, function (err, response) { | ||
/* | ||
response = { | ||
orderId: '123-456', | ||
riskOrderStatus: 'ACCEPT' | ||
}; | ||
*/ | ||
}); | ||
``` | ||
#### Get Fraud Status For Multiple Orders | ||
``` | ||
RADIAL.risk.status({ | ||
orderIdList: [ | ||
'123-456','789-012' | ||
] | ||
}, function (err, response) { | ||
/* | ||
response = [{ | ||
orderId: '123-456', | ||
riskOrderStatus: 'ACCEPT' | ||
}, { | ||
orderId: '789-012', | ||
riskOrderStatus: 'SUSPEND' | ||
}]; | ||
*/ | ||
}); | ||
## Webhooks | ||
The webhooks part of this API wrapper is PROBABLY NOT READY FOR PRIMETIME yet. I can't guarantee that it's going to work. | ||
Radial webhooks come in as an XML string, so you have to use a body parser to handle that XML. I believe Express Body Parser can handle it as a plain string, but this module assumes that you are using [Express XML BodyParser](https://www.npmjs.com/package/express-xml-bodyparser) to turn it into JSON. Eventually we'll have a built-in body parser that you can add to your webhook endpoint, but for now it requires the format generated by xml2js. | ||
@@ -620,2 +658,3 @@ | ||
- **0.6.0:** Adds `risk.status` endpoint to retrieve a fraud assessment status. | ||
- **0.5.0:** Adds `payments.auth.cancel` endpoint to cancel a payment authorization. | ||
@@ -622,0 +661,0 @@ - **0.4.11:** Improved optional checks for Address fields. |
109736
26
2592
701