Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
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
Development
CiviCRM Core
Commits
d4e1c318
Commit
d4e1c318
authored
11 years ago
by
lobo
Browse files
Options
Downloads
Plain Diff
Merge pull request
#426
from dlobo/CRM-12352
CRM-12352
parents
2055b6f4
1ac462d0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Core/Payment/PayPalImpl.php
+21
-6
21 additions, 6 deletions
CRM/Core/Payment/PayPalImpl.php
with
21 additions
and
6 deletions
CRM/Core/Payment/PayPalImpl.php
+
21
−
6
View file @
d4e1c318
...
...
@@ -241,7 +241,13 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
//$args['desc'] = 'Recurring Contribution';
$args
[
'totalbillingcycles'
]
=
$params
[
'installments'
];
$args
[
'version'
]
=
'56.0'
;
$args
[
'profilereference'
]
=
"i=
{
$params
[
'invoiceID'
]
}
"
.
"&m=
$component
"
.
"&c=
{
$params
[
'contactID'
]
}
"
.
"&r=
{
$params
[
'contributionRecurID'
]
}
"
.
"&b=
{
$params
[
'contributionID'
]
}
"
.
"&p=
{
$params
[
'contributionPageID'
]
}
"
;
$args
[
'profilereference'
]
=
"i=
{
$params
[
'invoiceID'
]
}
"
.
"&m=
$component
"
.
"&c=
{
$params
[
'contactID'
]
}
"
.
"&r=
{
$params
[
'contributionRecurID'
]
}
"
.
"&b=
{
$params
[
'contributionID'
]
}
"
.
"&p=
{
$params
[
'contributionPageID'
]
}
"
;
$result
=
$this
->
invokeAPI
(
$args
);
...
...
@@ -316,11 +322,18 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
$args
[
'billingfrequency'
]
=
$params
[
'frequency_interval'
];
$args
[
'method'
]
=
"CreateRecurringPaymentsProfile"
;
$args
[
'profilestartdate'
]
=
$start_date
;
$args
[
'desc'
]
=
$params
[
'description'
]
.
": "
.
$params
[
'amount'
]
.
" Per "
.
$params
[
'frequency_interval'
]
.
" "
.
$params
[
'frequency_unit'
];
$args
[
'desc'
]
=
$params
[
'description'
]
.
": "
.
$params
[
'amount'
]
.
" Per "
.
$params
[
'frequency_interval'
]
.
" "
.
$params
[
'frequency_unit'
];
$args
[
'amt'
]
=
$params
[
'amount'
];
$args
[
'totalbillingcycles'
]
=
$params
[
'installments'
];
$args
[
'version'
]
=
56.0
;
$args
[
'PROFILEREFERENCE'
]
=
"i="
.
$params
[
'invoiceID'
]
.
"&m="
.
$component
.
"&c="
.
$params
[
'contactID'
]
.
"&r="
.
$params
[
'contributionRecurID'
]
.
"&b="
.
$params
[
'contributionID'
]
.
"&p="
.
$params
[
'contributionPageID'
];
$args
[
'PROFILEREFERENCE'
]
=
"i="
.
$params
[
'invoiceID'
]
.
"&m="
.
$component
.
"&c="
.
$params
[
'contactID'
]
.
"&r="
.
$params
[
'contributionRecurID'
]
.
"&b="
.
$params
[
'contributionID'
]
.
"&p="
.
$params
[
'contributionPageID'
];
}
// Allow further manipulation of the arguments via custom hooks ..
...
...
@@ -355,7 +368,8 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
function
checkConfig
()
{
$error
=
array
();
$paymentProcessorType
=
CRM_Core_PseudoConstant
::
paymentProcessorType
(
false
,
null
,
'name'
);
if
(
$this
->
_paymentProcessor
[
'payment_processor_type_id'
]
==
CRM_Utils_Array
::
key
(
'PayPal_Standard'
,
$paymentProcessorType
)
||
if
(
$this
->
_paymentProcessor
[
'payment_processor_type_id'
]
==
CRM_Utils_Array
::
key
(
'PayPal_Standard'
,
$paymentProcessorType
)
||
$this
->
_paymentProcessor
[
'payment_processor_type_id'
]
==
CRM_Utils_Array
::
key
(
'PayPal'
,
$paymentProcessorType
)
)
{
if
(
empty
(
$this
->
_paymentProcessor
[
'user_name'
]))
{
...
...
@@ -512,10 +526,11 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
$cancelUrlString
=
"
$cancel
=1&cancel=1&qfKey=
{
$params
[
'qfKey'
]
}
"
;
if
(
CRM_Utils_Array
::
value
(
'is_recur'
,
$params
))
{
$cancelUrlString
.
=
"&isRecur=1&recurId=
{
$params
[
'contributionRecurID'
]
}
&contribId=
{
$params
[
contributionID
]
}
"
;
$cancelUrlString
.
=
"&isRecur=1&recurId=
{
$params
[
'contributionRecurID'
]
}
&contribId=
{
$params
[
'
contributionID
'
]
}
"
;
}
$cancelURL
=
CRM_Utils_System
::
url
(
$url
,
$cancelURL
=
CRM_Utils_System
::
url
(
$url
,
$cancelUrlString
,
TRUE
,
NULL
,
FALSE
);
...
...
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