Skip to content

Commit

Permalink
Improve Digital adapter: Set currency in bid response (prebid#2886)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbartek25 authored and Peiling-Ding committed Jul 14, 2023
1 parent f68fd5a commit 69969f9
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
1 change: 1 addition & 0 deletions adapters/improvedigital/improvedigital.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ func (a *ImprovedigitalAdapter) MakeBids(internalRequest *openrtb2.BidRequest, e
}

bidResponse := adapters.NewBidderResponseWithBidsCapacity(len(seatBid.Bid))
bidResponse.Currency = bidResp.Cur

for i := range seatBid.Bid {
bid := seatBid.Bid[i]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"mockBidRequest": {
"id": "test-request-id",
"cur": ["EUR"],
"site": {
"page": "https://good.site/url"
},
"imp": [{
"id": "test-imp-id",
"banner": {
"format": [{
"w": 300,
"h": 250
}]
},
"ext": {
"bidder": {
"placementId": 13245
}
}
}]
},

"httpCalls": [{
"expectedRequest": {
"uri": "http://localhost/pbs",
"body": {
"id": "test-request-id",
"cur": ["EUR"],
"site": {
"page": "https://good.site/url"
},
"imp": [{
"id": "test-imp-id",
"banner": {
"format": [{
"w": 300,
"h": 250
}]
},
"ext": {
"bidder": {
"placementId": 13245
}
}
}]
}
},
"mockResponse": {
"status": 200,
"body": {
"id": "test-request-id",
"cur": "EUR",
"seatbid": [{
"seat": "improvedigital",
"bid": [{
"id": "randomid",
"impid": "test-imp-id",
"price": 0.500000,
"adid": "12345678",
"adm": "some-test-ad",
"cid": "987",
"crid": "12345678",
"h": 250,
"w": 300
}]
}]
}
}
}],

"expectedBidResponses": [{
"currency": "EUR",
"bids": [{
"bid": {
"id": "randomid",
"impid": "test-imp-id",
"price": 0.5,
"adm": "some-test-ad",
"adid": "12345678",
"cid": "987",
"crid": "12345678",
"w": 300,
"h": 250
},
"type": "banner"
}]
}]
}

0 comments on commit 69969f9

Please sign in to comment.