- Posts: 28
- Thank you received: 0
Hikashop 2.5.0: credit card email alternative
10 years 1 month ago #248607
by Cedwyn
Hikashop 2.5.0: credit card email alternative was created by Cedwyn
-- HikaShop version -- : 2.5.0
-- Joomla version -- : latest
-- PHP version -- : latest
Using 2.5.0, client doesn't want to pay to update.
Are there any free plugins or extensions or source code somewhere for an alternative way of sending credit card / payment details to the admin? The client doesn't get all the order emails for whatever reason and they say it is a pain to have to call the customer to confirm the missing payment info (ie. email + backend for full cc details).
The client processes about online 500 credit card purchases a month, so it would be classified as a level 4 merchant (for PCI compliance / whatever).
-- Joomla version -- : latest
-- PHP version -- : latest
Using 2.5.0, client doesn't want to pay to update.
Are there any free plugins or extensions or source code somewhere for an alternative way of sending credit card / payment details to the admin? The client doesn't get all the order emails for whatever reason and they say it is a pain to have to call the customer to confirm the missing payment info (ie. email + backend for full cc details).
The client processes about online 500 credit card purchases a month, so it would be classified as a level 4 merchant (for PCI compliance / whatever).
Please Log in or Create an account to join the conversation.
10 years 1 month ago #248626
by nicolas
Replied by nicolas on topic Hikashop 2.5.0: credit card email alternative
Hi,
HikaShop stores only half of the credit card data with the order and sends half to the admin by email for security reasons.
If you want to get all the data in the order, it would require modifying the code:
in the file plugins/hikashoppayment/creditcard/creditcard.php
But by doing that, I doubt that you can still guarantee PCI compliance of the website.
Ideally, it would require storing the credit card data on a separate server in a secure way by developing a custom plugin, putting in place such server on your end, add all the security necessary on the server and the network to guarantee the safery of the data, etc.
Separating the information in an email and the order like HikaShop does is a cheap and easy way to secure the credit card data.
HikaShop stores only half of the credit card data with the order and sends half to the admin by email for security reasons.
If you want to get all the data in the order, it would require modifying the code:
Code:
function onBeforeOrderCreate(&$order,&$do){
if(parent::onBeforeOrderCreate($order, $do) === true)
return true;
$this->ccLoad();
if($order->order_payment_method=='creditcard'){
$order->credit_card_info = $this;
$obj = new stdClass();
$obj->cc_number=substr($this->cc_number,0,8);
$obj->cc_month=$this->cc_month;
$obj->cc_year=$this->cc_year;
$obj->cc_type=@$this->cc_type;
$history = new stdClass();
$history->type = 'credit card';
$history->notified = 0;
$history->data = base64_encode(serialize($obj));
$this->modifyOrder($order,$this->payment_params->order_status,$history,false);
}
}
function onHistoryDisplay(&$histories){
foreach($histories as $k => $history){
if($history->history_payment_method == $this->name && !empty($history->history_data)){
$data = hikashop_unserialize(base64_decode($history->history_data));
$string='';
if(!empty($data->cc_type)){
$string.= JText::_('CARD_TYPE').': '.$data->cc_type.'<br />';
}
$string.= JText::_('DATE').': '.$data->cc_month.'/'.$data->cc_year.'<br />';
$string.= JText::_('BEGINNING_OF_CREDIT_CARD_NUMBER').': '.$data->cc_number.'<br />';
$string.='<a href="'.hikashop_completeLink('order&task=remove_history_data&history_id='.$history->history_id).'"><img src="'.HIKASHOP_IMAGES.'delete.png" /></a>';
$histories[$k]->history_data = $string;
static $done = false;
if(!$done){
$done = true;
$app = JFactory::getApplication();
$app->enqueueMessage(JText::_('CREDITCARD_WARNING'));
}
}
}
}
But by doing that, I doubt that you can still guarantee PCI compliance of the website.
Ideally, it would require storing the credit card data on a separate server in a secure way by developing a custom plugin, putting in place such server on your end, add all the security necessary on the server and the network to guarantee the safery of the data, etc.
Separating the information in an email and the order like HikaShop does is a cheap and easy way to secure the credit card data.
Please Log in or Create an account to join the conversation.
10 years 1 month ago #248881
by Cedwyn
Replied by Cedwyn on topic Hikashop 2.5.0: credit card email alternative
Thanks for the detailed reply.
I prefer not to store the data on the clients db. Does hikashop have any plugins that work with payment/tokenization gateways? (So I don't have to write any code) Ie. Client enters CC info -> info is sent to 3rd party db, token returned -> token stored in client db -> client uses some app to access the token from their db
Otherwise, with your code above, I should be able to get the token response and store it under cc_number and this is inserted in the client db?
I prefer not to store the data on the clients db. Does hikashop have any plugins that work with payment/tokenization gateways? (So I don't have to write any code) Ie. Client enters CC info -> info is sent to 3rd party db, token returned -> token stored in client db -> client uses some app to access the token from their db
Otherwise, with your code above, I should be able to get the token response and store it under cc_number and this is inserted in the client db?
Please Log in or Create an account to join the conversation.
10 years 1 month ago #248891
by nicolas
Replied by nicolas on topic Hikashop 2.5.0: credit card email alternative
Hi,
I don't know of such plugin already available for HikaShop.
But yes, you can change the code there to send the info to such service and then store the token in the same manner.
I don't know of such plugin already available for HikaShop.
But yes, you can change the code there to send the info to such service and then store the token in the same manner.
Please Log in or Create an account to join the conversation.
Time to create page: 0.173 seconds