Pass variable x_line_item through authorize.net

stkoontz
stkoontz used Ask the Experts™
on
I'm using the SIM method for an authorize.net payment page.  x_line_item is working fine to pass information into the Authorize.net payment page.  But after the transaction is completed, I need to store the x_line_item information into my database.  

Does anyone know how to get the x_line_item information out after the transaction is completed?

Thanks,

Steve
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2011
Top Expert 2016
Commented:
Why not put the x_line_item into the data base before the transaction is sent to Authorize.net?  Then you have a record of both successful and failed transactions.
Scott FellDeveloper & EE Moderator
Fellow 2018
Most Valuable Expert 2013

Commented:
The only option is what Ray suggests.  You can get data back using the Relay Response but the  x_line_item is not one of those things.

Author

Commented:
Thanks, Ray, for the suggestion.  I could do that.  I'd just need to write the code to check if the transaction exists and run an update instead of an insert if the user changes their order.

I was hoping there would be an easier way and inserting x_line_item into the database once after the transaction was completed seemed to be that way.
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Most Valuable Expert 2011
Top Expert 2016

Commented:
If you're using MySQL you might find REPLACE INTO to be useful.  Not sure - it would depend on your design, but it's kind of a helpful concept.

Author

Commented:
Ray: thanks for the helpful response and teaching me a new command.  REPLACE INTO is working great.

Steve
Most Valuable Expert 2011
Top Expert 2016

Commented:
Steve: Thanks for the points and thanks for using EE,  Best, ~Ray

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial