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
83816175
Commit
83816175
authored
10 years ago
by
drastik
Browse files
Options
Downloads
Patches
Plain Diff
Change all calls for CRM_Core_Payment_Stripe::stripeCatchErrors to $this->
parent
6f602298
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
CRM/Core/Payment/Stripe.php
+7
-7
7 additions, 7 deletions
CRM/Core/Payment/Stripe.php
with
7 additions
and
7 deletions
CRM/Core/Payment/Stripe.php
+
7
−
7
View file @
83816175
...
...
@@ -295,7 +295,7 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
'email'
=>
$email
,
);
$stripe_customer
=
CRM_Core_Payment_Stripe
::
stripeCatchErrors
(
'create_customer'
,
$sc_create_params
,
$params
);
$stripe_customer
=
$this
->
stripeCatchErrors
(
'create_customer'
,
$sc_create_params
,
$params
);
// Store the relationship between CiviCRM's email address for the Contact & Stripe's Customer ID.
if
(
isset
(
$stripe_customer
))
{
...
...
@@ -314,7 +314,7 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
}
else
{
// Customer was found in civicrm_stripe database, fetch from Stripe.
$stripe_customer
=
CRM_Core_Payment_Stripe
::
stripeCatchErrors
(
'retrieve_customer'
,
$customer_query
,
$params
);
$stripe_customer
=
$this
->
stripeCatchErrors
(
'retrieve_customer'
,
$customer_query
,
$params
);
if
(
!
empty
(
$stripe_customer
))
{
// Avoid the 'use same token twice' issue while still using latest card.
if
(
!
empty
(
$params
[
'selectMembership'
])
...
...
@@ -326,7 +326,7 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
}
else
{
$stripe_customer
->
card
=
$card_details
;
CRM_Core_Payment_Stripe
::
stripeCatchErrors
(
'save'
,
$stripe_customer
,
$params
);
$this
->
stripeCatchErrors
(
'save'
,
$stripe_customer
,
$params
);
}
}
else
{
...
...
@@ -338,7 +338,7 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
'email'
=>
$email
,
);
$stripe_customer
=
CRM_Core_Payment_Stripe
::
stripeCatchErrors
(
'create_customer'
,
$sc_create_params
,
$params
);
$stripe_customer
=
$this
->
stripeCatchErrors
(
'create_customer'
,
$sc_create_params
,
$params
);
// Somehow a customer ID saved in the system no longer pairs
// with a Customer within Stripe. (Perhaps deleted using Stripe interface?).
...
...
@@ -396,13 +396,13 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
}
// Fire away! Check for errors before trying to submit.
$stripe_response
=
CRM_Core_Payment_Stripe
::
stripeCatchErrors
(
'charge'
,
$stripe_charge
,
$params
);
$stripe_response
=
$this
->
stripeCatchErrors
(
'charge'
,
$stripe_charge
,
$params
);
if
(
!
empty
(
$stripe_response
))
{
// Success! Return some values for CiviCRM.
$params
[
'trxn_id'
]
=
$stripe_response
->
id
;
// Return fees & net amount for Civi reporting.
// Uses new Balance Trasaction object.
$balance_transaction
=
CRM_Core_Payment_Stripe
::
stripeCatchErrors
(
'retrieve_balance_transaction'
,
$stripe_response
->
balance_transaction
,
$params
);
$balance_transaction
=
$this
->
stripeCatchErrors
(
'retrieve_balance_transaction'
,
$stripe_response
->
balance_transaction
,
$params
);
if
(
!
empty
(
$balance_transaction
))
{
$params
[
'fee_amount'
]
=
$balance_transaction
->
fee
/
100
;
$params
[
'net_amount'
]
=
$balance_transaction
->
net
/
100
;
...
...
@@ -473,7 +473,7 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
'message'
=>
'Plan already exists.'
,
),
);
CRM_Core_Payment_Stripe
::
stripeCatchErrors
(
'create_plan'
,
$stripe_plan
,
$params
,
$ignores
);
$this
->
stripeCatchErrors
(
'create_plan'
,
$stripe_plan
,
$params
,
$ignores
);
// Prepare escaped query params.
$query_params
=
array
(
1
=>
array
(
$plan_id
,
'String'
),
...
...
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