<?php

class Brivium_Credits_Payment_PayPal_ViewPublic_Payment_GetAmount extends XenForo_ViewPublic_Base
{
	public function renderJson()
	{
		$output = array();
		if ($this->_params['amount'])
		{
			$amount = Brivium_Credits_Listener_Helpers::helperCurrencyFormat($this->_params['amount'],false,$this->_params['currency']['currency_id'],false);
			$output['amountMessage'] = new XenForo_Phrase('BRCP_paypal_you_will_receive_x', array('amount'=>$amount));
			$output['transactionTitle'] = new XenForo_Phrase('BRCP_paypal_buy_x_from_y', array('amount'=>$amount,'boardTitle'=>XenForo_Application::get("options")->boardTitle));
			$output['custom'] = $this->_params['custom'];
		}

		return XenForo_ViewRenderer_Json::jsonEncodeForOutput($output);
	}
}