Forums / Addon Payment Modules / PlugnPayAPI Checkout Issue?

PlugnPayAPI Checkout Issue?

Locked

Views: 4,177

Results 1 to 18 of 18
This thread is locked. New replies are disabled.
25 Sep 2009, 1:46 AM
#1
irontank avatar

irontank

New Zenner

Join Date:
Nov 2008
Location:
Florida
Posts:
41
Plugin Contributions:
0

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:

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:

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!!

****ITF **
"I understand now. The circumstances of one's birth are irrelevant. It is what you do with the gift of life that determines who you are." - MewTwo

25 Sep 2009, 1:59 AM
#2
irontank avatar

irontank

New Zenner

Join Date:
Nov 2008
Location:
Florida
Posts:
41
Plugin Contributions:
0

Re: PlugnPayAPI Checkout Issue?

I meant plugnpayAPI... sorry for the typos. Not plugnplayAPI... hehe. :blush:

****ITF **
"I understand now. The circumstances of one's birth are irrelevant. It is what you do with the gift of life that determines who you are." - MewTwo

25 Sep 2009, 3:48 AM
#3
irontank avatar

irontank

New Zenner

Join Date:
Nov 2008
Location:
Florida
Posts:
41
Plugin Contributions:
0

Re: PlugnPayAPI 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:

[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

      $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:

****ITF **
"I understand now. The circumstances of one's birth are irrelevant. It is what you do with the gift of life that determines who you are." - MewTwo

25 Sep 2009, 4:38 AM
#4
irontank avatar

irontank

New Zenner

Join Date:
Nov 2008
Location:
Florida
Posts:
41
Plugin Contributions:
0

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

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?

if (isset($order_total_modules)) $order_total_modules->update_credit_account($i);

or

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.

****ITF **
"I understand now. The circumstances of one's birth are irrelevant. It is what you do with the gift of life that determines who you are." - MewTwo

25 Sep 2009, 6:10 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: PlugnPayAPI Checkout Issue?

IronTank:

[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.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

25 Sep 2009, 6:19 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: PlugnPayAPI Checkout Issue?

IronTank:

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:```
    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:```
    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));
      }
    }
  }

IronTank:

However, when I go to my bank account the sums were successfully deducted.
Sorry, I can't help you with that.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

26 Sep 2009, 2:13 AM
#7
irontank avatar

irontank

New Zenner

Join Date:
Nov 2008
Location:
Florida
Posts:
41
Plugin Contributions:
0

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

[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!

****ITF **
"I understand now. The circumstances of one's birth are irrelevant. It is what you do with the gift of life that determines who you are." - MewTwo

26 Sep 2009, 2:25 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

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?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

26 Sep 2009, 2:47 AM
#9
irontank avatar

irontank

New Zenner

Join Date:
Nov 2008
Location:
Florida
Posts:
41
Plugin Contributions:
0

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?

****ITF **
"I understand now. The circumstances of one's birth are irrelevant. It is what you do with the gift of life that determines who you are." - MewTwo

26 Sep 2009, 3:36 AM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

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?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

26 Sep 2009, 3:52 AM
#11
irontank avatar

irontank

New Zenner

Join Date:
Nov 2008
Location:
Florida
Posts:
41
Plugin Contributions:
0

Re: PlugnPayAPI Checkout Issue?

In my modules > order totals
I have these there:

COD Fee
Discount Coupon
Group Discount
Gift Certificates
Low Order Fee
Shipping
Sub-Total
Tax
Total

All of them are activated except for COD... I'll try to enable it and us it.

****ITF **
"I understand now. The circumstances of one's birth are irrelevant. It is what you do with the gift of life that determines who you are." - MewTwo

26 Sep 2009, 4:16 AM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: PlugnPayAPI Checkout Issue?

There's no need to activate COD if you're not using it.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

26 Sep 2009, 4:25 AM
#13
irontank avatar

irontank

New Zenner

Join Date:
Nov 2008
Location:
Florida
Posts:
41
Plugin Contributions:
0

Re: PlugnPayAPI Checkout Issue?

I just remember something that I DID do and could probably cause this..

in the /catalog/includes/modules/payment/
folder, I moved all the modules, except purchaseorder.php and plugnpay_api.php
to /catalog/includes/modules/payment/other
of course I left the folders alone, I just moved the php files except those two.

Sorry, I had just remembered.. Now, I've moved cod.php and moneyorder.php back to the modules/payment/ folder.

Do you think that by moving those files to another directory it caused this error?

I can't really test at the moment... I only have one card and the cart is telling me I've used the same card too many times (6 times x.x) than allowed in the time permitted. :blush:

****ITF **
"I understand now. The circumstances of one's birth are irrelevant. It is what you do with the gift of life that determines who you are." - MewTwo

26 Sep 2009, 4:29 AM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: PlugnPayAPI Checkout Issue?

Did you try by using the moneyorder module instead, as I suggested earlier?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

26 Sep 2009, 4:59 AM
#15
irontank avatar

irontank

New Zenner

Join Date:
Nov 2008
Location:
Florida
Posts:
41
Plugin Contributions:
0

Re: PlugnPayAPI Checkout Issue?

DrByte:

Did you try by using the moneyorder module instead, as I suggested earlier?

Yeah, I just tried it. Samething, blank page. That's odd, because it worked before, when I first created the cart! :frusty:

Could it be conflicting with the uspsautofill or super orders? There really aren't any other modules I've added than those two.

****ITF **
"I understand now. The circumstances of one's birth are irrelevant. It is what you do with the gift of life that determines who you are." - MewTwo

26 Sep 2009, 5:03 AM
#16
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: PlugnPayAPI Checkout Issue?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

26 Sep 2009, 5:28 AM
#17
irontank avatar

irontank

New Zenner

Join Date:
Nov 2008
Location:
Florida
Posts:
41
Plugin Contributions:
0

Re: PlugnPayAPI Checkout Issue?

modules/classes/order.php differences
Line 620, after $insert_id = $db->Insert_ID();

// BEGIN Super Orders edit
        // add CC data as a line item to SO payment system
        if (zen_not_null($this->info['cc_type']) || zen_not_null($this->info['cc_owner']) || zen_not_null($this->info['cc_number'])) {
          require(DIR_WS_CLASSES . 'super_order.php');
          $so = new super_order($insert_id);
          $so->cc_line_item();
        }
        // END Super Orders edit

I took that line out and reuploaded order.php
Still getting a blank page even when paying with moneyorder

Also, checking the debug tool, each time I get a blank page it gives the same error, order.php line 754

****ITF **
"I understand now. The circumstances of one's birth are irrelevant. It is what you do with the gift of life that determines who you are." - MewTwo

27 Sep 2009, 4:33 AM
#18
irontank avatar

irontank

New Zenner

Join Date:
Nov 2008
Location:
Florida
Posts:
41
Plugin Contributions:
0

Re: PlugnPayAPI Checkout Issue?

I fixed it...

Using all the methods you've advised me, I found what was wrong.

in the includes/modules/checkout_process.php from line 49 - 62
all of this was missing!

require(DIR_WS_CLASSES . 'order_total.php');
$order_total_modules = new order_total;

$zco_notifier->notify('NOTIFY_CHECKOUT_PROCESS_BEFORE_ORDER_TOTALS_PRE_CONFIRMATION_CHECK');

$order_totals = $order_total_modules->pre_confirmation_check();

$zco_notifier->notify('NOTIFY_CHECKOUT_PROCESS_BEFORE_ORDER_TOTALS_PROCESS');
$order_totals = $order_total_modules->process();
$zco_notifier->notify('NOTIFY_CHECKOUT_PROCESS_AFTER_ORDER_TOTALS_PROCESS');

if (!isset($_SESSION['payment']) && !$credit_covers) {
  zen_redirect(zen_href_link(FILENAME_DEFAULT));
}

I re-uploaded the original, and everything works fine now.
I don't quite remember exactly why those were deleted how/who did it.

Thank you for guiding me through this every step, without your help I'd be stuck for days beyond this... :frusty:

Thanks! :smile:

****ITF **
"I understand now. The circumstances of one's birth are irrelevant. It is what you do with the gift of life that determines who you are." - MewTwo