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 all, While placing an order with a custom payment method, I get "You need to provide at leas

U048WDEP3R7
U048WDEP3R7 Posts: 217 🧑🏻‍🚀 - Cadet
edited January 2023 in Help

Hello all,

While placing an order with a custom payment method, I get "You need to provide at least one state machine process for given method!" error, although I have defined it inside my config_default.php like this:

$config[SalesConstants::PAYMENT_METHOD_STATEMACHINE_MAPPING] = [
    PaymentConfig::PAYMENT_FOREIGN_PROVIDER => 'ForeignPaymentB2CStateMachine01',
    UnipayPaymentConfig::PROVIDER_NAME => 'UnipayPayment01'
];

Can someone please tell me what might be the problem?

Comments

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    what is the name of the custom payment method?

  • U048WDEP3R7
    U048WDEP3R7 Posts: 217 🧑🏻‍🚀 - Cadet

    @UL65CH0MC Provider is called 'UnipayPayment' and the payment method is called 'unipayFunpay'

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    Ok.. and what is the value of this constant UnipayPaymentConfig::PROVIDER_NAME ?

  • U048WDEP3R7
    U048WDEP3R7 Posts: 217 🧑🏻‍🚀 - Cadet

    @UL65CH0MC it is 'UnipayPayment'

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    ok then it's clear that does not macht.. the payment method name should match in PAYMENT_METHOD_STATEMACHINE_MAPPING

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet
    edited January 2023

    it means :

    $config[SalesConstants::PAYMENT_METHOD_STATEMACHINE_MAPPING] = [
        PaymentConfig::PAYMENT_FOREIGN_PROVIDER => 'ForeignPaymentB2CStateMachine01',
        'unipayFunpay' => 'UnipayPayment01'
    
  • U048WDEP3R7
    U048WDEP3R7 Posts: 217 🧑🏻‍🚀 - Cadet

    @UL65CH0MC It actually means:

    $config[SalesConstants::PAYMENT_METHOD_STATEMACHINE_MAPPING] = [
        PaymentConfig::PAYMENT_FOREIGN_PROVIDER => 'ForeignPaymentB2CStateMachine01',
        'UnipayPayment' => 'UnipayPayment01'
    
  • U048WDEP3R7
    U048WDEP3R7 Posts: 217 🧑🏻‍🚀 - Cadet

    @UL65CH0MC Hello, the issue got fixed. The payment method name was in the wrong constant. Thank you for making me look into this.