gocardless / cli-releases

Release repo for the gocardless cli
Apache License 2.0
4 stars 3 forks source link

[BUG]: CLI does not trigger event as expected #13

Closed lee-van-oetz closed 1 year ago

lee-van-oetz commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Get GC CLI on linux.
  2. Login & login to partner app
  3. Try triggering some event, e.g. trigger payment_submitted
  4. Result:
    
    This will trigger a payment_submitted event and create necessary resources in the process ⏳

Geo not supported for event simulation ❗



**Expected behavior**
Payment submitted.

**Screenshots**
![image](https://user-images.githubusercontent.com/7560923/172386612-22cbfc9b-962c-4672-ad22-dccd6a7f52cd.png)

**Desktop (please complete the following information):**
 - OS: Ubuntu 20.04.2 LTS (Focal Fossa)
perfectmak commented 2 years ago

Hi @lee-van-oetz, that error messages means you are trying to trigger an event on a pyament with a scheme that doesn't support that transition.

What country is your merchant registered in and what payment schemes (BACS, SEPA, ACH, etc) are enabled for that merchants account?

jds80021 commented 2 years ago

I am seeing a similar issue. Running the command gc trigger mandate_activated returns the message "Simulator only supports [["autogiro", "bacs", "betalingsservice", "pad"]] resources!".

Running cli_1.0.0-beta.2_Windows_x86_64 from windows 11 command line gc-issue-01 .

perfectmak commented 2 years ago

Hi @jds80021, when you ran gc login, in what country is the merchant you connected registered?

jds80021 commented 2 years ago

Country is US. I've since learned that gc trigger mandate_activated is not supported with the CLI. I've been able to get other gc trigger commands to work and forward to a localhost url, however, the forwarding is very inconsistent. My estimate is that a with a gc listen http://localhost:8080 running maybe one in ten actually forwards.

perfectmak commented 1 year ago

@jds80021 we have noted this issue and will be working on releasing a fix to make the event trigger and listen commands more reliable.

perfectmak commented 1 year ago

Hi @jds80021, this event triggering and listen feature has been significantly improved in the recent release. Please update your CLI version and try again.

jopfre commented 4 months ago

how to specify the scheme when triggering an event?

I see the flags are

      --billing_request string   A billing request resource
      --customer string          A customer resource
  -h, --help                     help for trigger
      --mandate string           A mandate resource
      --payment string           A payment resource

But I don't see any example of how to use them.

E.g. if i want to send gc trigger payment_confirmed how do I specify BACS scheme so as to avoid Geo not supported for event simulation

Jonas-Maihoefer commented 1 month ago

Running cli_1.0.1_Windows_x86_64 from Windows 11 Terminal with the merchant country Germany still gives the Geo not supported for event simulation error for all gc trigger commands. Are there known workarounds?