Change-Id: I59a5cd16499e89fbaa54594071fd396de81dfb82
return $baseURL;
}
+ /**
+ * Get the currency for the transaction.
+ *
+ * Handle any inconsistency about how it is passed in here.
+ *
+ * @param $params
+ *
+ * @return string
+ */
+ protected function getCurrency($params) {
+ return CRM_Utils_Array::value('currencyID', $params, CRM_Utils_Array::value('currency', $params));
+ }
+
/**
* Get url to return to after cancelled or failed transaction.
*
$args['paymentAction'] = 'Sale';
$args['amt'] = $params['amount'];
- $args['currencyCode'] = $params['currencyID'];
+ $args['currencyCode'] = $this->getCurrency($params);
$args['invnum'] = $params['invoiceID'];
$args['ipaddress'] = $params['ip_address'];
$args['creditCardType'] = $params['credit_card_type'];