Skip to content

Commit

Permalink
additional fix to load selected payment instrument field on edit
Browse files Browse the repository at this point in the history
  • Loading branch information
monishdeb committed Aug 31, 2017
1 parent 64fa550 commit bb42d5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CRM/Contribute/Form/AbstractEditPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ protected function assignPaymentRelatedVariables() {
}
$this->assignProcessors();
$this->assignBillingType();
CRM_Core_Payment_Form::setPaymentFieldsByProcessor($this, $this->_paymentProcessor, FALSE, TRUE, CRM_Utils_Request::retrieve('payment_instrument_id', 'Integer'));
CRM_Core_Payment_Form::setPaymentFieldsByProcessor($this, $this->_paymentProcessor, FALSE, TRUE, CRM_Utils_Request::retrieve('payment_instrument_id', 'Integer', $this));
}
catch (CRM_Core_Exception $e) {
CRM_Core_Error::statusBounce($e->getMessage());
Expand Down
3 changes: 2 additions & 1 deletion CRM/Contribute/Form/Contribution.php
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,8 @@ public function buildQuickForm() {
$paneNames[ts('Premium Information')] = 'Premium';
}

if (CRM_Core_Payment_Form::buildPaymentForm($this, $this->_paymentProcessor, FALSE, TRUE, $this->getDefaultPaymentInstrumentId()) == TRUE) {
$this->payment_instrument_id = CRM_Utils_Array::value('payment_instrument_id', $defaults, $this->getDefaultPaymentInstrumentId());
if (CRM_Core_Payment_Form::buildPaymentForm($this, $this->_paymentProcessor, FALSE, TRUE, $this->payment_instrument_id) == TRUE) {
if (!empty($this->_recurPaymentProcessors)) {
$buildRecurBlock = TRUE;
if ($this->_ppID) {
Expand Down

0 comments on commit bb42d5b

Please sign in to comment.