'is_transactional' => FALSE,
'fee_amount' => $result['result']['fee_amount'] ?? NULL,
'receive_date' => $result['result']['receive_date'] ?? NULL,
- 'card_type_id' => $result['result']['card_type_id'] ?? NULL,
- 'pan_truncation' => $result['result']['pan_truncation'] ?? NULL,
+ 'card_type_id' => $paymentParams['card_type_id'] ?? NULL,
+ 'pan_truncation' => $paymentParams['pan_truncation'] ?? NULL,
]);
}
catch (CRM_Core_Exception $e) {
'is_transactional' => FALSE,
'fee_amount' => $result['fee_amount'] ?? NULL,
'receive_date' => $result['receive_date'] ?? NULL,
- 'card_type_id' => $result['card_type_id'] ?? NULL,
- 'pan_truncation' => $result['pan_truncation'] ?? NULL,
+ 'card_type_id' => $paymentParams['card_type_id'] ?? NULL,
+ 'pan_truncation' => $paymentParams['pan_truncation'] ?? NULL,
]);
}
catch (CRM_Core_Exception $e) {
$form->preProcess();
$form->buildQuickForm();
$form->postProcess();
+ $financialTrxnId = $this->callAPISuccess('EntityFinancialTrxn', 'get', ['entity_id' => $form->_contributionID, 'entity_table' => 'civicrm_contribution', 'sequential' => 1])['values'][0]['financial_trxn_id'];
+ $financialTrxn = $this->callAPISuccess('FinancialTrxn', 'get', [
+ 'id' => $financialTrxnId,
+ ])['values'][$financialTrxnId];
+ $this->assertEquals('1111', $financialTrxn['pan_truncation']);
+ $this->assertEquals(1, $financialTrxn['card_type_id']);
$assignedVariables = $form->get_template_vars();
$this->assertTrue($assignedVariables['is_separate_payment']);
}