Results 1 to 3 of 3
  1. #1

    Default Using Order ID instead of Transaction ID for Purchase Order Field in Payflow Pro

    I know some of you are using the Payflow Pro payment module for ZC 1.3.8. What I'd like to do is store the order number in paypal's purchase order field (instead of the transaction ID that is currently there). I've searched the forums and scoured the ZC mod source code, as well as the Paypal SDK. I'm not sure at what point I would stick this in, as I see no reference to the PONUM field, which is where I think it's going. I'm not sure where along the line the transID is getting stored there.

    Anybody made that change in their code and want to share, or have some insight in that?

    Thanks much!
    Need PHP help? Try PHP Builder.
    I've been Zenned! www.giftsforengineers.com

  2. #2
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Using Order ID instead of Transaction ID for Purchase Order Field in Payflow Pro

    The problem is that in Zen Cart v1.xx, the store "order number" isn't yet generated when payment is collected. That number is assigned *after* payment is completed. That's why the number is not sent.
    .

    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.

  3. #3

    Default Re: Using Order ID instead of Transaction ID for Purchase Order Field in Payflow Pro

    Quote Originally Posted by DrByte View Post
    The problem is that in Zen Cart v1.xx, the store "order number" isn't yet generated when payment is collected. That number is assigned *after* payment is completed. That's why the number is not sent.
    Hmm, ok, thanks. We were using this with 1.3.7 and we were somehow grabbing that number, so I went back and checked the old code. It was providing the next expected order number, lines 269-272:

    <code>
    // Calculate the next expected order id
    $last_order_id = $db->Execute("select * from " . TABLE_ORDERS . " order by orders_id desc limit 1");
    $new_order_id = $last_order_id->fields['orders_id'];
    $new_order_id = ($new_order_id + 1);
    </code>

    Guess that works, but probably not foolproof ;) It may be enough for our purposes though; maybe I can do a post-transaction verification somehow. Thanks for the insight.

    Cheers!
    E.
    Need PHP help? Try PHP Builder.
    I&#39;ve been Zenned&#33; www.giftsforengineers.com

 

 

Similar Threads

  1. Add field for purchase order number
    By Javier in forum Managing Customers and Orders
    Replies: 3
    Last Post: 10 Sep 2010, 04:02 AM
  2. Replies: 4
    Last Post: 12 May 2010, 07:02 PM
  3. Payflow Pro transaction error log failure
    By kaiserpe in forum Addon Payment Modules
    Replies: 1
    Last Post: 1 Aug 2008, 02:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg