Changeset 2141697
- Timestamp:
- 08/19/2019 07:15:44 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
foloosi-for-woocommerce/trunk/foloosi-payments.php
r2114644 r2141697 291 291 $this->redirectUser($order); 292 292 } 293 public function getCustomerInfo($order) 294 { 295 if (version_compare(WOOCOMMERCE_VERSION, '2.7.0', '>=')) { 296 $args = array( 297 'name' => $order->get_billing_first_name() . ' ' . $order->get_billing_last_name(), 298 'email' => $order->get_billing_email(), 299 'contact' => $order->get_billing_phone(), 300 ); 301 } else { 302 $args = array( 303 'name' => $order->billing_first_name . ' ' . $order->billing_last_name, 304 'email' => $order->billing_email, 305 'contact' => $order->billing_phone, 306 ); 307 } 308 309 return $args; 310 } 293 311 294 312 protected function handleErrorCase(&$order) … … 435 453 * Array with parameters for API interaction 436 454 */ 455 $customer_info = $this->getCustomerInfo($order); 456 437 457 $args = array( 438 458 'headers' => array( … … 443 463 'transaction_amount' => $order->get_total(), 444 464 'currency' => $this->getOrderCurrency($order), 445 'optional1' => $order_id 465 'optional1' => $order_id, 466 'customer_name'=>$customer_info['name'], 467 'customer_email'=>$customer_info['email'], 468 'customer_mobile'=>$customer_info['contact'], 469 'source'=>'woocommerce' 446 470 ) 447 471
Note: See TracChangeset
for help on using the changeset viewer.