Skip to content
Snippets Groups Projects
Commit 4f09c95f authored by drastik's avatar drastik
Browse files

version 1.4. Handle multiple payprocs present and Stripe not chosen.

parent 3375df89
No related branches found
No related tags found
No related merge requests found
......@@ -475,6 +475,7 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
3 => array($end_time, 'Timestamp'),
);
// Insert the new Stripe Subscription info.
CRM_Core_DAO::executeQuery("INSERT INTO civicrm_stripe_subscriptions
(customer_id, invoice_id, end_time, is_live)
VALUES (%1, %2, %3, '$transaction_mode')", $query_params);
......
<?xml version="1.0"?>
<extension key="com.drastikbydesign.stripe" type="module">
<downloadUrl>http://drastikbydesign.com/files/downloads/com.drastikbydesign.stripe-4.2-1.3.zip</downloadUrl>
<downloadUrl>http://drastikbydesign.com/files/downloads/com.drastikbydesign.stripe-4.2-1.4.zip</downloadUrl>
<file>stripe</file>
<name>Stripe</name>
<description>Stripe Payment Processor</description>
......@@ -12,8 +12,8 @@
<author>Joshua Walker (drastik) - Drastik by Design</author>
<email>admin (at) drastikbydesign.com</email>
</maintainer>
<releaseDate>2012-08-21</releaseDate>
<version>1.3</version>
<releaseDate>2013-02-08</releaseDate>
<version>1.4</version>
<develStage>stable</develStage>
<compatibility>
<ver>4.2</ver>
......
......@@ -49,6 +49,12 @@
if(cj(this).find("#priceset input[type='radio']:checked").data('amount') == 0) {
return true;
}
// Handle multiple payment options and Stripe not being chosen.
if(cj(this).find(".crm-section.payment_processor-section").length > 0) {
if(!cj(this).find("input#stripe-token").length > 0) {
return true;
}
}
Stripe.createToken({
name: cj('#billing_first_name').val() + ' ' + cj('#billing_last_name').val(),
address_zip: cj("#billing_postal_code-5").val(),
......@@ -76,7 +82,7 @@
// Show the errors on the form.
if(cj(".messages.crm-error.stripe-message").length > 0) {
cj(".messages.crm-error.stripe-message").slideUp();
cj(".messages.crm-error.stripe-message").remove();
cj(".messages.crm-error.stripe-message:first").remove();
}
cj("form.stripe-payment-form").prepend('<div class="messages crm-error stripe-message">'
+'<strong>Payment Error Response:</strong>'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment