$form->assign('suppressSubmitButton', $form->_paymentObject->isSuppressSubmitButtons());
+ $form->assign('currency', $form->_values['currency']);
+
// also set cancel subscription url
if (!empty($form->_paymentProcessor['is_recur']) && !empty($form->_values['is_recur'])) {
$form->_values['cancelSubscriptionUrl'] = $form->_paymentObject->subscriptionURL(NULL, NULL, 'cancel');
* @var int
*/
protected $_paymentProcessorID;
+ protected $currency;
/**
* @var array
parent::preProcess();
$this->_paymentProcessorID = CRM_Utils_Request::retrieve('processor_id', 'Integer', CRM_Core_DAO::$_nullObject,
TRUE);
+ $this->currency = CRM_Utils_Request::retrieve('currency', 'String', CRM_Core_DAO::$_nullObject,
+ TRUE);
$this->assignBillingType();
self::addCreditCardJs();
$this->assign('paymentProcessorID', $this->_paymentProcessorID);
+ $this->assign('currency', $this->currency);
$this->assign('suppressForm', TRUE);
$this->controller->_generateQFKey = FALSE;
}
+ /**
+ * @return string
+ */
+ public function getCurrency() {
+ return $this->currency;
+ }
+
/**
* Build quickForm.
*/
{capture assign='profilePathVar'}{/capture}
{/if}
- var dataUrl = "{crmURL p='civicrm/payment/form' h=0 q="`$urlPathVar``$profilePathVar``$contributionPageID`processor_id="}" + type;
+ var dataUrl = "{crmURL p='civicrm/payment/form' h=0 q="currency=`$currency`&`$urlPathVar``$profilePathVar``$contributionPageID`processor_id="}" + type;
{literal}
if (typeof(CRM.vars) != "undefined") {
if (typeof(CRM.vars.coreForm) != "undefined") {