Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Stripe
Stripe
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 39
    • Issues 39
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Extensions
  • StripeStripe
  • Issues
  • #131

Closed
Open
Opened Nov 08, 2019 by jamie@jamieDeveloper

refactor CRM_Stripe_AJAX::confirmPayment() into an API action (StripePaymentIntent.generate)

I'm working on updating remoteform to make it work with the new payment intent features added to the recent Stripe extensions.

Doing so requires me to essentially re-implement a simplified version of civicrm_stripe.js.

In the course of doing so... I see that I have to work out a way to execute CRM_Stripe_AJAX::conformPayment() but from a remote server, which means I can't do it via an Ajax call.

I was wondering if you would be open to some re-factoring that might make it easier.

Essentially - I'd like to move all the code in CRM_Stripe_AJAX to a new API action (generate) in the existing StripePaymentIntent API entity.

The API code would return { 'is_error': 0, values: { 'paymentIntent': N }} which is slightly different then what is returned now, but civicrm_stripe.js could be adjusted to accomodate it.

With this change, civicrm_stripe.js would then call the API method instead of posting to civicrm/stripe/confirm-payment

What do you think? Is there any compelling reason to keep CRM_Stripe_AJAX?

jamie

Edited Nov 11, 2019 by Rich
Assignee
Assign to
6.6
Milestone
6.6
Assign milestone
Time tracking
None
Due date
None
Reference: extensions/stripe#131