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.
2 parents 9241dc4 + 946b585 commit 769d8abCopy full SHA for 769d8ab
src/Message/Response.php
@@ -55,13 +55,29 @@ public function isSuccessful()
55
*/
56
public function getChargeReference()
57
{
58
- if (isset($this->data['object']) && $this->data['object'] == 'charge') {
+ if (isset($this->data['object']) && 'charge' === $this->data['object']) {
59
return $this->data['id'];
60
}
61
62
return null;
63
64
65
+ /**
66
+ * Get the outcome of a charge from the response
67
+ *
68
+ * @return array|null
69
+ */
70
+ public function getOutcome()
71
+ {
72
73
+ if (isset($this->data['outcome']) && !empty($this->data['outcome'])) {
74
+ return $this->data['outcome'];
75
+ }
76
77
+
78
+ return null;
79
80
81
/**
82
* Get the transaction reference.
83
*
0 commit comments