Skip to content

Commit

Permalink
Readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardjke committed Feb 13, 2022
1 parent f7527d3 commit 1696762
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Omnipay: YooMoney
# Omnipay: Yoomoney

**YooMoney driver for Omnipay PHP payment library**

Expand Down Expand Up @@ -50,12 +50,15 @@ $gateway->setQuickpayForm('shop');
$gateway->setSuccessUrl('https://example.com');

$response = $gatewayManager->acceptNotification();

// Impotant! Verify hash of the request
if (!$response->isValid()) {
// return error
}

$data = $response->getData();

$data = $response->getData();
$status = $response->getTransactionStatus();
$id = $response->getTransactionReference();

```

Expand Down
15 changes: 9 additions & 6 deletions src/Message/NotificationRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ public function getData()
return $this->data = $this->httpRequest->query->all();
}

/**
* @inheritdoc
*/
public function getTransactionReference()
{
return $this->getOperationId();
}

/**
* @inheritdoc
*/
Expand Down Expand Up @@ -118,14 +126,9 @@ public function getTransactionId()
return $this->getDataItem('label');
}

public function getTransactionReference()
{
return $this->getDataItem('operation_id');
}

public function getOperationId()
{
return $this->getTransactionReference();
return $this->getDataItem('operation_id');
}

public function getAmount()
Expand Down

0 comments on commit 1696762

Please sign in to comment.