Skip to content

Commit

Permalink
Somo: fix an issue where the requestId was being set to the wrong val…
Browse files Browse the repository at this point in the history
…ue (#4596)
  • Loading branch information
travisbeale authored and mkendall07 committed Dec 17, 2019
1 parent d54c0a6 commit 9ba8031
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/somoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ export const spec = {

function bidResponseAvailable(bidRequest, bidResponse) {
let bidResponses = [];

if (bidResponse.body) {
let bidData = bidResponse.body.seatbid[0].bid[0];
const bid = {
requestId: bidData.impid,
requestId: bidResponse.body.id,
cpm: bidData.price,
width: bidData.w,
height: bidData.h,
Expand All @@ -74,6 +75,7 @@ function bidResponseAvailable(bidRequest, bidResponse) {
adId: bidData.impid,
netRevenue: false,
currency: 'USD',
adUnitCode: bidRequest.bidRequest.adUnitCode
};
if (isVideo(bidRequest.bidRequest)) {
bid.vastXml = bidData.adm;
Expand All @@ -89,7 +91,7 @@ function bidResponseAvailable(bidRequest, bidResponse) {

function openRtbRequest(bidRequest, bidderRequest) {
var openRtbRequest = {
id: bidRequest.bidderRequestId,
id: bidRequest.bidId,
imp: [openRtbImpression(bidRequest)],
at: 1,
tmax: 400,
Expand Down

0 comments on commit 9ba8031

Please sign in to comment.