VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: smusselm on September 30, 2019, 06:09:46 AM

Title: Offline Credit Card Processing Plugin Broke with Most Recent Update
Post by: smusselm on September 30, 2019, 06:09:46 AM
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;
}
Title: Re: Offline Credit Card Processing Plugin Broke with Most Recent Update
Post by: jenkinhill on September 30, 2019, 10:53:48 AM
Do you actually have the latest version of VirtueMart?  Latest is 3.6.2.10159    http://dev.virtuemart.net/attachments/download/1198/com_virtuemart.3.6.2.10159_package_or_extract.zip
Title: Re: Offline Credit Card Processing Plugin Broke with Most Recent Update
Post by: smusselm on September 30, 2019, 15:12:58 PM
I do. I upgraded over the weekend. That's when I started having the issue.

VirtueMart 3.6.2 10159 <- Copied directly from VM.
Title: Re: Offline Credit Card Processing Plugin Broke with Most Recent Update
Post by: smusselm on September 30, 2019, 15:18:21 PM
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.
Title: Re: Offline Credit Card Processing Plugin Broke with Most Recent Update
Post by: jenkinhill on September 30, 2019, 16:54:10 PM
For this commercial plugin you should really ask Valérie (alatak) by ticket ( https://extensions.virtuemart.net/ticket ) or maybe through her website.

Also see http://docs.virtuemart.net/tutorials/development/240-important-adjustments-for-virtuemart-3-6.html