What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hello everyone, I have created the custom payment module and I have struggled with the OMS state du

U01HX2U4NLQ
U01HX2U4NLQ Posts: 67 πŸ§‘πŸ»β€πŸš€ - Cadet

Hello everyone,

I have created the custom payment module and I have struggled with the OMS state during payment and the order history always shows "New". I have followed the steps that exist in the documentation https://documentation.spryker.com/docs/dd-be-implementation.

Further, I have found the oms active name/state machine payment name in the table "spy_oms_order_process" but no state item entries added/updated in table "spy_oms_order_item_state" related to my *.xml file.

Are any special commands need to execute in the console? Or need to add the state entries manually?

So, could anyone please assist to debug and resolve the issue?

Thanks in advance. πŸ™‚

Comments

  • Hi @U01HX2U4NLQ have you added your payment process to

    OmsConstants::ACTIVE_PROCESSES
    

    configuration

  • and to

    SalesConstants::PAYMENT_METHOD_STATEMACHINE_MAPPING
    
  • you can find it in config_default.php

  • U01HX2U4NLQ
    U01HX2U4NLQ Posts: 67 πŸ§‘πŸ»β€πŸš€ - Cadet

    @UR1QYK8MC Thank you for your response. Yes, I have added the payment name in both configurations in config_default.php.

    Also, added the OmsConstants::PROCESS_LOCATION value, and it draws the flow properly in zed oms settings. But, the state only not updated/added in the table.

    So, could you please tell me to debug in-depth core files or any other way?

  • Please open your state machine file and check if process name is correct (common name is the same as filename)

  • U01HX2U4NLQ
    U01HX2U4NLQ Posts: 67 πŸ§‘πŸ»β€πŸš€ - Cadet

    @UR1QYK8MC Yes, I have checked the name is defined as the filename as well in config_default.php.

  • hm, did you added it to the payment import as well?

  • and you can see it in backend?

  • U01HX2U4NLQ
    U01HX2U4NLQ Posts: 67 πŸ§‘πŸ»β€πŸš€ - Cadet

    Yes, the payments imported (data:import:payment-method) and ll displayed in the backend as well as oms.

  • U01HX2U4NLQ
    U01HX2U4NLQ Posts: 67 πŸ§‘πŸ»β€πŸš€ - Cadet

    The payment process also working properly except for the order status issue. I suspect the "spy_oms_order_item_state" only missing.

  • U01HX2U4NLQ
    U01HX2U4NLQ Posts: 67 πŸ§‘πŸ»β€πŸš€ - Cadet

    Also, debug the omsfacede inside our payment module trigger the respective event during the order process. I think it does not work unavailability of state entries in the table "spy_oms_order_item_state".

  • U01HX2U4NLQ
    U01HX2U4NLQ Posts: 67 πŸ§‘πŸ»β€πŸš€ - Cadet

    @UR1QYK8MC Could you please tell me in-depth when the entries will be added in the table "spy_oms_order_item_state". It's helpful for me to debug and correct my issue.

  • U01HX2U4NLQ
    U01HX2U4NLQ Posts: 67 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited December 2020

    @UR1QYK8MC Finally, I have debugged the issue and fixed it by adjusting my payment module OMS condition plugin. Thanks. πŸ™‚