Need help with variable not being read properly

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
susan767
Forum Newbie
Posts: 1
Joined: Thu Feb 05, 2009 11:25 pm

Need help with variable not being read properly

Post by susan767 »

Hi,

I am trying to set up a small online store and earnestly looking for help with PHP coding.

I have uploaded related image files and php files as attachments.

My invoice email is created by reading a variable from two different php files according to the payment method (Cash on Delivery or Paypal)

The invoice is created properly when the customer pays with Cash on Delivery (Exhibit A) but missing information in the invoice paid with PayPal (Exhibit B).

As you can see, PayPal invoice (Exhibit B) is missing Sub-Total, Delivery method and Total amount.

The file that creates html is html_checkout_process.php.
The corresponding information is written by a single variable $Vartaxe and Line 53 contains the html code (I've also remarked it with lots of ***'s)


$Vartaxe is read from one of the two files, according to the payment method.


1. When payment is Cash on Delivery: checkout_process.php (This is working properly, corresponds to Exhibit A)

Line 236 (remarked with lots of ***'s) contains the statement related to $Vartaxe. This is the file's only statement associated with $Vartaxe.


2. Whey payment is made with PayPal: paypal_standard.php (The problem file. Corresponds to Exhibit B)

Line 515 (remarked with lots of ***'s) contains the statement related to $Vartaxe. This is the file's only statement associated with $Vartaxe.


It looks like the information is not being captured properly in the second case because the variables are not properly declared and/or used.

Any suggestion and advice regarding solving the problem would be highly appreciated.

Susan
php files.zip
relevant php files
(13.52 KiB) Downloaded 9 times
Attachments
Exhibit B
Exhibit B
Exhibit B.jpg (37.14 KiB) Viewed 113 times
Exhibit A
Exhibit A
Exhibit A.jpg (43.29 KiB) Viewed 112 times
Post Reply