diff --git a/app/ServicePay/TransCard/KshCard.php b/app/ServicePay/TransCard/KshCard.php index a6be98e..fd1e4c7 100644 --- a/app/ServicePay/TransCard/KshCard.php +++ b/app/ServicePay/TransCard/KshCard.php @@ -12,11 +12,11 @@ class KshCard extends BaseCard //Edin 0745552949 on 14/3/22 at 5:48 PM New M-PESA balance is //Ksh675.00 Download M-PESA app on http://bit.ly/mpesappsm $this->msg = $msg; - $pattern= '/^[A-Z0-9]{9,12}(?=\s)|(?<=Ksh)[\d]+\.[\d]{2}|(?<=from\s)[a-zA-z]*\s[a-zA-z]*|(?<=\s)\d+(?=\s)|\d{1,2}\/\d{1,2}\/\d{1,4}\sat\s\d{1,2}:\d{2}\s[AMP]{2}/'; + $pattern= '/^[A-Z0-9]{9,12}(?=\s)|(?<=Ksh)[\d,]+\.[\d]{2}|(?<=from\s)[a-zA-z]*\s{0,2}[a-zA-z]*|(?<=\s)\d+(?=\s)|\d{1,2}\/\d{1,2}\/\d{1,4}\sat\s\d{1,2}:\d{2}\s[AMP]{2}/'; $match_num = preg_match_all($pattern, $this->msg, $matches, PREG_PATTERN_ORDER); if ($match_num != false && $match_num > 0 && $matches[0]) { $this->orderInfo = [ - 'pay_money' => $matches[0][1], + 'pay_money' => str_replace(',', '', $matches[0][1]), 'from_card' => $matches[0][3], 'from_name' => $matches[0][2], 'order_number' => $matches[0][0],