PlugnPayAPI Checkout Issue?
Hi, I just finished setting up my cart, and tried to test out the checkout process.
When I put the PlugnplayAPI to production mode, and then proceed to confirm my order, zencart takes me to this page:
Code:
http://www.mystore.com/index.php?main_page=checkout_payment
However, the page is BLANK, just white. So, I attempted to refresh the page .. and it refreshes to this page:
Code:
http://www.mystore.com/index.php?main_page=checkout_payment&error_message=Your+authorization+was+declined.++Please+try+another+card.+--+005%3A+Authorization+declined&zenid=it9v1skafsiggrtcmd5h8ss1k6
The page is still BLANK, white.
Then I put the plugnplayAPI to test mode, and go through the same process, and it tells me card declined use another card.
However, when I go to my bank account the sums were successfully deducted.
Is this a zen cart problem or the plugin problem? How can I fix it??
Thanks!!
Re: PlugnplayAPI Checkout Issue?
I meant plugnpayAPI... sorry for the typos. Not plugnplayAPI... hehe. :blush:
Re: PlugnplayAPI Checkout Issue?
Sorry for all these posts, but this forum won't allow me to edit.
I tried the debug tool, and this is the error I got:
Code:
[24-Sep-2009 20:44:53] PHP Fatal error: Call to a member function update_credit_account() on a non-object in /home/.ashke/username/mystore.com/includes/classes/order.php on line 754
This is what's in the order.php
Code:
$zco_notifier->notify('NOTIFY_ORDER_PROCESSING_CREDIT_ACCOUNT_UPDATE_BEGIN');
$order_total_modules->update_credit_account($i);//ICW ADDED FOR CREDIT CLASS SYSTEM
$zco_notifier->notify('NOTIFY_ORDER_PROCESSING_ATTRIBUTES_BEGIN');
How do I fix this?? Any advice? Thanks!:smile:
Re: PlugnPayAPI Checkout Issue?
Hi again, so I am trying to find answers while waiting for help here and I came across someone with a similar problem, but he's using OSCMax and using paypal.
oscmax.com/forums/paypal/18071-paypal-issue-any-ideas.html
He suggested
Quote:
You can add
" if (isset($order_total_modules))" in front of each line indicating error.
I was wondering would this work for zen cart?
If it works, should it look like this?
Code:
if (isset($order_total_modules)) $order_total_modules->update_credit_account($i);
or
Code:
if (isset($order_total_modules)){ $order_total_modules->update_credit_account($i); }
Once again, really sorry for all these posts, I wish I could edit.
Re: PlugnplayAPI Checkout Issue?
Quote:
Originally Posted by
IronTank
Code:
[24-Sep-2009 20:44:53] PHP Fatal error: Call to a member function update_credit_account() on a non-object in /home/.ashke/username/mystore.com/includes/classes/order.php on line 754
That has nothing to do with your PlugnPay issue.
update_credit_account() is related to Order Total modules, NOT to Payment modules.
Re: PlugnPayAPI Checkout Issue?
Quote:
Originally Posted by
IronTank
Code:
http://www.mystore.com/index.php?main_page=checkout_payment&error_message=Your+authorization+was+declined.++Please+try+another+card.+--+005%3A+Authorization+declined&zenid=it9v1skafsiggrtcmd5h8ss1k6
The page is still BLANK, white.
The blank page at that point likely a security catch trapping the very long parameters on the URL.
That's an older way of coding inherited from osCommerce days.
The newer more efficient approach is to use the $messageStack instead of $_GET.
If you look in the module file (assuming you're using the current one from the Free Addons area), around line 494 you'll see this section of code:
Code:
else if($FinalStatus == 'badcard') {
zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode('Your authorization was declined. Please try another card.') . urlencode(" -- $MErrMsg"), 'SSL', true, false));
}
else if($FinalStatus == 'fraud') {
zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode('Your transaction was rejected. Please contact the merchant for ordering assistance.') . urlencode(" -- $MErrMsg"), 'SSL', true, false));
}
else if($FinalStatus == 'problem') {
zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode('There was an error processing your transaction. Please contact the merchant for ordering assistance.') . urlencode(" -- $MErrMsg"), 'SSL', true, false));
}
else {
if ($response[0] == '') {
zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode("There was an unspecified error processing your transaction.<br>Received empty cURL response - check cURL connectivity to PnP server.") . urlencode(" -- $MErrMsg"), 'SSL', true, false));
}
else {
zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode("There was an unspecified error processing your transaction.") . urlencode(" -- $MErrMsg"), 'SSL', true, false));
}
}
}
... which you'll need to replace with this:
Code:
else if($FinalStatus == 'badcard') {
$error_message = 'Your authorization was declined. Please try another card. -- ' . $MErrMsg;
$messageStack->add_session('checkout_payment', $error_message . '<!-- ['.$this->code.'] -->', 'error');
zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
}
else if($FinalStatus == 'fraud') {
$error_message = 'Your transaction was rejected. Please contact the merchant for ordering assistance. -- ' . $MErrMsg;
$messageStack->add_session('checkout_payment', $error_message . '<!-- ['.$this->code.'] -->', 'error');
zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
}
else if($FinalStatus == 'problem') {
$error_message = 'There was an error processing your transaction. Please contact the merchant for ordering assistance. -- ' . $MErrMsg;
$messageStack->add_session('checkout_payment', $error_message . '<!-- ['.$this->code.'] -->', 'error');
zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
}
else {
if ($response[0] == '') {
$error_message = 'There was an unspecified error processing your transaction.<br>Received empty cURL response - check cURL connectivity to PnP server. -- ' . $MErrMsg;
$messageStack->add_session('checkout_payment', $error_message . '<!-- ['.$this->code.'] -->', 'error');
zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
}
else {
$error_message = 'There was an unspecified error processing your transaction. -- ' . $MErrMsg;
$messageStack->add_session('checkout_payment', $error_message . '<!-- ['.$this->code.'] -->', 'error');
zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
}
}
}
Quote:
Originally Posted by
IronTank
However, when I go to my bank account the sums were successfully deducted.
Sorry, I can't help you with that.
Re: PlugnPayAPI Checkout Issue?
Thanks DrByte for replying quickly.
I made the changes and tried another purchase, but it's still not going through. I mean, the transaction goes through, but the page is still blank and the transaction isn't recorded in the database, which in turn doesn't show up in the admin area.
However, the bank funds are withdrawn successfully.
I'm still getting this error from the Debugtool
Code:
[25-Sep-2009 07:36:11] PHP Fatal error: Call to a member function update_credit_account() on a non-object in /home/.ashke/username/mystore.com/includes/classes/order.php on line 754
Any other advice? Thanks!
Re: PlugnPayAPI Checkout Issue?
update_credit_account() is something done by order-total modules, not payment modules.
Perhaps you've got some addon order-total modules added and/or customized, which are not functioning properly?
Re: PlugnPayAPI Checkout Issue?
Well, recently I did install the super orders module in order to use the USPS autofill, could that be the case?
I had originally post this topic in another forum, since I figured with the order.php error it wasn't a plugin/module problem. But, this topic was moved here. o.o
I haven't really customized zen cart with much.
Do you think I should just upload the original files?
Re: PlugnPayAPI Checkout Issue?
Well, is it a PlugnPay issue? Or is it something else?
ie: What happens if you enable the money-order payment module and use that to checkout instead?
And then is it related to a particular order-total module? What modules do you have installed in Admin->Modules->Order Total?