Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stripe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Extensions
Stripe
Commits
659de5bf
Commit
659de5bf
authored
10 years ago
by
andy-walker
Browse files
Options
Downloads
Patches
Plain Diff
fix for pay later bug:
https://github.com/drastik/civicrm_stripe/issues/5
parent
883c155e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/civicrm_stripe.js
+15
-1
15 additions, 1 deletion
js/civicrm_stripe.js
with
15 additions
and
1 deletion
js/civicrm_stripe.js
+
15
−
1
View file @
659de5bf
...
...
@@ -6,7 +6,9 @@
// Response from Stripe.createToken.
function
stripeResponseHandler
(
status
,
response
)
{
if
(
response
.
error
)
{
$
(
'
html, body
'
).
animate
({
scrollTop
:
0
},
300
);
// Show the errors on the form.
if
(
$
(
"
.messages.crm-error.stripe-message
"
).
length
>
0
)
{
...
...
@@ -14,7 +16,7 @@
$
(
"
.messages.crm-error.stripe-message:first
"
).
remove
();
}
$
(
"
form.stripe-payment-form
"
).
prepend
(
'
<div class="messages crm-error stripe-message">
'
+
'
<strong>Payment Error Response:</strong>
'
+
'
<strong>
Testing
Payment Error Response:</strong>
'
+
'
<ul id="errorList">
'
+
'
<li>Error:
'
+
response
.
error
.
message
+
'
</li>
'
+
'
</ul>
'
...
...
@@ -49,6 +51,7 @@
if
(
$
(
this
).
find
(
"
#priceset input[type='radio']:checked
"
).
data
(
'
amount
'
)
==
0
)
{
return
true
;
}
// Handle multiple payment options and Stripe not being chosen.
if
(
$
(
this
).
find
(
"
.crm-section.payment_processor-section
"
).
length
>
0
)
{
if
(
!
(
$
(
this
).
find
(
'
input[name="hidden_processor"]
'
).
length
>
0
))
{
...
...
@@ -56,6 +59,17 @@
}
}
// Handle pay later (option value '0' in payment_processor radio group)
if
(
$
(
this
).
find
(
'
input[name="payment_processor"]:checked
'
).
length
&&
!
parseInt
(
$
(
this
).
find
(
'
input[name="payment_processor"]:checked
'
).
val
()))
{
return
true
;
}
// Handle pay later
//if ($.inArray($(this).find('input[name="payment_processor"]').value, CRM.stripe.pp_ids) === -1) {
// return true;
//}
// Handle changes introduced in CiviCRM 4.3.
if
(
$
(
this
).
find
(
'
#credit_card_exp_date_M
'
).
length
>
0
)
{
var
cc_month
=
$
(
this
).
find
(
'
#credit_card_exp_date_M
'
).
val
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment