Jump to content
Larry Ullman's Book Forums

Recommended Posts

Dear Admin,

In chapter 6

The payment gateway that I am using want me to insert transaction id, amount , payment status to my order table before sending it to their payment gateway and on my thanks php they want me to compare the transaction_id returned from their site with the one in my database before the receipt is shown or printed.

please, where do I place the code : INSERT INTO orders (user_id, transaction_id, payment_status, payment_amount)  in my registration script before sending captured information to the payment processor?

Link to post
Share on other sites

Thank you Bill.

 My problem is on how to insert into two tables simultaneously, I tried inserting into orders table after the line 100 in the registration.php which read $uid = mysqli_insert(dbc,q);

$_SESSION['reg_user_id'] = $uid; but it is not working.

You know what I need to know is how to insert into multiple table simultaneously. i.e users and orders table upon knowing the user_id

Link to post
Share on other sites

Try to ensure program is connecting to database as a lot of problems are related to this. .This may not be relevant but are you creating your own reg script or is the code you are using direct from downloaded code from Larry's website? 

Link to post
Share on other sites

I think those tables will populate after providing appropriate merchant information such as your login id and transaction key. Your book should explain how to set up payment gateway and how to fully test the site using credit card details. This is how 1st edition takes care of payment process.  As I do not have 2nd edition only the earlier 1st edition, I am unable to provide clarity as to how you can do it!  Sorry.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...