ashishnitinpatil / django-oscar-cash-on-delivery

Cash on delivery for django-oscar
Other
4 stars 4 forks source link

Payment Confirmation after Delivery #1

Closed AdieOlami closed 6 years ago

AdieOlami commented 6 years ago

There is no means of confirming payment after delivery has been made

ashishnitinpatil commented 6 years ago

Hi, as discussed, there's currently no functionality to do that. But it should not be very hard to implement. You only need to record a payment event like "received" or "collected", and add corresponding dashboard form. We are not actually using Cash on delivery method in our current project, so didn't feel the need to add that. Please feel free to submit a PR with your implementation.

Will be happy to assist if you encounter any difficulties.

AdieOlami commented 6 years ago

hi kindly help look into it

ashishnitinpatil commented 6 years ago

For adding new dashboard views with forms, take a look at the existing oscar views that do it, particularly OrderDetailView. You can reuse the add_payment_event from it, inside your very own view for COD (dashboard/cashondelivery/views.py)

AdieOlami commented 6 years ago

tried it but messed everything up had to use git to restore previous version. If you could take a moment to show codes that would be greatly appreciated

ashishnitinpatil commented 6 years ago

Fixed in https://github.com/ashishnitinpatil/django-oscar-cash-on-delivery/commit/7b8d23a3b0a977b37d2d8bf42979a1255345bde5 If transaction is not confirmed, it will show an action button, which basically posts to the same view to get the transaction confirmed.

SalahAdDin commented 6 years ago

@ashishnitinpatil thank you.

AdieOlami commented 6 years ago

Thank you @ashishnitinpatil