Skip to content
This repository has been archived by the owner on Oct 30, 2020. It is now read-only.

Commit

Permalink
Adds string check to account for SimpleXMLElements being passed through
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Paul committed Oct 26, 2016
1 parent 09849d2 commit 43f3c92
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Receipt.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ public function read($value = '')
private function setData(array $data)
{
return [
'customer_id' => isset($data['cust_id']) ? (is_string($data['cust_id']) ? $data['cust_id'] : $data['cust_id']->__toString()) : '',
'phone' => isset($data['phone']) ? $data['phone']->__toString() : '',
'email' => isset($data['email']) ? $data['email']->__toString() : '',
'note' => isset($data['note']) ? $data['note']->__toString() : '',
'customer_id' => isset($data['cust_id']) ? (is_string($data['cust_id']) ? $data['cust_id'] : $data['cust_id']->__toString()) : null,
'phone' => isset($data['phone']) ? (is_string($data['phone']) ? $data['phone'] : $data['phone']->__toString()) : null,
'email' => isset($data['email']) ? (is_string($data['email']) ? $data['email'] : $data['email']->__toString()) : null,
'note' => isset($data['note']) ? (is_string($data['note']) ? $data['note'] : $data['note']->__toString()) : null,
'crypt' => isset($data['crypt_type']) ? intval($data['crypt_type']) : null,
'masked_pan' => isset($data['masked_pan']) ? $data['masked_pan'] : null,
'pan' => isset($data['pan']) ? $data['pan'] : null,
Expand Down

0 comments on commit 43f3c92

Please sign in to comment.