Skip to content
GitLab
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 82
    • Issues 82
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • 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
  • #131
Closed
Open
Issue created 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
Time tracking