Offline Credit Card Processing Plugin Broke with Most Recent Update

Started by smusselm, September 30, 2019, 06:09:46 AM

Previous topic - Next topic

smusselm

I'm using the Alatak Credit Card Plugin. Worked great until the last update.

Before, after entering the credit card number and refreshing the cart, it would list the last four digits of the card under the payment selected name.

Now it clears the card and won't allow the checkout to proceed.  I think it might have something to do with the plgVmonSelectedCalculatePricePayment function, due to when the problem is occurring, but I'm lost.

I've looked for change logs for the latest Virtuemart payment plugins, but I can't seem to figure what has changed and is stopping the process. :(

I'm on deadline. I may need to revert back to an older version in the short run. I'd prefer not to. 

The site is running both the latest Joomla and Virtuemart versions. 

Any ideas?  Thanks in advanced!!



public function plgVmonSelectedCalculatePricePayment(VirtueMartCart $cart, array &$cart_prices, &$cart_prices_name) {

if (!($method = $this->getVmPluginMethod($cart->virtuemart_paymentmethod_id))) {
return NULL; // Another method was selected, do nothing
}
if (!$this->selectedThisElement($method->payment_element)) {
return false;
}
if (vRequest::getInt('virtuemart_paymentmethod_id')) {

$this->card_type = vRequest::getVar('card_type_' . $cart->virtuemart_paymentmethod_id, false);
$this->card_number = str_replace(" ", "", vRequest::getVar('card_number_' . $cart->virtuemart_paymentmethod_id, false));
$this->cvv = vRequest::getVar('cvv_' . $cart->virtuemart_paymentmethod_id, false);
$this->expiry_month = vRequest::getVar('expiry_month_' . $cart->virtuemart_paymentmethod_id, false);
$this->expiry_year = vRequest::getVar('expiry_year_' . $cart->virtuemart_paymentmethod_id, false);
$this->expiry_date = $this->expiry_month . '/' . $this->expiry_year;
$this->issue_date = vRequest::getVar('issue_date_' . $cart->virtuemart_paymentmethod_id, false);
$this->issue_number = vRequest::getVar('issue_number_' . $cart->virtuemart_paymentmethod_id, false);
$this->name_on_card = vRequest::getVar('name_on_card_' . $cart->virtuemart_paymentmethod_id, false);

if (!$this->_validate_creditcard_data($method->creditcards, true)) {
vmdebug('plgVmonSelectedCalculatePricePayment FALSE');
return false; // returns string containing errors
}
$this->setCCInSession();
}
$this->getCCFromSession();
$cart_prices['payment_tax_id'] = 0;
$cart_prices['payment_value'] = 0;

if (!$this->checkConditions($cart, $method, $cart_prices)) {
return false;
}
$cart_prices_name = $this->renderSelectedPluginName($method);

$this->setCartPrices($cart, $cart_prices, $method);

return true;
}

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

smusselm

I do. I upgraded over the weekend. That's when I started having the issue.

VirtueMart 3.6.2 10159 <- Copied directly from VM.

smusselm

I've made some template overrides and commented them out just in case that was my issue. I also disabled some modules/plugins in the event there was a conflict. The console isn't showing any JS issues, and nothing is appearing when I set error reporting to maximum.

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum