Zen Cart Logo

A Linkpoint Headache

Locked

Views: 1,438

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
1 Nov 2007, 11:53 PM
#1
kinget avatar

kinget

Zen Follower

Join Date:
Jul 2006
Posts:
154
Plugin Contributions:
0

A Linkpoint Headache

Hi again...

Using 3.7.x store with a Linkpoint module -- the problem is the passing of a customer id. It shows up blank on the details in linkpoint under "orders" and the store seems to not use the customer id at all, but generates a random number. Is there a way to have the store, generate the customer id in the module, instead of using that random number?

FYI - We use authorize only, and not charge, so we have to batch and approve sales. The long id number means nothing and gives no way to track sales. When I viewed the code on the linkpoint_api.php file, I saw a character when I printed the DB in Linkpoint that says "oid" which seems to generate a random number. It is left blank when printed on the Linkpoint CC Report, but it seems to be the item that generates this number...or am I incorrect on that? Does anyone know how I could rework this so that we can easily see the invoice/customer ID in the stats, rather than the generated the random number? This would be most helpful.

Thanks as always for your energy and support,
Kinget

2 Nov 2007, 3:23 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: A Linkpoint Headache

When v1.3.8 comes out there will be much improved functionality in the Linkpoint module, including the things you are mentioning.

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

2 Nov 2007, 4:29 PM
#3
kinget avatar

kinget

Zen Follower

Join Date:
Jul 2006
Posts:
154
Plugin Contributions:
0

Re: A Linkpoint Headache

Hi Dr. Byte....

I'll look forward to that update. In the meantime,(update) -- I managed to figure out the line to add the customer id, but it adds the "last" digit of our invoices, and not the full invoice number.

This line was left blank in the linkpoint_api.php. Above this area of myorder, there is another area that describes "oid" to generate the random number. Below that are these "my order lines" with this instruction --

// "oid" - Order ID number must be unique. If not set, gateway will assign one.
$myorder["oid"] = "";

and I replaced it with:
// "oid" - Order ID number must be unique. If not set, gateway will assign one.
$myorder["oid"] = $_SESSION['customer_id'];

The problem is that only gives me the "last" digit of the invoice number and not the entire invoice number. If I could change that to a line that would produce my entire invoice number, that would solve my problem. We have to have a way to track these sales, because we authorize only at the store, and each order is reviewed before it is finalized. So it's essential that we have some way of tracking. What I've figured out is a step in the right direction and better than having that random number, but not ideal. Would you know the line I could add in it's place that would give me the entire invoice number? After testing it, it seemed to work with no problems.

Thanks as always for your expert help. :-)
Kinget

DrByte:

When v1.3.8 comes out there will be much improved functionality in the Linkpoint module, including the things you are mentioning.

2 Nov 2007, 4:56 PM
#4
drbyte avatar

drbyte

Sensei

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

Re: A Linkpoint Headache

I don't recommend the approach you are trying to use ... because you're sending the customer ID as the order ID, and order ID's need to be unique. You're running the risk of getting that customer's order rejected the next time they try to place another order.

If you want to match up customer's orders with customer ID, send the customer ID like this instead:```
$myorder["[B]userid[/B]"] = $_SESSION['customer_id'];

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

2 Nov 2007, 5:49 PM
#5
kinget avatar

kinget

Zen Follower

Join Date:
Jul 2006
Posts:
154
Plugin Contributions:
0

Re: A Linkpoint Headache

Ah...thank you for this. I'll make that adjustment. Actually, ideally I want the invoice number to match the order id, not exactly the customer id. So for example, if it's invoice "2504" the order id in linkpoint reads "2504"...

DrByte:

I don't recommend the approach you are trying to use ... because you're sending the customer ID as the order ID, and order ID's need to be unique. You're running the risk of getting that customer's order rejected the next time they try to place another order.

If you want to match up customer's orders with customer ID, send the customer ID like this instead:```
$myorder["[B]userid[/B]"] = $_SESSION['customer_id'];

2 Nov 2007, 5:58 PM
#6
drbyte avatar

drbyte

Sensei

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

Re: A Linkpoint Headache

kinget:

Actually, ideally I want the invoice number to match the order id, not exactly the customer id. So for example, if it's invoice "2504" the order id in linkpoint reads "2504"...

That's a chicken-and-egg situation. When the transaction is sent to Linkpoint, the order hasn't been created yet, so the order number isn't known.

In the v1.3.8 edition, the module attempts to approximate the order number before sending for processing. It's not perfect, but it's better.

In a future version of Zen Cart, things may be changed to actually generate the order before asking for payment; but at the present time, the order is only "created" after payment has been completed (or at least after the gateway has given a "success" response from authorizing the card).

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

2 Nov 2007, 6:07 PM
#7
kinget avatar

kinget

Zen Follower

Join Date:
Jul 2006
Posts:
154
Plugin Contributions:
0

Re: A Linkpoint Headache

Hi Dr. Byte,

I see. This is a huge problem for us. It's so essential to be able to track the invoice number matched to the order number. We had that running before on Linkpoint Connect, with the old order form, and could see the invoice number. It's the only way of being able to match orders. I'm not sure I follow why the order has to be created, if you use the invoice number, wouldn't that be a unique id? I'm an authorize.net person personally, but they wanted linkpoint, so I'm stuck with it.

I did use the code you gave me. It placed the customer id as the "user id" -- on another cart we have the user id is, the store number? I guess I can tell the office to track looking at the user id rather than the order id to match the orders for now. I was really hoping to use the invoice number...is that possible? That would work fine, rather than using a customer id. So that the user id, reads the invoice number?

Thank you again for your help.
Kinget

DrByte:

That's a chicken-and-egg situation. When the transaction is sent to Linkpoint, the order hasn't been created yet, so the order number isn't known.

In the v1.3.8 edition, the module attempts to approximate the order number before sending for processing. It's not perfect, but it's better.

In a future version of Zen Cart, things may be changed to actually generate the order before asking for payment; but at the present time, the order is only "created" after payment has been completed (or at least after the gateway has given a "success" response from authorizing the card).

2 Nov 2007, 7:56 PM
#8
drbyte avatar

drbyte

Sensei

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

Re: A Linkpoint Headache

Send me a PM if your customer is interested in customizing the code to suit their needs.

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