Skip to content
Snippets Groups Projects
Closed refactor CRM_Stripe_AJAX::confirmPayment() into an API action (StripePaymentIntent.generate)
  • View options
  • refactor CRM_Stripe_AJAX::confirmPayment() into an API action (StripePaymentIntent.generate)

  • View options
  • Closed Issue created by jamie

    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 by Rich

    Linked items ... 0

  • Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first
    Loading Loading Loading Loading Loading Loading Loading Loading Loading Loading