Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
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
Rich
Stripe
Commits
4ddd3db6
Commit
4ddd3db6
authored
6 years ago
by
Jamie McClelland
Committed by
mattwire
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
modernize test to match new stripe library
also, no need to check for proper StripeIPN class any more.
parent
a5f385de
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
tests/phpunit/CRM/Stripe/IpnTest.php
+11
-11
11 additions, 11 deletions
tests/phpunit/CRM/Stripe/IpnTest.php
with
11 additions
and
11 deletions
tests/phpunit/CRM/Stripe/IpnTest.php
+
11
−
11
View file @
4ddd3db6
...
...
@@ -90,11 +90,16 @@ class CRM_Stripe_IpnTest extends CRM_Stripe_BaseTest {
}
catch
(
Stripe\Error\InvalidRequest
$e
)
{
// The plan has not been created yet, so create it.
$product
=
\Stripe\Product
::
create
(
array
(
"name"
=>
"CiviCRM testing product"
,
"type"
=>
"service"
));
$plan_details
=
array
(
'id'
=>
$plan_id
,
'amount'
=>
'40000'
,
'interval'
=>
'month'
,
'
name'
=>
"Test Updated Plan"
,
'
product'
=>
$product
,
'currency'
=>
'usd'
,
'interval_count'
=>
2
);
...
...
@@ -249,16 +254,11 @@ class CRM_Stripe_IpnTest extends CRM_Stripe_BaseTest {
*
*/
public
function
ipn
(
$data
,
$verify
=
TRUE
)
{
if
(
!
class_exists
(
'CRM_Core_Payment_StripeIPN'
))
{
// The $_GET['processor_id'] value is normally set by
// CRM_Core_Payment::handlePaymentMethod
$_GET
[
'processor_id'
]
=
$this
->
_paymentProcessorID
;
$ipnClass
=
new
CRM_Core_Payment_StripeIPN
(
$data
,
$verify
);
$ipnClass
->
main
();
}
else
{
trigger_error
(
"Test suite depends on CRM_Core_Payment_StripeIPN"
);
}
// The $_GET['processor_id'] value is normally set by
// CRM_Core_Payment::handlePaymentMethod
$_GET
[
'processor_id'
]
=
$this
->
_paymentProcessorID
;
$ipnClass
=
new
CRM_Core_Payment_StripeIPN
(
$data
,
$verify
);
$ipnClass
->
main
();
}
/**
...
...
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