Skip to content

Commit

Permalink
rename config value
Browse files Browse the repository at this point in the history
  • Loading branch information
glaubenstein committed Apr 5, 2021
1 parent ce11ecc commit 575d9cc
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/recurly.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const DEFAULTS = {
braintree: { deviceData: undefined }
},
risk: {
threeDSecure: { preflightDeviceDataCollection: true }
threeDSecure: { preflightDeviceDataCollector: true }
},
api: 'https://api.recurly.com/js/v1',
fields: {
Expand Down
4 changes: 2 additions & 2 deletions lib/recurly/risk/three-d-secure/strategy/cybersource.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ export default class CybersourceStrategy extends ThreeDSecureStrategy {
static strategyName = 'cybersource';

static preflight ({ recurly, number, month, year, gateway_code }) {
const { preflightDeviceDataCollection } = recurly.config.risk.threeDSecure;
const { preflightDeviceDataCollector } = recurly.config.risk.threeDSecure;

if(!preflightDeviceDataCollection) {
if(!preflightDeviceDataCollector) {
return Promise.resolve();
}

Expand Down
4 changes: 2 additions & 2 deletions lib/recurly/risk/three-d-secure/strategy/worldpay.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ export default class WorldpayStrategy extends ThreeDSecureStrategy {
* @return {Promise}
*/
static preflight ({ recurly, number, jwt }) {
const { preflightDeviceDataCollection } = recurly.config.risk.threeDSecure;
const { preflightDeviceDataCollector } = recurly.config.risk.threeDSecure;

if(!preflightDeviceDataCollection) {
if(!preflightDeviceDataCollector) {
return Promise.resolve();
}

Expand Down
2 changes: 1 addition & 1 deletion test/unit/risk/three-d-secure/strategy/cybersource.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe('CybersourceStrategy', function () {

describe('device data collection disabled', function () {
beforeEach(function() {
this.recurly.config.risk.threeDSecure.preflightDeviceDataCollection = false;
this.recurly.config.risk.threeDSecure.preflightDeviceDataCollector = false;
});

it('does not construct a frame to collect a session id', function (done) {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/risk/three-d-secure/strategy/worldpay.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ describe('WorldpayStrategy', function () {

describe('device data collection disabled', function () {
beforeEach(function() {
this.recurly.config.risk.threeDSecure.preflightDeviceDataCollection = false;
this.recurly.config.risk.threeDSecure.preflightDeviceDataCollector = false;
});

it('does not construct a frame to collect a session id', function (done) {
Expand Down
2 changes: 1 addition & 1 deletion types/lib/configure.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export type RecurlyOptions = {
};
risk?: {
threeDSecure?: {
deviceDataCollection?: boolean;
preflightDeviceDataCollector?: boolean;
}
};

Expand Down

0 comments on commit 575d9cc

Please sign in to comment.