Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discount codes not applied in amount sent to PayPal #14

Open
ghost opened this issue Jan 8, 2017 · 1 comment
Open

Discount codes not applied in amount sent to PayPal #14

ghost opened this issue Jan 8, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Jan 8, 2017

My cartridge shop offers a discount code on some products. When applied, this discount appears taken correctly in the cart total in shop.cart view, but the PaypalSubmissionForm does not pass the discount along to the PayPal submit URL. Looking at the code, I see that it is adding a field for each line item including the amount, but does not do anything to handle discount codes that I can see.

I will be happy to work on this myself and submit a PR at some point, but I thought I'd bring it up here in case anyone has a better idea how to do this that I do. For the moment, I'm pretty stumped tbh. Thanks!

@ghost
Copy link
Author

ghost commented Jan 10, 2017

Replying to myself here, I was able to get this working for my current purposes by calling the calculate_discount() method on the current session cart, and passing that via the PaypalSubmissionForm as PalPay variable discount_amount_cart.

No PR yet, as my present implementation is still pretty ugly, and it would be better (and possible) to send discrete discount amounts per item, as the form in master currently does with item prices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants