Skip to content

Commit 2d81768

Browse files
committed
Remove phone if not mandatory
1 parent 57eab5d commit 2d81768

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

app/code/community/GlobalExperts/Hypercharge/Model/Checkout.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,6 @@ public function getRedirectUrl() {
430430
'currency' => $currency,
431431
'editable_by_user' => $editableByUser,
432432
'customer_email' => $order->getCustomerEmail(),
433-
'customer_phone' => $billing->getTelephone(),
434433
'notification_url' => Mage::getUrl('bit-hypercharge/wpfnotification/wpf', array('_secure' => true)),
435434
'return_success_url' => Mage::getUrl('bit-hypercharge/wpfredirect/success', array('_secure' => true)),
436435
'return_failure_url' => Mage::getUrl('bit-hypercharge/wpfredirect/failure', array('_secure' => true)),
@@ -453,6 +452,10 @@ public function getRedirectUrl() {
453452
),
454453
);
455454

455+
if ($billing->getTelephone()) {
456+
$paymentData['customer_phone'] = $billing->getTelephone();
457+
}
458+
456459
$paymentData['transaction_types'] = array(
457460
'transaction_type' => $modelPayment->getTransactionType()
458461
);

app/code/community/GlobalExperts/Hypercharge/Model/Mobile.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ public function initialize($paymentAction, $stateObject)
131131
, 'transaction_id' => $order->getRealOrderId() //uniqid(time())
132132
, 'usage' => Mage::app()->getStore()->getName() . ' order authorization'
133133
, 'customer_email' => $order->getCustomerEmail()
134-
, 'customer_phone' => $billing->getTelephone()
135134
, 'notification_url' => Mage::getUrl('bit-hypercharge/notification/response', array('_secure' => true))
136135
, 'billing_address' => array(
137136
'first_name' => $billing->getFirstname()
@@ -143,6 +142,10 @@ public function initialize($paymentAction, $stateObject)
143142
)
144143
);
145144

145+
if ($billing->getTelephone()) {
146+
$paymentData['customer_phone'] = $billing->getTelephone();
147+
}
148+
146149
$transactionType = $modelPayment->_jsonTransactionType;
147150
if (isset($transactionType) && $transactionType != '') {
148151
$paymentData['transaction_types'] = array('transaction_type' => $transactionType);

app/code/community/GlobalExperts/Hypercharge/etc/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<config>
2929
<modules>
3030
<GlobalExperts_Hypercharge>
31-
<version>1.1.14</version>
31+
<version>1.1.12</version>
3232
</GlobalExperts_Hypercharge>
3333
</modules>
3434

0 commit comments

Comments
 (0)