Skip to content

Commit 0be8082

Browse files
Implementd isCancelled method in AbstractResponse class
1 parent 3d14b72 commit 0be8082

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ Tất cả lịch sử tiến trình phát triển thư viện
66

77
- Thực thi trả về `self` đối với các phương thức thiết lập parameters ở gateways và requests.
88
- Khởi tạo các giá trị mặc định tại phương thức `initialize` của requests thay vì `getData`.
9+
10+
## 1.0.2
11+
12+
- Implement phương thức `isCancelled` ở lớp `\Omnipay\MoMo\Message\AbstractResponse`.

src/Message/AbstractResponse.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,23 @@ abstract class AbstractResponse extends BaseAbstractResponse
2020
use Concerns\ResponseProperties;
2121

2222
/**
23-
* Trả về trạng thái do MoMo phản hồi.
24-
*
25-
* @return bool
23+
* {@inheritdoc}
2624
*/
2725
public function isSuccessful(): bool
2826
{
2927
return '0' === $this->getCode();
3028
}
3129

3230
/**
33-
* Trả về thông báo từ MoMo.
34-
*
35-
* @return null|string
31+
* {@inheritdoc}
32+
*/
33+
public function isCancelled(): bool
34+
{
35+
return '49' === $this->getCode();
36+
}
37+
38+
/**
39+
* {@inheritdoc}
3640
*/
3741
public function getMessage(): ?string
3842
{

0 commit comments

Comments
 (0)