Skip to content

Commit

Permalink
OptionMerchant.apply set also MerchantID as internal key
Browse files Browse the repository at this point in the history
additionally needed as sometimes orders are coming in without a specific
 internalID and we must fall back to the MerchantID
  • Loading branch information
SchumacherFM committed Jul 8, 2021
1 parent c0f532a commit 68d31d6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ func (m OptionMerchant) apply(c *Client) error {
return fmt.Errorf("InternalID %q already exists", m.InternalID)
}
c.merchants[m.InternalID] = m
if _, ok := c.merchants[m.MerchantID]; !ok {
c.merchants[m.MerchantID] = m
}
return nil
}

Expand Down

0 comments on commit 68d31d6

Please sign in to comment.