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

Commit

Permalink
bug fix, add trim to customer detail
Browse files Browse the repository at this point in the history
  • Loading branch information
fherryfherry committed Sep 26, 2016
1 parent 2a2193f commit a3ce14c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Controllers/DokuController.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ function __construct() {

if($query) {
$this->invoice = [
'trans_id' =>$query->{$this->table_field_no_order},
'payment_channel' =>$query->{$this->table_field_payment_channel},
'amount' =>preg_replace('/\D/', '', $query->{$this->table_field_amount}).'.00',
'customer_name' =>preg_replace('/[^a-zA-Z ]+/', '', $query->{$this->table_field_customer_name}),
'customer_phone' =>str_limit(preg_replace('/\D/', '', $query->{$this->table_field_customer_phone}), 12, ''),
'customer_email' =>$query->{$this->table_field_customer_email},
'customer_address' =>$query->{$this->table_field_customer_address},
'payment_status' =>$query->{$this->table_field_payment_status}
'trans_id' =>trim($query->{$this->table_field_no_order}),
'payment_channel' =>trim($query->{$this->table_field_payment_channel}),
'amount' =>trim(preg_replace('/\D/', '', $query->{$this->table_field_amount}).'.00'),
'customer_name' =>trim(preg_replace('/[^a-zA-Z ]+/', '', $query->{$this->table_field_customer_name})),
'customer_phone' =>trim(str_limit(preg_replace('/\D/', '', $query->{$this->table_field_customer_phone}), 12, '')),
'customer_email' =>trim($query->{$this->table_field_customer_email}),
'customer_address' =>trim($query->{$this->table_field_customer_address}),
'payment_status' =>trim($query->{$this->table_field_payment_status})
];

}else{
Expand Down

0 comments on commit a3ce14c

Please sign in to comment.