You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am seeing the error "build_submission() got multiple values for keyword argument 'basket'" in checkout/session.py when processing the success view from PayPal Express. It seems that we set the basket in the kwargs in express/views.py as follows:
Reload frozen basket which is specified in the URL
kwargs['basket'] = self.load_frozen_basket(kwargs['basket_id'])
if not kwargs['basket']:
logger.warning(
"Unable to load frozen basket with ID %s", kwargs['basket_id'])
messages.error(
self.request,
_("No basket was found that corresponds to your "
"PayPal transaction"))
return HttpResponseRedirect(reverse('basket:summary'))
logger.info(
"Basket #%s - showing preview with payer ID %s and token %s",
kwargs['basket'].id, self.payer_id, self.token)
return super(SuccessResponseView, self).get(request, *args, **kwargs)
And then in checkout/session.py it tries to pass basket as an explicit argument as well as in the kwargs for build_submission():
def get_context_data(self, *_kwargs):
# Use the proposed submission as template context data. Flatten the
# order kwargs so they are easily available too.
ctx = self.build_submission(
basket=self.request.basket, *_kwargs)
ctx.update(kwargs)
ctx.update(ctx['order_kwargs'])
return ctx
This causes the error shown above. I am using oscar 0.7 and oscar-paypal 0.9.3
Any help is much appreciated!
Thank you.
The text was updated successfully, but these errors were encountered:
Hello,
I am seeing the error "build_submission() got multiple values for keyword argument 'basket'" in checkout/session.py when processing the success view from PayPal Express. It seems that we set the basket in the kwargs in express/views.py as follows:
Reload frozen basket which is specified in the URL
And then in checkout/session.py it tries to pass basket as an explicit argument as well as in the kwargs for build_submission():
def get_context_data(self, *_kwargs):
# Use the proposed submission as template context data. Flatten the
# order kwargs so they are easily available too.
ctx = self.build_submission(
basket=self.request.basket, *_kwargs)
ctx.update(kwargs)
ctx.update(ctx['order_kwargs'])
return ctx
This causes the error shown above. I am using oscar 0.7 and oscar-paypal 0.9.3
Any help is much appreciated!
Thank you.
The text was updated successfully, but these errors were encountered: