Skip to content

Commit

Permalink
Sending phonenumber to PAY.
Browse files Browse the repository at this point in the history
  • Loading branch information
andy committed Feb 25, 2019
1 parent bfb89a7 commit f42d45f
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions Pay/Controller/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,17 @@ public function startTransaction() {
'countryCode' => $order_info['payment_iso_code_2'],
);

$enduserInitials = !empty($initialsShipping)?$initialsShipping:$initialsPayment;
$enduserLastname = !empty($order_info['shipping_lastname'])?$order_info['shipping_lastname']:$order_info['payment_lastname'];

$arrEnduser = array(
'initials' => substr($initialsShipping,0,1),
'lastName' => $order_info['shipping_lastname'],
'initials' => substr($enduserInitials,0,1),
'lastName' => $enduserLastname,
'language' => substr($order_info['language_code'],0,2),
'emailAddress' => $order_info['email'],
'address' => $arrShippingAddress,
'invoiceAddress' => $arrPaymentAddress,
'phoneNumber' => $order_info['telephone']
);

$apiStart->setEnduser($arrEnduser);
Expand All @@ -129,15 +132,6 @@ public function startTransaction() {
$apiStart->addProduct($product['product_id'], $product['name'], $price, $product['quantity'], Pay_Helper::calculateTaxClass($priceWithTax, $tax));
}

// // Shipping costs?
// if (isset($this->session->data['shipping_method']['cost']) && $this->session->data['shipping_method']['cost'] != 0) {
// $arrShipping = $this->session->data['shipping_method'];
// $shippingCost = $this->tax->calculate($arrShipping['cost'], $arrShipping['tax_class_id'], true);
// $shippingCost = round($shippingCost*100);
// $apiStart->addProduct('0', 'Verzendkosten', $shippingCost, 1, 'H');
// $totalAmount += $shippingCost;
// }

//Extra totals rijen
$total_data = array();
$total = 0;
Expand Down

0 comments on commit f42d45f

Please sign in to comment.