Skip to content

Commit

Permalink
+ ipn
Browse files Browse the repository at this point in the history
  • Loading branch information
bladeroot committed May 23, 2017
1 parent f050439 commit 272b16c
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/Message/PurchaseRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,18 @@ class PurchaseRequest extends AbstractRequest
{
public function getData()
{
// \yii\helpers\VarDumper::dump($this);die();
$this->validate('purse', 'currency', 'amount', 'description');
$data['ok_receiver'] = $this->getPurse();
$data['ok_item_1_name'] = $this->getDescription();
$data['ok_currency'] = $this->getCurrency();
$data['ok_item_1_price'] = $this->getAmount();
$data['ok_invoice'] = $this->getTransactionId();
return $data;
return [
'ok_receiver' => $this->getPurse(),
'ok_item_1_name' => $this->getDescription(),
'ok_currency' => $this->getCurrency(),
'ok_item_1_price' => $this->getAmount(),
'ok_invoice' => $this->getTransactionId(),
'ok_ipn' => $this->getNotifyUrl(),
'ok_return_success' => $this->getReturnUrl(),
'ok_return_fail' => $this->getCancelUrl(),
];
}

public function sendData($data)
Expand Down

0 comments on commit 272b16c

Please sign in to comment.