We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c95f6e8 commit 9d3d310Copy full SHA for 9d3d310
src/Message/AbstractResponse.php
@@ -21,15 +21,16 @@ public function isSuccessful()
21
// get response code
22
$code = $this->getHttpResponseCode();
23
24
- if ($code === 200) { // OK
25
- return true;
26
- }
27
-
28
- if ($code === 202) { // Accepted
29
30
+ return ($code === 200 || $code === 201);
+ }
31
32
- return false;
+ /**
+ * Is the transaction still processing? We will need to fetch it again
+ * @return bool
+ */
+ public function isPending()
+ {
33
+ return $this->getHttpResponseCode() === 202;
34
}
35
36
/**
0 commit comments