open-craft / ecommerce-hyperpay

This repository provides a pluggable Open edX ecommerce payment processor backend for HyperPay
GNU Affero General Public License v3.0
0 stars 5 forks source link

Wrong basket strategy being applied #3

Open giovannicimolin opened 3 years ago

giovannicimolin commented 3 years ago

Just found this out on our PayTabs implementation: the strategy being applied in the basket is incorrect.

This is the faulty line: https://github.com/open-craft/ecommerce-hyperpay/blob/main/hyperpay/views.py#L121

The correct strategy should be imported from ecommerce (partners/strategy.py) instead:

Default = get_class('partner.strategy', 'Default')

...

basket.strategy = Default()

CC @farhaanbukhsh @lgp171188

lgp171188 commented 3 years ago

@giovannicimolin, thanks for reporting this issue. Can you explain what exactly is the issue with import that is there now? I copied a lot of the code for these things from the payu backend implemented by eduNEXT and took inspiration from it for the rest.