Hello,
I am trying to make a script for payment by credit card on oxid 4.6 community.
At the last step (sending mail and showing the order to the customer) I got a problem when I do this on my method of my extended class :
class CB_Order extends CB_Order_parent {
....
if ($iSuccess === 'CBOK' && $oOrder->load(oxSession::getVar('sess_challenge'))) {
$oBasket = $this->getBasket();
$sPaymentId = $oBasket->getPaymentId();
$oUser = $this->getUser();
$iSuccess = $oOrder->sendCBOrderByEmail($oUser, $oBasket, $sPaymentId);
}
}
class CB_oxOrder extends CB_oxOrder_parent {
protected function _sendOrderByEmail($oUser = null, $oBasket = null, $oPayment = null)
{
if ($this->oxorder__oxpaymenttype->value == 'CB') {
return 1;
} else {
return parent::_sendOrderByEmail($oUser, $oBasket, $oPayment);
}
}
public function sendCBOrderByEmail($oUser = null, $oBasket = null, $oPayment = null) {
return parent::_sendOrderByEmail($oUser, $oBasket, $oPayment);
}
}
[B]Error :[/B]
Fatal error: Call to a member function getRawValue() on a non-object in /home/www/1fc6c569d186b2320707ad0d7cd003ac/web/tmp/f3d2e0fe0e56e9558123e564bd1407d9^%%3E^3E2^3E2C254F%%order_cust.tpl.php on line 241
[B]Code of error line 241 :[/B]
<?php $_from = $this->_tpl_vars['basket']->getProductVats(); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['VATitem']):
?>
I have followed this post to make the script :
http://devzone.zend.com/1529/accepting-credit-card-payments-with-oxid-eshop-ce-and-alertpay/
Someone can help me please ?