Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Stripe Stripe
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 57
    • Issues 57
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Extensions
  • StripeStripe
  • Issues
  • #50
Closed
Open
Created Apr 11, 2019 by scardinius@scardiniusReporter

Processing charge.failed event is too restrict

When endpoint processes charge.failed it calls Contribution.getsingle. Action getsingle is more restrictive than get because when contribution does not exist then getsingle throw exception.

I have such history of Stripe donations:

  1. customer.created
  2. customer.updated
  3. payment_method.attached
  4. customer.source.created
  5. charge.failed

On 5. step there is no contribution in CiviCRM yet. This is a single donation, not subscription.

My idea is such:

  • use Contribution.get with trxn_id = chargeId
  • when contribution exists, update status to Failed
  • when contribution does not exists, create it with Failed status
Edited Apr 11, 2019 by scardinius
Assignee
Assign to
Time tracking