Help with custom payment method


I’m working on a custom payment method, but found I have some questions about it.

I followed

I have alreaady receive 200 approve from the payment gateway, but when I call
EventBus.$emit('checkout-do-placeOrder', { })

I receive the follow messsage
Cannot read property 'resultCode' of undefined null

It is related to but don’t know how to correctly pass data to the method.

Thanks in advance!

In this case, please check what order/placeOrder action returns. Error says it is null or undefined, please debug why is that.

While developing new payment method you might need to purge browser’s cache for this app after each place order attempt to prevent error like that

Hi, this is what I get when debug.

  1. First call onBeforePlaceOrder, like described here
  2. After remove activated listener
  3. Send the data to api and process it.
  4. Make the payment and receive 200 auth.

  1. After receive 200 auth call
    EventBus.$emit('checkout-do-placeOrder', {})

For some reason the API is called two times and receive the same answer in both cases.

Thanks in advance!

I think it is related to