/home/techb158/ileadtechnology.com/vendor/obydul/laraskrill/src
Edit: /home/techb158/ileadtechnology.com/vendor/obydul/laraskrill/src/SkrillClient.php (2228B)
request = $request;
else echo "
Exception, you need to set SkrillRequest!
";
}
/**
* Generate SID
*/
public function generateSID()
{
// send request to skrill
return Http::withoutVerifying()
->withOptions(["verify" => false])
->post(self::PAY_URL, $this->request->toArray())
->body();
}
/**
* Generate payment URL
*/
public function paymentRedirectUrl($sid = null)
{
$this->sid = $sid;
if (!$this->sid) {
$this->sid = $this->generateSID();
}
return self::PAY_URL . "?sid={$this->sid}";
}
/**
* Prepare for full and partial refund
* @return bool|string
*/
public function prepareRefund()
{
// add required refund fields
$this->request->action = 'prepare';
return Http::withoutVerifying()
->withOptions(["verify" => false])
->post(self::REFUND_URL, $this->request->toArray())
->body();
}
/**
* Do full and partial refund
* @return bool|string
*/
public function doRefund()
{
// add action
$this->request->action = 'refund';
return Http::withoutVerifying()
->withOptions(["verify" => false])
->post(self::REFUND_URL, $this->request->toArray())
->body();
}
/**
* @return SkrillRequest
*/
public function getRequest()
{
return $this->request;
}
/**
* @param SkrillRequest $request
*/
public function setRequest($request)
{
$this->request = $request;
}
}