Jump to content

Front End Stripe Associated With Service On Blesta


sharktek

Recommended Posts

Hey all devs--wondering if you could point me in the right direction,

 

We are trying to create a front end for stripe on our website (via Stripe API) so that users can process payments on our website:

This is what I am trying to achieve:

 

1) Gather all user/card data in a form on our website

2) Charge the card for an invoice on a recurring Blesta service we created using universal module

3) Mark that invoice as paid accordingly

 

My questions on doing this:

1) Would I be using the Stripe_Charge::create(); to create this charge?

2) How would I associate this charge to a specific customer's invoice?

 

Any push in the right direction would be awesome!

 

Link to comment
Share on other sites

Payments::processPayment has a parameter, $options, which allows for invoices (referenced by ID) to be specified along with the amount to be applied to them, e.g.

$options['invoices'] = array('26' => "5.25", '107' => "4.75");

The amounts in the invoice list should be <= the total amount specified in the $amount parameter.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...