X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FPayment%2FBaseIPN.php;h=ca212e394b3276547b9b7d7e1870a564992944e3;hb=6c786a9b1984c32f9f4278240150c5c1a8ed3b01;hp=bff9c57858fb61320ebabcd1c3fe5b1664995a34;hpb=1a676f190f24b5633b76b90a7dda95f2cc5b4dce;p=civicrm-core.git diff --git a/CRM/Core/Payment/BaseIPN.php b/CRM/Core/Payment/BaseIPN.php index bff9c57858..ca212e394b 100644 --- a/CRM/Core/Payment/BaseIPN.php +++ b/CRM/Core/Payment/BaseIPN.php @@ -1,9 +1,9 @@ rollback(); // we dont handle this as yet @@ -308,6 +326,13 @@ class CRM_Core_Payment_BaseIPN { return FALSE; } + /** + * @param $input + * @param $ids + * @param $objects + * @param $transaction + * @param bool $recur + */ function completeTransaction(&$input, &$ids, &$objects, &$transaction, $recur = FALSE) { $contribution = &$objects['contribution']; $memberships = &$objects['membership']; @@ -398,7 +423,9 @@ LIMIT 1;"; $dates['end_date'], $dates['join_date'], 'today', - TRUE + TRUE, + $membership->membership_type_id, + (array) $membership ); $formatedParams = array('status_id' => CRM_Utils_Array::value('id', $calcStatus, 2), @@ -614,6 +641,11 @@ LIMIT 1;"; CRM_Core_Error::debug_log_message("Success: Database updated"); } + /** + * @param $ids + * + * @return bool + */ function getBillingID(&$ids) { // get the billing location type $locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id', array(), 'validate'); @@ -639,6 +671,16 @@ LIMIT 1;"; * @params bool $returnMessageText Should text be returned instead of sent. This * is because the function is also used to generate pdfs */ + /** + * @param $input + * @param $ids + * @param $objects + * @param $values + * @param bool $recur + * @param bool $returnMessageText + * + * @return mixed + */ function sendMail(&$input, &$ids, &$objects, &$values, $recur = FALSE, $returnMessageText = FALSE) { $contribution = &$objects['contribution']; $input['is_recur'] = $recur; @@ -778,6 +820,9 @@ LIMIT 1;"; * The pledge payment record should already exist & will need to be updated with the new contribution ID. * If not the contribution will also need to be linked to the pledge */ + /** + * @param $contribution + */ function updateRecurLinkedPledge(&$contribution) { $returnProperties = array('id', 'pledge_id'); $paymentDetails = $paymentIDs = array(); @@ -838,6 +883,11 @@ LIMIT 1;"; ); } + /** + * @param $recurId + * @param $contributionId + * @param $input + */ function addrecurLineItems($recurId, $contributionId, &$input) { $lineSets = $lineItems = array(); @@ -864,6 +914,10 @@ LIMIT 1;"; // function to copy custom data of the // initial contribution into its recurring contributions + /** + * @param $recurId + * @param $targetContributionId + */ function copyCustomValues($recurId, $targetContributionId) { if ($recurId && $targetContributionId) { // get the initial contribution id of recur id @@ -905,6 +959,10 @@ LIMIT 1;"; // function to copy soft credit record of first recurring contribution // and add new soft credit against $targetContributionId + /** + * @param $recurId + * @param $targetContributionId + */ function addrecurSoftCredit($recurId, $targetContributionId) { $contriID = CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_Contribution', $recurId, 'id', 'contribution_recur_id');