OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums OroCommerce Set payment status for new order

This topic contains 5 replies, has 2 voices, and was last updated by  Mauro Chojrin 5 months ago.

  • Creator
    Topic
  • #37871

    Mauro Chojrin
    Participant

    Hi:

    I’ve implemented the Cash On Delivery payment term following the guide.

    It works, but when a client uses that as their payment terms, the order automatically gets marked as “Paid in full” which doesn’t reflect the reality (The order hasn’t been shipped yet, so there was no “On Delivery”…).

    How can I change this behavior so that the default status is something like “Payment pending”?

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #37875

    Hello, Mauro.

    Default value of payment status is defined in Oro\Bundle\PaymentBundle\Provider\PaymentStatusProvider (service ID oro_payment.provider.payment_status) – so you may check how it works out of the box.

    To do what you want you may implement your own payment status provider (using Oro\Bundle\PaymentBundle\Provider\PaymentStatusProviderInterface) that should track only payment transactions from your payment method and return different payment status. I’d recommend to decorate original payment provider and add custom processing only for orders with your custom payment method.

    #37880

    Mauro Chojrin
    Participant

    Hi Yevhen:

    Sounds interesting… is there any documentation I can look at?

    Thanks!

    #37884

    No documentation for now, but I guess name of the interface and service should be enough to make this customization. Let me know if you have some specific questions about it.

    #38182

    Mauro Chojrin
    Participant

    Hi Yevhen:

    I’m following this issue over here.

    I’ll mark this as solved in order not to duplicate.

    Thanks!

    • This reply was modified 5 months ago by  Mauro Chojrin. Reason: Forgot to mark as solved
    #38185

    Mauro Chojrin
    Participant

    Marking it as solved

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No