django-oscar / django-oscar-docdata

Docdata Payments Gateway integration for django-oscar
Apache License 2.0
22 stars 11 forks source link

DocdataOrder status="finished" #48

Closed jedie closed 5 years ago

jedie commented 5 years ago
class DocdataOrder(models.Model):
    ...
    STATUS_NEW = 'new'                      # Initial state
    STATUS_IN_PROGRESS = 'in_progress'      # In the redirect phase
    STATUS_PENDING = 'pending'              # Waiting for user to complete payment (e.g. credit cards)
    STATUS_PAID = 'paid'                    # End of story, paid!
    STATUS_PAID_REFUNDED = 'paid_refunded'  # Paid, and performed a partial refund
    STATUS_CANCELLED = 'cancelled'          # End of story, cancelled
    STATUS_CHARGED_BACK = 'charged_back'    # End of story, consumer asked for charge back
    STATUS_REFUNDED = 'refunded'            # End of story, refunded, merchant refunded
    STATUS_EXPIRED = 'expired'              # No results of customer, order was closed.
    STATUS_UNKNOWN = 'unknown'              # Help!
    ...

I missed here a status for a completely finished order. A order that was paid and shipped.

I have this information indirectly in "status" from: oscar.apps.order.models.Order

maerteijn commented 5 years ago

shipped (fulfilment) is not part of the Docdata payment API as far a I know (and it shouldn't be)

jedie commented 5 years ago

It's more about keeping internal records when the order it's done. But then maybe oscar.apps.order.models.Order is the best.

maerteijn commented 5 years ago

Yes, Oscar orders should have statuses like 'shipped' / 'dispatched', 'delivered' or whatever status you need in your particular use-case. So after the order is paid, another process should take care of the correct status of the oscar orders.

A Docdata order is just representing an order inside the Docdata payments environment.

jedie commented 5 years ago

Yeah, you're right. I think that's enough. I'm closing here.