Add cc info to email from auhorize.net

  • Posts: 4
  • Thank you received: 0
11 years 7 months ago #97084

Hi, first at all, congratulations for hikashop. it's a powerful component!

Here is the tech info:
Joomla! 3.0.2 Stable
Php version 5.3.23
HikaShop Essential 2.1.0

I am using authorize.net plugin for payments. I've attached a screen capture with settings.



I chose AIM method, so that credit card info is typed on joomla page.

The problem is i need to send in admin notification mail (i think... order_admin_notification.html.php)
the last 4 digits (xxxx-xxxx-xxxx-0000) from credit card and type of card (visa, mastercard...)

I expend a lot of time, and i search forum and documentation but i can not get response.

Please, i need it ASAP.

Thanks

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82785
  • Thank you received: 13353
  • MODERATOR
11 years 7 months ago #97190

Hi,

You can display the credit card number like that with the code:

xxxx-xxxx-xxxx-<?php $app = JFactory::getApplication();
echo substr($app->getUserState( HIKASHOP_COMPONENT.'.cc_number'),-4); ?>

in the order admin notification that you can edit via the menu System->Emails in the Business edition.

Please Log in or Create an account to join the conversation.

  • Posts: 4
  • Thank you received: 0
11 years 7 months ago #97211

when i add that code, i get that email (attached)




thanks

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82785
  • Thank you received: 13353
  • MODERATOR
11 years 7 months ago #97221

I forgot a piece:
xxxx-xxxx-xxxx-<?php $app = JFactory::getApplication();
echo substr(base64_decode($app->getUserState( HIKASHOP_COMPONENT.'.cc_number')),-4); ?>

The following user(s) said Thank You: bennyallen

Please Log in or Create an account to join the conversation.

  • Posts: 4
  • Thank you received: 0
11 years 7 months ago #97240

Wonderful! Thanks a lot. Is exactly what i need!

In addition, remember, i need to type of card (visa, mastercard, amex...)

Thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 82785
  • Thank you received: 13353
  • MODERATOR
11 years 7 months ago #97429

Like that:

<?php $app = JFactory::getApplication();
echo base64_decode($app->getUserState( HIKASHOP_COMPONENT.'.cc_type')); ?>

Please Log in or Create an account to join the conversation.

  • Posts: 4
  • Thank you received: 0
11 years 7 months ago #97445

Thanks for your help, but it doesn't work.

But i type:
<tr>
<h2>Last 4 credit card digits and card type</h2>
<div>xxxx-xxxx-xxxx-<?php $app = JFactory::getApplication();
echo substr(base64_decode($app->getUserState( HIKASHOP_COMPONENT.'.cc_number')),-4); ?></div>
<br>
<div><?php $app = JFactory::getApplication();
echo base64_decode($app->getUserState( HIKASHOP_COMPONENT.'.cc_type')); ?></div>
</tr>

and i get that email:

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82785
  • Thank you received: 13353
  • MODERATOR
11 years 7 months ago #97582

Mmm. I checked on the Authorize.net documentation but the cart type is actually not given back so we don't know it and thus it's not possible to display it in that email.

Please Log in or Create an account to join the conversation.

Time to create page: 0.053 seconds
Powered by Kunena Forum