Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PubMatic : Check for 'bid.ext.bidtype' key instead of 'bid.ext.Bidtype' key in translator response object. #7683

Merged
merged 2 commits into from
Nov 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions modules/pubmaticBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -866,10 +866,10 @@ function _handleEids(payload, validBidRequests) {

function _checkMediaType(bid, newBid) {
// Create a regex here to check the strings
if (bid.ext && bid.ext['BidType'] != undefined) {
newBid.mediaType = MEDIATYPE[bid.ext.BidType];
if (bid.ext && bid.ext['bidtype'] != undefined) {
newBid.mediaType = MEDIATYPE[bid.ext.bidtype];
} else {
logInfo(LOG_WARN_PREFIX + 'bid.ext.BidType does not exist, checking alternatively for mediaType')
logInfo(LOG_WARN_PREFIX + 'bid.ext.bidtype does not exist, checking alternatively for mediaType')
var adm = bid.adm;
var admStr = '';
var videoRegex = new RegExp(/VAST\s+version/);
Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/pubmaticBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3457,7 +3457,7 @@ describe('PubMatic adapter', function () {
'h': 0,
'dealId': 'ASEA-MS-KLY-TTD-DESKTOP-ID-VID-6S-030420',
'ext': {
'BidType': 1
'bidtype': 1
}
}],
'ext': {
Expand Down