From 43d2ca9012d957cfee258bfb00014720d11e2b80 Mon Sep 17 00:00:00 2001 From: onaydenov Date: Wed, 18 Oct 2017 12:59:38 +0200 Subject: [PATCH 01/11] Fidelity Media Adapter update. Prebid v1.0. Fidelity Media Adapter update. Prebid v1.0 plus featutes update. Add Prebid v1.0 support Add parameter "floor" Removed: "Loc" "Click" "SubId" Subid=HB trasferred to SSP by default now. --- modules/fidelityBidAdapter.js | 171 +++++++++++++++------------------- 1 file changed, 77 insertions(+), 94 deletions(-) diff --git a/modules/fidelityBidAdapter.js b/modules/fidelityBidAdapter.js index 73ee9d44ddd..a0279664937 100644 --- a/modules/fidelityBidAdapter.js +++ b/modules/fidelityBidAdapter.js @@ -1,102 +1,85 @@ -var utils = require('src/utils.js'); -var bidfactory = require('src/bidfactory.js'); -var bidmanager = require('src/bidmanager.js'); -var adloader = require('src/adloader'); -var STATUS = require('src/constants').STATUS; -var adaptermanager = require('src/adaptermanager'); +import * as utils from 'src/utils'; +import {registerBidder} from 'src/adapters/bidderFactory'; + +const BIDDER_CODE = 'fidelity'; +const BIDDER_SERVER = 'x.fidelity-media.com'; +export const spec = { + code: BIDDER_CODE, + isBidRequestValid: function(bid) { + return !!(bid && bid.params && bid.params.zoneid); + }, + buildRequests: function(validBidRequests, bidderRequest) { + return validBidRequests.map(bidRequest => { + var server = bidRequest.params.server || BIDDER_SERVER; -var FidelityAdapter = function FidelityAdapter() { - var FIDELITY_BIDDER_NAME = 'fidelity'; - var FIDELITY_SERVER_NAME = 'x.fidelity-media.com'; + const payload = { + from: 'hb', + v: '1.0', + requestid: bidRequest.bidderRequestId, + impid: bidRequest.bidId, + zoneid: bidRequest.params.zoneid, + floor: parseFloat(bidRequest.params.floor) > 0 ? bidRequest.params.floor : 0, + charset: document.charSet || document.characterSet, + defloc: utils.getTopWindowUrl(), + altloc: window.location.href, + subid: 'hb', + flashver: getFlashVersion(), + tmax: bidderRequest.timeout, + }; + if (document.referrer) { + payload.referrer = document.referrer; + } - function _callBids(params) { - var bids = params.bids || []; - bids.forEach(function (currentBid) { - var server = currentBid.params.server || FIDELITY_SERVER_NAME; - var m3_u = window.location.protocol + '//' + server + '/delivery/hb.php?'; - m3_u += 'callback=window.$$PREBID_GLOBAL$$.fidelityResponse'; - m3_u += '&requestid=' + utils.getUniqueIdentifierStr(); - m3_u += '&impid=' + currentBid.bidId; - m3_u += '&zoneid=' + currentBid.params.zoneid; - m3_u += '&cb=' + Math.floor(Math.random() * 99999999999); - m3_u += document.charset ? '&charset=' + document.charset : (document.characterSet ? '&charset=' + document.characterSet : ''); - - var loc; - try { - loc = window.top !== window ? document.referrer : window.location.href; - } catch (e) { - loc = document.referrer; - } - loc = currentBid.params.loc || loc; - m3_u += '&loc=' + encodeURIComponent(loc); - - var subid = currentBid.params.subid || 'hb'; - m3_u += '&subid=' + subid; - if (document.referrer) m3_u += '&referer=' + encodeURIComponent(document.referrer); - if (currentBid.params.click) m3_u += '&ct0=' + encodeURIComponent(currentBid.params.click); - m3_u += '&flashver=' + encodeURIComponent(getFlashVersion()); - - adloader.loadScript(m3_u); + return { + method: 'GET', + url: '//' + server + '/delivery/hb.php', + data: payload + }; }); - } + }, + interpretResponse: function(serverResponse) { + const bidResponses = []; + if (serverResponse && serverResponse.seatbid) { + serverResponse.seatbid.forEach(seatBid => seatBid.bid.forEach(bid => { + const bidResponse = { + bidderCode: spec.code, + requestId: bid.impid, + cpm: bid.price, + width: bid.width, + height: bid.height, + ad: bid.adm, + netRevenue: bid.netRevenue, + currency: bid.cur, + }; - function getFlashVersion() { - var plugins, plugin, result; - - if (navigator.plugins && navigator.plugins.length > 0) { - plugins = navigator.plugins; - for (var i = 0; i < plugins.length && !result; i++) { - plugin = plugins[i]; - if (plugin.name.indexOf('Shockwave Flash') > -1) { - result = plugin.description.split('Shockwave Flash ')[1]; - } - } + bidResponses.push(bidResponse); + })); } - return result || ''; - } - - function addBlankBidResponses(placementsWithBidsBack) { - var allFidelityBidRequests = $$PREBID_GLOBAL$$._bidsRequested.find(bidSet => bidSet.bidderCode === FIDELITY_BIDDER_NAME); - - if (allFidelityBidRequests && allFidelityBidRequests.bids) { - utils._each(allFidelityBidRequests.bids, function (fidelityBid) { - if (!utils.contains(placementsWithBidsBack, fidelityBid.placementCode)) { - // Add a no-bid response for this placement. - var bid = bidfactory.createBid(STATUS.NO_BID, fidelityBid); - bid.bidderCode = FIDELITY_BIDDER_NAME; - bidmanager.addBidResponse(fidelityBid.placementCode, bid); - } - }); - } - } - - $$PREBID_GLOBAL$$.fidelityResponse = function(responseObj) { - if (!responseObj || !responseObj.seatbid || responseObj.seatbid.length === 0 || !responseObj.seatbid[0].bid || responseObj.seatbid[0].bid.length === 0) { - addBlankBidResponses([]); - return; + return bidResponses; + }, + getUserSyncs: function getUserSyncs(syncOptions) { + if (syncOptions.iframeEnabled) { + return [{ + type: 'iframe', + url: '//' + BIDDER_SERVER + '/delivery/matches.php?type=iframe', + }]; } + } +} + +function getFlashVersion() { + var plugins, plugin, result; - var bid = responseObj.seatbid[0].bid[0]; - var status = bid.adm ? STATUS.GOOD : STATUS.NO_BID; - var requestObj = utils.getBidRequest(bid.impid); - - var bidResponse = bidfactory.createBid(status); - bidResponse.bidderCode = FIDELITY_BIDDER_NAME; - if (status === STATUS.GOOD) { - bidResponse.cpm = parseFloat(bid.price); - bidResponse.ad = bid.adm; - bidResponse.width = parseInt(bid.width); - bidResponse.height = parseInt(bid.height); + if (navigator.plugins && navigator.plugins.length > 0) { + plugins = navigator.plugins; + for (var i = 0; i < plugins.length && !result; i++) { + plugin = plugins[i]; + if (plugin.name.indexOf('Shockwave Flash') > -1) { + result = plugin.description.split('Shockwave Flash ')[1]; + } } - var placementCode = requestObj && requestObj.placementCode; - bidmanager.addBidResponse(placementCode, bidResponse); - }; - - return { - callBids: _callBids - }; -}; - -adaptermanager.registerBidAdapter(new FidelityAdapter(), 'fidelity'); - -module.exports = FidelityAdapter; + } + return result || ''; +} + +registerBidder(spec); From 563d8e14e640d277ea017b7dc88c8c9626311608 Mon Sep 17 00:00:00 2001 From: onaydenov Date: Wed, 18 Oct 2017 13:02:03 +0200 Subject: [PATCH 02/11] Fidelity Media Adapter update. Prebid v1.0. Fidelity Media Adapter update. Prebid v1.0 plus featutes update. Add Prebid v1.0 support Add parameter "floor" Removed: "Loc" "Click" "SubId" Subid=HB trasferred to SSP by default now. --- test/spec/modules/fidelityBidAdapter_spec.js | 310 ++++++++----------- 1 file changed, 137 insertions(+), 173 deletions(-) diff --git a/test/spec/modules/fidelityBidAdapter_spec.js b/test/spec/modules/fidelityBidAdapter_spec.js index 5777c6af8cd..969e648b724 100644 --- a/test/spec/modules/fidelityBidAdapter_spec.js +++ b/test/spec/modules/fidelityBidAdapter_spec.js @@ -1,195 +1,159 @@ -describe('fidelity adapter tests', function() { - const expect = require('chai').expect; - const adapter = require('modules/fidelityBidAdapter'); - const adLoader = require('src/adloader'); - const bidmanager = require('src/bidmanager'); - const STATUS = require('src/constants').STATUS; - var urlParse = require('url-parse'); - var querystringify = require('querystringify'); - - describe('creation of bid url', function () { - it('should be called', function () { - var stubLoadScript; - stubLoadScript = sinon.stub(adLoader, 'loadScript'); - - var bidderRequest = { - bidderCode: 'fidelity', - bids: [ - { - bidId: 'bidId-123456-1', - bidder: 'fidelity', - params: { - zoneid: '37' - }, - placementCode: 'div-gpt-ad-123456-1' - }, - ] - }; +import { expect } from 'chai'; +import { spec } from 'modules/fidelityBidAdapter'; +import { newBidder } from 'src/adapters/bidderFactory'; - adapter().callBids(bidderRequest); - sinon.assert.called(stubLoadScript); +describe('FidelityAdapter', () => { + const adapter = newBidder(spec); - stubLoadScript.restore(); + describe('inherited functions', () => { + it('exists and is a function', () => { + expect(adapter.callBids).to.exist.and.to.be.a('function'); }); + }); - it('should populate required parameters', function () { - var stubLoadScript; - stubLoadScript = sinon.stub(adLoader, 'loadScript'); - - var bidderRequest = { - bidderCode: 'fidelity', - bids: [ - { - bidId: 'bidId-123456-1', - bidder: 'fidelity', - params: { - zoneid: '37', - }, - placementCode: 'div-gpt-ad-123456-1' - }, - ] - }; - - adapter().callBids(bidderRequest); - - stubLoadScript.restore(); + describe('isBidRequestValid', () => { + let bid = { + 'bidder': 'fidelity', + 'params': { + 'zoneid': '37', + 'floor': '0.05', + 'server': 't.fidelity-media.com', + }, + 'adUnitCode': 'adunit-code', + 'sizes': [[300, 250], [300, 600]], + 'bidId': '30b31c1838de1e', + 'bidderRequestId': '22edbae2733bf6', + 'auctionId': '1d1a030790a475', + }; + + it('should return true when required params found', () => { + expect(spec.isBidRequestValid(bid)).to.equal(true); }); - it('should populate required and optional parameters', function () { - var stubLoadScript; - stubLoadScript = sinon.stub(adLoader, 'loadScript'); - - var bidderRequest = { - bidderCode: 'fidelity', - bids: [ - { - bidId: 'bidId-123456-1', - bidder: 'fidelity', - params: { - zoneid: '37', - server: 't.fidelity-media.com', - loc: 'http://locurl', - click: 'http://clickurl', - subid: '000' - }, - placementCode: 'div-gpt-ad-123456-1' - }, - ] + it('should return true when required params found', () => { + let bid = Object.assign({}, bid); + delete bid.params; + bid.params = { + 'zoneid': '37', }; - - adapter().callBids(bidderRequest); - - var requestURI = stubLoadScript.getCall(0).args[0]; - var parsedBidUrl = urlParse(requestURI); - var parsedBidUrlQueryString = querystringify.parse(parsedBidUrl.query); - - expect(parsedBidUrl.hostname).to.equal('t.fidelity-media.com'); - - expect(parsedBidUrlQueryString).to.have.property('zoneid').and.to.equal('37'); - expect(parsedBidUrlQueryString).to.have.property('impid').and.to.equal('bidId-123456-1'); - expect(parsedBidUrlQueryString).to.have.property('callback').and.to.equal('window.$$PREBID_GLOBAL$$.fidelityResponse'); - expect(parsedBidUrlQueryString).to.have.property('loc').and.to.equal('http://locurl'); - expect(parsedBidUrlQueryString).to.have.property('ct0').and.to.equal('http://clickurl'); - expect(parsedBidUrlQueryString).to.have.property('subid').and.to.equal('000'); - - stubLoadScript.restore(); + expect(spec.isBidRequestValid(bid)).to.equal(true); }); - }); - describe('fidelityResponse', function () { - it('should exist and be a function', function () { - expect($$PREBID_GLOBAL$$.fidelityResponse).to.exist.and.to.be.a('function'); + it('should return false when required params are not passed', () => { + let bid = Object.assign({}, bid); + delete bid.params; + bid.params = { + 'zoneid': 0, + }; + expect(spec.isBidRequestValid(bid)).to.equal(false); }); + }); - it('should add empty bid response if no bids returned', function () { - var stubAddBidResponse = sinon.stub(bidmanager, 'addBidResponse'); - - var bidderRequest = { - bidderCode: 'fidelity', - bids: [ - { - bidId: 'bidId-123456-1', - bidder: 'fidelity', - params: { - zoneid: '37' - }, - placementCode: 'div-gpt-ad-123456-1' + describe('buildRequests', () => { + let bidderRequest = { + bidderCode: 'fidelity', + requestId: 'c45dd708-a418-42ec-b8a7-b70a6c6fab0a', + bidderRequestId: '178e34bad3658f', + bids: [ + { + bidder: 'fidelity', + params: { + zoneid: '37', + floor: '0.05', + server: 't.fidelity-media.com', }, - ] - }; - - // no bids returned in the response. - var response = { - 'id': '543210', - 'seatbid': [] - }; - - $$PREBID_GLOBAL$$._bidsRequested.push(bidderRequest); - // adapter needs to be called, in order for the stub to register. - adapter() - - $$PREBID_GLOBAL$$.fidelityResponse(response); - - var bidPlacementCode1 = stubAddBidResponse.getCall(0).args[0]; - var bidObject1 = stubAddBidResponse.getCall(0).args[1]; - - expect(bidPlacementCode1).to.equal('div-gpt-ad-123456-1'); - expect(bidObject1.getStatusCode()).to.equal(2); - expect(bidObject1.bidderCode).to.equal('fidelity'); - - stubAddBidResponse.restore(); + placementCode: '/19968336/header-bid-tag-0', + sizes: [[300, 250], [320, 50]], + bidId: '2ffb201a808da7', + bidderRequestId: '178e34bad3658f', + requestId: 'c45dd708-a418-42ec-b8a7-b70a6c6fab0a', + transactionId: 'd45dd707-a418-42ec-b8a7-b70a6c6fab0b' + } + ], + start: 1472239426002, + auctionStart: 1472239426000, + timeout: 5000 + }; + + it('should add source and verison to the tag', () => { + const [request] = spec.buildRequests(bidderRequest.bids, bidderRequest); + const payload = request.data; + expect(payload.from).to.exist; + expect(payload.v).to.exist; + expect(payload.requestid).to.exist; + expect(payload.impid).to.exist; + expect(payload.zoneid).to.exist; + expect(payload.floor).to.exist; + expect(payload.charset).to.exist; + expect(payload.defloc).to.exist; + expect(payload.altloc).to.exist; + expect(payload.subid).to.exist; + expect(payload.flashver).to.exist; + expect(payload.tmax).to.exist; }); - it('should add a bid response for bid returned', function () { - var stubAddBidResponse = sinon.stub(bidmanager, 'addBidResponse'); - - var bidderRequest = { - bidderCode: 'fidelity', - bids: [ - { - bidId: 'bidId-123456-1', - bidder: 'fidelity', - params: { - zoneid: '37' - }, - placementCode: 'div-gpt-ad-123456-1' - }, - ] - }; + it('sends bid request to ENDPOINT via GET', () => { + const [request] = spec.buildRequests(bidderRequest.bids, bidderRequest); + expect(request.url).to.equal('//t.fidelity-media.com/delivery/hb.php'); + expect(request.method).to.equal('GET'); + }); + }) + + describe('interpretResponse', () => { + let response = { + 'id': '543210', + 'seatbid': [ { + 'bid': [ { + 'id': '1111111', + 'impid': 'bidId-123456-1', + 'price': 0.09, + 'adm': '', + 'width': 728, + 'height': 90, + } ] + } ] + }; + + it('should get correct bid response', () => { + let expectedResponse = [ + { + bidderCode: 'fidelity', + requestId: 'bidId-123456-1', + cpm: 0.09, + width: 728, + height: 90, + ad: '', + netRevenue: true, + currency: 'USD', + } + ]; + + let result = spec.interpretResponse(response); + expect(Object.keys(result[0])).to.deep.equal(Object.keys(expectedResponse[0])); + }); - // Returning a single bid in the response. - var response = { + it('handles nobid responses', () => { + let response = { 'id': '543210', - 'seatbid': [ { - 'bid': [ { - 'id': '1111111', - 'impid': 'bidId-123456-1', - 'price': 0.09, - 'adm': '<>', - 'height': 90, - 'width': 728 - } ] - } ] + 'seatbid': [ ] }; - $$PREBID_GLOBAL$$._bidsRequested.push(bidderRequest); - // adapter needs to be called, in order for the stub to register. - adapter() - - $$PREBID_GLOBAL$$.fidelityResponse(response); - - var bidPlacementCode1 = stubAddBidResponse.getCall(0).args[0]; - var bidObject1 = stubAddBidResponse.getCall(0).args[1]; - - expect(bidPlacementCode1).to.equal('div-gpt-ad-123456-1'); - expect(bidObject1.getStatusCode()).to.equal(1); - expect(bidObject1.bidderCode).to.equal('fidelity'); - expect(bidObject1.cpm).to.equal(0.09); - expect(bidObject1.height).to.equal(90); - expect(bidObject1.width).to.equal(728); - expect(bidObject1.ad).to.equal('<>'); + let result = spec.interpretResponse(response); + expect(result.length).to.equal(0); + }); + }); - stubAddBidResponse.restore(); + describe('user sync', () => { + const syncUrl = '//x.fidelity-media.com/delivery/matches.php?type=iframe'; + + it('should register the sync iframe', () => { + expect(spec.getUserSyncs({})).to.be.undefined; + expect(spec.getUserSyncs({iframeEnabled: false})).to.be.undefined; + const options = spec.getUserSyncs({iframeEnabled: true}); + expect(options).to.not.be.undefined; + expect(options).to.have.lengthOf(1); + expect(options[0].type).to.equal('iframe'); + expect(options[0].url).to.equal(syncUrl); }); }); }); From 58012ac4ef6cdea8f8876020d5820eee51c0316b Mon Sep 17 00:00:00 2001 From: onaydenov Date: Fri, 20 Oct 2017 18:23:02 +0300 Subject: [PATCH 03/11] Fidelity Media fmxSSP Adapter update. Prebid v1.0 --- modules/fidelityBidAdapter.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 modules/fidelityBidAdapter.md diff --git a/modules/fidelityBidAdapter.md b/modules/fidelityBidAdapter.md new file mode 100644 index 00000000000..a4f1e91cd3d --- /dev/null +++ b/modules/fidelityBidAdapter.md @@ -0,0 +1,26 @@ +# Overview + +**Module Name**: Fidelity Media fmxSSP Bidder Adapter +**Module Type**: Bidder Adapter +**Maintainer**: on@fidelity-media.com + +# Description + +Connects to Fidelity Media fmxSSP demand source to fetch bids. + +# Test Parameters +``` + var adUnits = [{ + code: 'banner-ad-div', + sizes: [[300, 250]], + bids: [{ + bidder: 'fidelity', + params: { + zoneid: '27248', + floor: 0.005, + server: 'x.fidelity-media.com' + } + }] + }]; + +``` From 32904c49aac7606abf02e017752d8462a0180f3d Mon Sep 17 00:00:00 2001 From: onaydenov Date: Fri, 20 Oct 2017 23:22:39 +0300 Subject: [PATCH 04/11] Fidelity Media. Prebid v 1.0 Add tmax --- modules/fidelityBidAdapter.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/fidelityBidAdapter.js b/modules/fidelityBidAdapter.js index a0279664937..d3b615ff618 100644 --- a/modules/fidelityBidAdapter.js +++ b/modules/fidelityBidAdapter.js @@ -50,6 +50,7 @@ export const spec = { ad: bid.adm, netRevenue: bid.netRevenue, currency: bid.cur, + ttl: bid.ttl, }; bidResponses.push(bidResponse); From aeb7b137a3f7b24bd803e2c18dce68ec08b9be7e Mon Sep 17 00:00:00 2001 From: onaydenov Date: Sat, 21 Oct 2017 01:20:39 +0300 Subject: [PATCH 05/11] Fidelity Media. Prebid v 1.0. ttl From b009b16d5322d4d2e1e07746b104d9c1c2e06c3b Mon Sep 17 00:00:00 2001 From: onaydenov Date: Sat, 21 Oct 2017 01:21:49 +0300 Subject: [PATCH 06/11] Fidelity Media. Prebid v 1.0. spec --- test/spec/modules/fidelityBidAdapter_spec.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/spec/modules/fidelityBidAdapter_spec.js b/test/spec/modules/fidelityBidAdapter_spec.js index 969e648b724..486e12e25ad 100644 --- a/test/spec/modules/fidelityBidAdapter_spec.js +++ b/test/spec/modules/fidelityBidAdapter_spec.js @@ -125,6 +125,7 @@ describe('FidelityAdapter', () => { ad: '', netRevenue: true, currency: 'USD', + ttl: 360, } ]; From 9204c3584728766a566561cba35efd1247d10dd6 Mon Sep 17 00:00:00 2001 From: onaydenov Date: Wed, 25 Oct 2017 01:21:49 +0300 Subject: [PATCH 07/11] Less bidderCode, add creativeId --- test/spec/modules/fidelityBidAdapter_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/modules/fidelityBidAdapter_spec.js b/test/spec/modules/fidelityBidAdapter_spec.js index 486e12e25ad..be39acd407f 100644 --- a/test/spec/modules/fidelityBidAdapter_spec.js +++ b/test/spec/modules/fidelityBidAdapter_spec.js @@ -117,8 +117,8 @@ describe('FidelityAdapter', () => { it('should get correct bid response', () => { let expectedResponse = [ { - bidderCode: 'fidelity', requestId: 'bidId-123456-1', + creativeId: 'bidId-123456-1', cpm: 0.09, width: 728, height: 90, From c1ef34766c367eb04d4ce931c920fe41789a2460 Mon Sep 17 00:00:00 2001 From: onaydenov Date: Wed, 25 Oct 2017 01:22:59 +0300 Subject: [PATCH 08/11] Adapter v.1, less bidderCode, add creativeId --- modules/fidelityBidAdapter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/fidelityBidAdapter.js b/modules/fidelityBidAdapter.js index d3b615ff618..ee34d2d3f24 100644 --- a/modules/fidelityBidAdapter.js +++ b/modules/fidelityBidAdapter.js @@ -42,8 +42,8 @@ export const spec = { if (serverResponse && serverResponse.seatbid) { serverResponse.seatbid.forEach(seatBid => seatBid.bid.forEach(bid => { const bidResponse = { - bidderCode: spec.code, - requestId: bid.impid, + requestId: bid.impid, + creativeId: bid.impid, cpm: bid.price, width: bid.width, height: bid.height, From 3a901ffed32fdfe992bc6ffa8deb5b22490d4c2e Mon Sep 17 00:00:00 2001 From: onaydenov Date: Thu, 26 Oct 2017 00:06:24 +0300 Subject: [PATCH 09/11] Prebid v1. InterpretResponse. Spec. --- test/spec/modules/fidelityBidAdapter_spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/spec/modules/fidelityBidAdapter_spec.js b/test/spec/modules/fidelityBidAdapter_spec.js index be39acd407f..036a34ee0b0 100644 --- a/test/spec/modules/fidelityBidAdapter_spec.js +++ b/test/spec/modules/fidelityBidAdapter_spec.js @@ -129,7 +129,7 @@ describe('FidelityAdapter', () => { } ]; - let result = spec.interpretResponse(response); + let result = spec.interpretResponse({ body: response }); expect(Object.keys(result[0])).to.deep.equal(Object.keys(expectedResponse[0])); }); @@ -139,7 +139,7 @@ describe('FidelityAdapter', () => { 'seatbid': [ ] }; - let result = spec.interpretResponse(response); + let result = spec.interpretResponse({ body: response }); expect(result.length).to.equal(0); }); }); From 7ad9f4d236d10c99df079a5470458e0aa3dd7ba8 Mon Sep 17 00:00:00 2001 From: onaydenov Date: Thu, 26 Oct 2017 00:07:41 +0300 Subject: [PATCH 10/11] InterpretResponse --- modules/fidelityBidAdapter.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/fidelityBidAdapter.js b/modules/fidelityBidAdapter.js index ee34d2d3f24..ca7dc9d6fd6 100644 --- a/modules/fidelityBidAdapter.js +++ b/modules/fidelityBidAdapter.js @@ -38,6 +38,7 @@ export const spec = { }); }, interpretResponse: function(serverResponse) { + serverResponse = serverResponse.body; const bidResponses = []; if (serverResponse && serverResponse.seatbid) { serverResponse.seatbid.forEach(seatBid => seatBid.bid.forEach(bid => { From 64970423115b51f1886f30b678c6feda90560354 Mon Sep 17 00:00:00 2001 From: onaydenov Date: Thu, 26 Oct 2017 00:08:33 +0300 Subject: [PATCH 11/11] InterpretResponse