$contribution->trxn_id = $result['trxn_id'];
}
if (!empty($result['payment_status_id'])) {
- $contribution->contribution_status_id = $result['payment_status_id'];
+ $contribution->payment_status_id = $result['payment_status_id'];
}
}
$membershipResult[1] = $contribution;
*/
public static function createOrRenewMembership($membershipParams, $contactID, $customFieldsFormatted, $membershipID, $memType, $isTest, $numTerms, $membershipContribution, &$form) {
if (!empty($membershipContribution)) {
+ // CRM-16737 contribution_status_id is the deprecated return parameter from the payment processor. Use
+ // payment_status_id.
$pending = ($membershipContribution->contribution_status_id == 2) ? TRUE : FALSE;
+ if (isset($membershipContribution->payment_status_id)) {
+ $pending = ($membershipContribution->payment_status_id == 2) ? TRUE : $pending;
+ }
}
$membership = self::renewMembershipFormWrapper($contactID, $memType,
$isTest, $form, NULL,
/*
* This example has been generated from the API test suite.
-* The test that created it is called "testSubmitMembershipPriceSetPaymentPaymentProcessorRecurDelayed"
+* The test that created it is called "testLegacySubmitMembershipPriceSetPaymentPaymentProcessorRecurDelayed"
* and can be found at:
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionPageTest.php
*
* - the first creates a new membership, completed contribution, in progress recurring. Check these
* - create another - end date should be extended
*/
- public function testSubmitMembershipPriceSetPaymentPaymentProcessorRecur() {
+ public function testSubmitMembershipPriceSetPaymentPaymentProcessorRecurInstantPayment() {
$this->params['is_recur'] = 1;
$var = array();
$this->params['recur_frequency_unit'] = 'month';