Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mjwshared
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
mjwshared
Commits
4406a23e
Commit
4406a23e
authored
1 year ago
by
mattwire
Browse files
Options
Downloads
Patches
Plain Diff
Minor fixes
parent
89ff6a0f
No related branches found
No related tags found
1 merge request
!40
Support for Stripe 6.9 release
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CRM/Core/Payment/MJWTrait.php
+6
-5
6 additions, 5 deletions
CRM/Core/Payment/MJWTrait.php
docs/hooks.md
+1
-1
1 addition, 1 deletion
docs/hooks.md
with
7 additions
and
6 deletions
CRM/Core/Payment/MJWTrait.php
+
6
−
5
View file @
4406a23e
...
...
@@ -329,7 +329,7 @@ trait CRM_Core_Payment_MJWTrait {
$this
->
_params
[
'country'
]
=
$this
->
_params
[
"country-
{
$billingLocationId
}
"
]
=
$this
->
_params
[
"billing_country-
{
$billingLocationId
}
"
]
=
CRM_Core_PseudoConstant
::
countryIsoCode
(
$this
->
_params
[
"billing_country_id-
{
$billingLocationId
}
"
]);
}
list
(
$hasAddressField
,
$addressParams
)
=
CRM_Contribute_BAO_Contribution
::
getPaymentProcessorReadyAddressParams
(
$this
->
_params
,
$billingLocationId
);
[
$hasAddressField
,
$addressParams
]
=
CRM_Contribute_BAO_Contribution
::
getPaymentProcessorReadyAddressParams
(
$this
->
_params
,
$billingLocationId
);
if
(
$hasAddressField
)
{
$this
->
_params
=
array_merge
(
$this
->
_params
,
$addressParams
);
}
...
...
@@ -355,12 +355,13 @@ trait CRM_Core_Payment_MJWTrait {
* @throws \Civi\Payment\Exception\PaymentProcessorException
* (or statusbounce if URL is specified)
*/
private
function
handleError
(
$errorCode
=
NULL
,
$errorMessage
=
NULL
,
$bounceURL
=
NULL
)
{
$errorCode
=
empty
(
$errorCode
)
?
''
:
$errorCode
.
': '
;
private
function
handleError
(
$errorCode
=
''
,
$errorMessage
=
''
,
$bounceURL
=
NULL
,
$log
=
TRUE
)
{
$errorMessage
=
empty
(
$errorMessage
)
?
'Unknown System Error.'
:
$errorMessage
;
$message
=
$error
Code
.
$errorMessage
;
$message
=
$error
Message
.
(
!
empty
(
$errorCode
)
?
" -
{
$errorCode
}
"
:
''
)
;
Civi
::
log
()
->
error
(
$this
->
getPaymentTypeLabel
()
.
' Payment Error: '
.
$message
);
if
(
$log
)
{
Civi
::
log
()
->
error
(
$this
->
getPaymentTypeLabel
()
.
' Payment Error: '
.
$message
);
}
if
(
$this
->
handleErrorThrowsException
)
{
// We're in a test environment. Throw exception.
throw
new
\Exception
(
'Exception thrown to avoid statusBounce because handleErrorThrowsException is set.'
.
$message
);
...
...
This diff is collapsed.
Click to expand it.
docs/hooks.md
+
1
−
1
View file @
4406a23e
...
...
@@ -27,7 +27,7 @@ function myextension_civicrm_webhookEventNotMatched(string $type, $object, strin
if
(
$type
!==
'stripe'
)
{
return
;
}
if
(
!
(
$object
instanceof
CRM_Core_Payment_StripeIPN
))
{
if
(
!
(
$object
instanceof
CRM_Core_Payment_StripeIPN
)
&&
!
(
$object
instanceof
\Civi\Stripe\Webhook\Events
)
)
{
return
;
}
switch
(
$code
)
{
...
...
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