Jump to content

Payment Modules and Product Comment Criterion


pberce

Recommended Posts

I'm in the process of making my own payment module for Authorize.net CIM and I'm looking at other modules for guidance. I can see in several of the Prestashop authored default modules (Authorize.net AIM, Paypal) they call a function called "setTransactionDetail" which is as follows:

 

if (isset($this->pcc))
{
  $this->pcc->transaction_id = (string)$response[6];

  // 50 => Card number (XXXX0000)
  $this->pcc->card_number = (string)substr($response[50], -4);

  // 51 => Card Mark (Visa, Master card)
  $this->pcc->card_brand = (string)$response[51];

  $this->pcc->card_expiration = (string)Tools::getValue('x_exp_date');

  // 68 => Owner name
  $this->pcc->card_holder = (string)$response[68];
}

 

My question is what is pcc? I've searched the code and I cannot see where this is initialized or how it is used. The only thing I can find that uses the "pcc" reference is Product Comment Criterion. I just don't see how that relates to what the code is doing. The code seems to be trying to store the CC information.

 

Can anyone shed light on this?

Link to comment
Share on other sites

replying to my own message as I finally figured it out.

 

pcc is for the Payment Credit Card class. It's used for storing payment information in the database when a transaction occurs. It would store things like:

 

$id_order;

$id_currency;

$amount;

$transaction_id;

$card_number;

$card_brand;

$card_expiration;

$card_holder;

$date_add;

 

And yes, I know, this isn't PCI Compliant. It would be fine if you stored everything but the credit card information (number, holder, exp).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...