src/BBGS/Credits.php
public function refundCredits ($credits, $description, $action = null)
	{
		$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['amount'] = intval ($credits);
		$data['description'] = $description;

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

		if (isset ($action))
		{
			$data['tag'] = $action;
		}

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

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

		$content = $this->file_get_contents ($url);
		return $content == "1";
	}
public function refundCredits ($credits, $description, $action = null)
	{
		$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['amount'] = intval ($credits);
		$data['description'] = $description;

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

		if (isset ($action))
		{
			$data['tag'] = $action;
		}

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

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

		$content = $this->file_get_contents ($url);
		return $content == "1";
	}
/*
Refund credits to the player.
(Warning, you are giving free credits to this by calling this method player)