Skip to content

Commit

Permalink
fix wipes adapter response (prebid#5134)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tosh39 authored and iggyfisk committed Jun 22, 2020
1 parent b5c86e4 commit ef98a31
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
4 changes: 3 additions & 1 deletion modules/wipesBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ function isBidRequestValid(bid) {

function buildRequests(validBidRequests, bidderRequest) {
return validBidRequests.map(bidRequest => {
const bidId = bidRequest.bidId
const params = bidRequest.params;
const asid = params.asid;
return {
method: 'GET',
url: ENDPOINT_URL,
data: {
asid: asid,
bid_id: bidId,
}
}
});
Expand All @@ -40,7 +42,7 @@ function interpretResponse(serverResponse, bidRequest) {
if (cpm !== 0) {
const netRevenue = (response.netRevenue === undefined) ? true : response.netRevenue;
const bidResponse = {
requestId: response.uuid,
requestId: response.bid_id,
cpm: cpm,
width: response.width,
height: response.height,
Expand Down
11 changes: 6 additions & 5 deletions modules/wipesBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ var adUnits = [
}
},
bids: [{
bidder: 'wipes',
params: {
asid: 'dWyPondh2EGB_bNlrVjzIXRZO9F0k1dpo0I8ZvQ'
}
}]
bidder: 'wipes',
params: {
asid: 'dWyPondh2EGB_bNlrVjzIXRZO9F0k1dpo0I8ZvQ'
bid_id: '51ef8751f9aead',
}
}]
}]
```
4 changes: 3 additions & 1 deletion test/spec/modules/wipesBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ describe('wipesBidAdapter', function () {
'url': ENDPOINT_URL,
'data': {
'asid': 'dWyPondh2EGB_bNlrVjzIXRZO9F0k1dpo0I8ZvQ',
'bid_id': '23beaa6af6cdde',
}
}
];
Expand All @@ -106,7 +107,8 @@ describe('wipesBidAdapter', function () {
'cpm': 850,
'status_message': '',
'currency': 'JPY',
'video_creative_id': 600004
'video_creative_id': 600004,
'bid_id': '23beaa6af6cdde'
}
};

Expand Down

0 comments on commit ef98a31

Please sign in to comment.