Skip to content

Commit

Permalink
Better actually use those extra_requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMeers committed Oct 18, 2011
1 parent 994a737 commit 49f2913
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion paypal/pro/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,16 @@ def _recurring_setExpressCheckout_adapter(self, params):

return params

def _fetch(self, params, required=None, defaults=None):
def _fetch(
self, params, required=None, defaults=None, extra_requirements=None):
"""Make the NVP request and store the response."""
if required is None or defaults is None:
assert params['method'] in API_METHODS
if required is None:
required = API_METHODS[params['method']].get('required', ())
if defaults is None:
defaults = API_METHODS[params['method']].get('defaults', ())
required.update(extra_requirements or {})
defaults.update(params)
pp_params = self._check_and_update_params(required, defaults)
pp_string = self.signature + urlencode(pp_params)
Expand Down

0 comments on commit 49f2913

Please sign in to comment.