Skip to content

Commit 9241dc4

Browse files
authored
Merge pull request #105 from phpguru/issue/104-getcustomerreefrence-on-charge-object
Return customer reference for charge objects - Issue 104
2 parents cf23681 + 427c3a1 commit 9241dc4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Message/Response.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ public function getCustomerReference()
114114
return $this->data['customer'];
115115
}
116116
}
117+
if (isset($this->data['object']) && 'charge' === $this->data['object']) {
118+
if (!empty($this->data['customer'])) {
119+
return $this->data['customer'];
120+
}
121+
}
117122

118123
return null;
119124
}

0 commit comments

Comments
 (0)