Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
justinfreeman (Agileware)
Core
Commits
d5346e1b
Commit
d5346e1b
authored
11 years ago
by
Eileen
Committed by
eileen
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
CRM-12108 minor improvement - simplify ipn.php by putting logic in the
relevant classes (no logic behind the split)
parent
763b8d6f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CRM/Core/Payment/PayPalIPN.php
+2
-1
2 additions, 1 deletion
CRM/Core/Payment/PayPalIPN.php
CRM/Core/Payment/PayPalProIPN.php
+2
-3
2 additions, 3 deletions
CRM/Core/Payment/PayPalProIPN.php
extern/ipn.php
+1
-22
1 addition, 22 deletions
extern/ipn.php
with
5 additions
and
26 deletions
CRM/Core/Payment/PayPalIPN.php
+
2
−
1
View file @
d5346e1b
...
...
@@ -262,12 +262,13 @@ class CRM_Core_Payment_PayPalIPN extends CRM_Core_Payment_BaseIPN {
$this
->
completeTransaction
(
$input
,
$ids
,
$objects
,
$transaction
,
$recur
);
}
function
main
(
$component
=
'contribute'
)
{
function
main
()
{
// CRM_Core_Error::debug_var( 'GET' , $_GET , true, true );
// CRM_Core_Error::debug_var( 'POST', $_POST, true, true );
$objects
=
$ids
=
$input
=
array
();
$component
=
CRM_Utils_Array
::
value
(
'module'
,
$_GET
);
$input
[
'component'
]
=
$component
;
// get the contribution and contact ids from the GET params
...
...
This diff is collapsed.
Click to expand it.
CRM/Core/Payment/PayPalProIPN.php
+
2
−
3
View file @
d5346e1b
...
...
@@ -279,13 +279,12 @@ class CRM_Core_Payment_PayPalProIPN extends CRM_Core_Payment_BaseIPN {
$this
->
completeTransaction
(
$input
,
$ids
,
$objects
,
$transaction
,
$recur
);
}
function
main
(
$component
=
'contribute'
)
{
function
main
()
{
CRM_Core_Error
::
debug_var
(
'GET'
,
$_GET
,
TRUE
,
TRUE
);
CRM_Core_Error
::
debug_var
(
'POST'
,
$_POST
,
TRUE
,
TRUE
);
$objects
=
$ids
=
$input
=
array
();
$input
[
'component'
]
=
$component
;
$input
[
'component'
]
=
self
::
getValue
(
'm'
)
;
// get the contribution and contact ids from the GET params
$ids
[
'contact'
]
=
self
::
getValue
(
'c'
,
TRUE
);
...
...
This diff is collapsed.
Click to expand it.
extern/ipn.php
+
1
−
22
View file @
d5346e1b
...
...
@@ -40,32 +40,11 @@ require_once '../civicrm.config.php';
$config
=
CRM_Core_Config
::
singleton
();
if
(
empty
(
$_GET
))
{
$rpInvoiceArray
=
array
();
$rpInvoiceArray
=
explode
(
'&'
,
$_POST
[
'rp_invoice_id'
]);
foreach
(
$rpInvoiceArray
as
$rpInvoiceValue
)
{
$rpValueArray
=
explode
(
'='
,
$rpInvoiceValue
);
if
(
$rpValueArray
[
0
]
==
'm'
)
{
$value
=
$rpValueArray
[
1
];
}
}
$paypalIPN
=
new
CRM_Core_Payment_PayPalProIPN
();
}
else
{
$value
=
CRM_Utils_Array
::
value
(
'module'
,
$_GET
);
$paypalIPN
=
new
CRM_Core_Payment_PayPalIPN
();
}
switch
(
$value
)
{
case
'contribute'
:
$paypalIPN
->
main
(
'contribute'
);
break
;
$paypalIPN
->
main
();
case
'event'
:
$paypalIPN
->
main
(
'event'
);
break
;
default
:
CRM_Core_Error
::
debug_log_message
(
"Could not get module name from request url"
);
echo
"Could not get module name from request url<p>"
;
break
;
}
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