src/BBGS/Credits.php
public function getCredits ()
	{
		$this->isValidData ();

		$data = array ();

		if (isset ($this->email))
		{
			$data['email'] = $this->email;
		}

		if (count($this->openid_hashed) > 0)
		{
			$data['openidhash'] = $this->openid_hashed[0];
			$data['openid'] = $this->openids[0];
		}

		$data = array_merge
		(
			$this->data,
			$data
		);

		$url = $this->getSignedURL (self::PAYMENT_GATEWAY_URL.'getcredits/', $data);

		$data = $this->file_get_contents ($url);
		if ($data !== false)
		{
			return $data;
		}
		else
		{
			return -1;
		}

		return false;
	}
public function getCredits ()
	{
		$this->isValidData ();

		$data = array ();

		if (isset ($this->email))
		{
			$data['email'] = $this->email;
		}

		if (count($this->openid_hashed) > 0)
		{
			$data['openidhash'] = $this->openid_hashed[0];
			$data['openid'] = $this->openids[0];
		}

		$data = array_merge
		(
			$this->data,
			$data
		);

		$url = $this->getSignedURL (self::PAYMENT_GATEWAY_URL.'getcredits/', $data);

		$data = $this->file_get_contents ($url);
		if ($data !== false)
		{
			return $data;
		}
		else
		{
			return -1;
		}

		return false;
	}
/*
Return the amount of credits this user has.