$args['paymentAction'] = $params['payment_action'];
$args['amt'] = $params['amount'];
$args['currencyCode'] = $params['currencyID'];
- $args['desc'] = $params['description'];
+ $args['desc'] = CRM_Utils_Array::value('description', $params);
$args['invnum'] = $params['invoiceID'];
$args['returnURL'] = $params['returnURL'];
$args['cancelURL'] = $params['cancelURL'];
$params['payer_id'] = $result['payerid'];
$params['payer_status'] = $result['payerstatus'];
$params['first_name'] = $result['firstname'];
- $params['middle_name'] = $result['middlename'];
+ $params['middle_name'] = CRM_Utils_Array::value('middlename', $result);
$params['last_name'] = $result['lastname'];
$params['street_address'] = $result['shiptostreet'];
- $params['supplemental_address_1'] = $result['shiptostreet2'];
+ $params['supplemental_address_1'] = CRM_Utils_Array::value('shiptostreet2', $result);
$params['city'] = $result['shiptocity'];
$params['state_province'] = $result['shiptostate'];
$params['postal_code'] = $result['shiptozip'];
$args['currencyCode'] = $params['currencyID'];
$args['payerID'] = $params['payer_id'];
$args['invnum'] = $params['invoiceID'];
- $args['returnURL'] = $params['returnURL'];
- $args['cancelURL'] = $params['cancelURL'];
+ $args['returnURL'] = CRM_Utils_Array::value('returnURL', $params);
+ $args['cancelURL'] = CRM_Utils_Array::value('cancelURL', $params);
$args['desc'] = $params['description'];
$result = $this->invokeAPI($args);
$params['trxn_id'] = $result['transactionid'];
$params['gross_amount'] = $result['amt'];
$params['fee_amount'] = $result['feeamt'];
- $params['net_amount'] = $result['settleamt'];
+ $params['net_amount'] = CRM_Utils_Array::value('settleamt', $result);
if ($params['net_amount'] == 0 && $params['fee_amount'] != 0) {
$params['net_amount'] = $params['gross_amount'] - $params['fee_amount'];
}
else
CRM_Core_Error::fatal($paymentObjError);
- $params['payer'] = $expressParams['payer'];
+ $params['payer'] = CRM_Utils_Array::value('payer', $expressParams);
$params['payer_id'] = $expressParams['payer_id'];
$params['payer_status'] = $expressParams['payer_status'];
$params['discountAmount'] = $this->_params[0]['discountAmount'];
$params['discountMessage'] = $this->_params[0]['discountMessage'];
}
+ if (!empty($this->_params[0]['amount_priceset_level_radio'])) {
+ $params['amount_priceset_level_radio'] = $this->_params[0]['amount_priceset_level_radio'];
+ }
$params['amount_level'] = $this->_params[0]['amount_level'];
$params['currencyID'] = $this->_params[0]['currencyID'];
$params['payment_action'] = 'Sale';