coopcycle / coopcycle-web

Logistics & marketplace platform. Only for worker-owned business.
https://coopcycle.org
Other
571 stars 130 forks source link

double customer reimbursement #4608

Closed HugoLCR closed 2 months ago

HugoLCR commented 2 months ago
Capture d’écran 2024-09-08 212853

Describe the bug When I refund amounts from a customer order via coopcycle (Stripe API connection), I often get a 2X refund (with just one click)

To Reproduce

  1. go to an order
  2. repay an amount by coopcycle
  3. See error

Expected behavior I want it to reimburse the chosen amount x1

Screenshots ![Uploading image.png…]()

Device (please complete the following information):

Atala commented 2 months ago

order : https://lcr.coopcycle.org/admin/orders/178800

there is only one POST sent here at 21:18 https://app.datadoghq.com/apm/traces?query=env%3Aprod%20service%3Asymfony%20resource_name%3Aadmin_order%20%40http.host%3Alcr.coopcycle.org%20%40http.method%3APOST&agg_m=count&agg_m_source=base&agg_t=count&cols=core_service%2Ccore_resource_name%2Clog_duration%2Clog_http.method%2Clog_http.status_code&fromUser=true&graphType=flamegraph&historicalData=true&messageDisplay=inline&query_translation_version=v0&shouldShowLegend=true&sort=time&spanType=all&storage=hot&view=spans&start=1725746400000&end=1725832740000&paused=true

trace of the POST in datadog https://app.datadoghq.com/apm/trace/66ddf868000000009efb5b8071d7cd86?colorBy=service&env=prod&graphType=flamegraph&shouldShowLegend=true&sort=time&spanID=11455850684370898310&spanViewType=metadata&timeHint=1725823080572.4211

no idea what is happening yet

Atala commented 2 months ago

@HugoLCR

is it a new thing? if yes since when? how many times did it happen?

tcmjlnt commented 2 months ago

Hey @Atala

Here are other occurrences we reported in the past :

Here is the thread in Slack https://coopcycle.slack.com/archives/C4UT4DGQ3/p1716060075453959?thread_ts=1716060037.373999&cid=C4UT4DGQ3

Here is the issue in Github https://github.com/coopcycle/coopcycle-web/issues/4341

alexsegura commented 2 months ago

Duplicate of #4341