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
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
6c0b0f5e
Commit
6c0b0f5e
authored
6 years ago
by
mattwire
Browse files
Options
Downloads
Patches
Plain Diff
Ensure we detect stripe when single processor is enabled on drupal webform
parent
0c5ecac0
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
+12
-4
12 additions, 4 deletions
js/civicrm_stripe.js
with
12 additions
and
4 deletions
js/civicrm_stripe.js
+
12
−
4
View file @
6c0b0f5e
...
...
@@ -213,13 +213,21 @@
// Handle multiple payment options and Stripe not being chosen.
if
(
isWebform
)
{
var
stripeProcessorId
=
$
(
'
#stripe-id
'
).
val
();
var
chosenProcessorId
=
$form
.
find
(
'
input[name="submitted[civicrm_1_contribution_1_contribution_payment_processor_id]"]:checked
'
).
val
();
debugger
;
var
stripeProcessorId
;
var
chosenProcessorId
;
stripeProcessorId
=
$
(
'
#stripe-id
'
).
val
();
// this element may or may not exist on the webform, but we are dealing with a single (stripe) processor enabled.
if
(
!
$
(
'
input[name="submitted[civicrm_1_contribution_1_contribution_payment_processor_id]"]
'
).
length
)
{
chosenProcessorId
=
stripeProcessorId
;
}
else
{
chosenProcessorId
=
$form
.
find
(
'
input[name="submitted[civicrm_1_contribution_1_contribution_payment_processor_id]"]:checked
'
).
val
();
}
}
else
{
if
(
$form
.
find
(
"
.crm-section.payment_processor-section
"
).
length
>
0
)
{
var
stripeProcessorId
=
$
(
'
#stripe-id
'
).
val
();
var
chosenProcessorId
=
$form
.
find
(
'
input[name="payment_processor_id"]:checked
'
).
val
();
stripeProcessorId
=
$
(
'
#stripe-id
'
).
val
();
chosenProcessorId
=
$form
.
find
(
'
input[name="payment_processor_id"]:checked
'
).
val
();
}
}
// Bail if we're not using Stripe or are using pay later (option value '0' in payment_processor radio group).
...
...
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