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
9867bbc6
Commit
9867bbc6
authored
4 years ago
by
mattwire
Committed by
mattwire
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use helper functions to set payment status
parent
a4d30207
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!152
6.6 to master
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Core/Payment/Stripe.php
+4
-4
4 additions, 4 deletions
CRM/Core/Payment/Stripe.php
with
4 additions
and
4 deletions
CRM/Core/Payment/Stripe.php
+
4
−
4
View file @
9867bbc6
...
...
@@ -464,9 +464,9 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
* Process payment
* Submit a payment using Stripe's PHP API:
* https://stripe.com/docs/api?lang=php
* Payment processors should set payment_status_id.
* Payment processors should set payment_status_id
/payment_status
.
*
* @param array|PropertyBag $p
arams
* @param array|PropertyBag $p
ropertyBag
* Assoc array of input parameters for this transaction.
* @param string $component
*
...
...
@@ -658,7 +658,7 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
// @fixme FROM HERE we are using $params array (but some things are READING from $propertyBag)
// We set payment status as pending because the IPN will set it as completed / failed
$params
[
'payment_status_id'
]
=
CRM_Core_PseudoConstant
::
getKey
(
'CRM_Contribute_BAO_Contribution'
,
'contribution_status_id'
,
'Pending'
);
$params
=
$this
->
setStatusPaymentPending
(
$params
);
$required
=
NULL
;
if
(
empty
(
$this
->
getRecurringContributionId
(
$propertyBag
)))
{
...
...
@@ -822,7 +822,7 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
}
// Success!
// Set the desired contribution status which will be set later (do not set on the contribution here!)
$params
[
'payment_status_id'
]
=
CRM_Core_PseudoConstant
::
getKey
(
'CRM_Contribute_BAO_Contribution'
,
'contribution_status_id'
,
'
Completed
'
);
$params
=
$this
->
setStatusPayment
Completed
(
$params
);
// Transaction ID is always stripe Charge ID.
$this
->
setPaymentProcessorTrxnID
(
$stripeCharge
->
id
);
...
...
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