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
658743a0
Commit
658743a0
authored
4 years ago
by
mattwire
Browse files
Options
Downloads
Patches
Plain Diff
Add event crmStripeBillingFormReloadComplete
parent
c297b0dc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!124
6.5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/events.md
+3
-0
3 additions, 0 deletions
docs/events.md
js/civicrm_stripe.js
+2
-1
2 additions, 1 deletion
js/civicrm_stripe.js
with
5 additions
and
1 deletion
docs/events.md
+
3
−
0
View file @
658743a0
...
@@ -22,6 +22,9 @@ Example code:
...
@@ -22,6 +22,9 @@ Example code:
This event is triggered when the form has completed reloading and is ready for use (Stripe element visible etc.).
This event is triggered when the form has completed reloading and is ready for use (Stripe element visible etc.).
It is useful for clearing any "loading" indicators and unfreezing form elements.
It is useful for clearing any "loading" indicators and unfreezing form elements.
### crmStripeBillingFormReloadComplete
This event is triggered when the form has completed reloading, is ready for use and the selected payment processor is Stripe.
### crmBillingFormReloadFailed
### crmBillingFormReloadFailed
This event is triggered when the form fails to complete reloading and is NOT ready for use. It usually happens if there
This event is triggered when the form fails to complete reloading and is NOT ready for use. It usually happens if there
is a problem (such as a network issue) when loading the Stripe elements.
is a problem (such as a network issue) when loading the Stripe elements.
...
...
This diff is collapsed.
Click to expand it.
js/civicrm_stripe.js
+
2
−
1
View file @
658743a0
...
@@ -289,6 +289,7 @@
...
@@ -289,6 +289,7 @@
debugging
(
"
Script loaded and executed.
"
);
debugging
(
"
Script loaded and executed.
"
);
loadStripeBillingBlock
();
loadStripeBillingBlock
();
triggerEvent
(
'
crmBillingFormReloadComplete
'
);
triggerEvent
(
'
crmBillingFormReloadComplete
'
);
triggerEvent
(
'
crmStripeBillingFormReloadComplete
'
);
})
})
.
fail
(
function
()
{
.
fail
(
function
()
{
stripeLoading
=
false
;
stripeLoading
=
false
;
...
@@ -299,7 +300,7 @@
...
@@ -299,7 +300,7 @@
else
{
else
{
loadStripeBillingBlock
();
loadStripeBillingBlock
();
if
(
checkPaymentElementsAreValid
())
{
if
(
checkPaymentElementsAreValid
())
{
triggerEvent
(
'
crmBillingFormReloadComplete
'
);
triggerEvent
(
'
crm
Stripe
BillingFormReloadComplete
'
);
}
}
else
{
else
{
debugging
(
'
Failed to load payment elements
'
);
debugging
(
'
Failed to load payment elements
'
);
...
...
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