• Add to Collection
  • Tools Used
  • About

    About

    A Paypal Store made with Php/MySQL and Javascript utilising an instant payment notification script to report any anomalies in the difference betw… Read More
    A Paypal Store made with Php/MySQL and Javascript utilising an instant payment notification script to report any anomalies in the difference between the total cart price leaving the site and the Paypal total that returns when their finished processing the order. Read Less
    Published:
CMS 1 Paypal Store 
CMS 1 Store  -  Link below
Product page - Black cap selected
Full size image page
Cart page - Paypal button appears after black cap chosen
Empty cart option selected - Paypal button removed as there is no items
Back to Main Index Page Option Selected
Product Page - black shirt chosen
Cart Page - after black shirt chosen
Back to Main Index Page Option Selected
Search Bar - uses "LIKE" to target database entries so "bla" entered
All items in database with "black" in description shown

Scroll down through search options to chose "Black office shoes"
Product page after clicking black office shoes
Cart Page - after adding black office shoes
Directed to Paypal login after pressing Paypal button
Paypal Confirmation - items reduced to £0.50 each for testing via admin section
Paypal receipt for our first purchase
Paypal receipt - Return button which responds to directions sent through the Paypal button press which have an option to proceed to the completed payments page if the "Cart Total" which we know when the data is sent to Paypal matches the data sent back from Paypal which is stored in the "transactions" table in the application database. The Instant Payment Notification (IPN) page processes the data return through validation steps before storing the data in a record in the database before comparing the "Cart Total" to the Paypal "mc_gross" value in the stored record. If both match the user is redirected to checkout_complete.php
The checkout_complete.php page's only option has an attached call to a function which empties the user's cart on pressing before redirecting the user to the main index page where they will arrive with an empty cart to avoid confusion.
Main Index Page - Cart emptied so we will now make our second transaction in which a hard coded simulated error will show the sites functionality when it detects a discrepancy between the sent Cart Total and the Paypal returned "mc_gross" value.
Product Page - army combats chosen
Product Page - black office shoes chosen again to show multiple order of same choice.
Black Office Shoes selected twice from the main index page but it can be done just as easily by altering the value in the cart page to increase the value - the next image shows the reverse of this process as we decrease the value from 2 to 1.
Black Office Shoes amount altered by entering the value box altering the number from 2 to 1 and pressing the "change" button directly beneath the value to commit the change which changes the "Cart Total" value confirming the action and reflecting the new order values.
The simulated error which is   "$fullAmount = $fullAmount * 8"    committed after a data return of the transaction is added as a record in the transaction table and the final totals are made before an if statements conditional checks to see if   "$fullAmount"   the "Cart Total" matches the   "grossAmount"   which is a figure returned in the   "Paypal"   data housed in the database record, if they don't match the user will be redirected to     order_price_warning.php   
Explanation of what is sent to Paypal via the "Paypal Button" choice.
Redirect to Paypal on pressing Paypal Button in the Cart Page for the second time.
Paypal payment receipt for second order again items made £0.50 each by editing price in admin page options explained further on in this user journey.
Return to Merchant button from Paypal on second order.
User is redirected to order_price_warning.php as "Cart Total" has been found not to match the Paypal "mc_gross" figure returned in the Paypal data. The transaction has completed and a record of it is stored in the transactions table but the user is warned the totals don't match and is advised to investigate further.  
To facilitate further investigation the page has the options to insert the order details in the form of "Order Email" and "Client Surname" which when found will bring up the Paypal "mc_gross" figure from the record in the database and display it next to the cart total as well as showing all the orders made by that "Client Email" and "Client Surname".
The "Cart Total" is correct as is the "Paypal Total" this is because Paypal has made no error and we have introduced a simulated error after the Paypal data came back in this case multiplying the Paypal figure by 8 times. This then proves if Paypal did make an error or the totals didn't match for whatever reason it would be picked up and the user alerted about a possible price difference that may be a problem and to investigate further. It may not stop the problem but it would at least alert the user.
The two records pulled from the "transactions" table in the MySQL database once the "Client Email" and "Client Surname" are entered in the pages form allowing further investigation.
A print of the two transaction held as records in the transactions table. From this data the     "product_id_array" can be seen which can be used to find out what items where ordered i.e. record 1 has values   8-1   which means   black dress shirt - one   then comma   12-1   which means    Black office shoes - one     Some other sensitive data has been changed to xxxxxxxx values.
Admin Login Page
Admin Options Page
Add Product Form which is very simple to use and can upload an image which it attaches a ".jpg" extension to.
Uploading image from a file held on the desktop.
New product added.
Duplicate entry attempted.
Duplicate entry rejected and link back to "Admin Inventory" page provided.
Delete Entry - All Terrain Boots entry.
Confirm Deletion Page.
All Terrain Boots entry deleted.
Edit Product - Black cap price edited from £0.50 to £10.00
Edit confirmed and link back to Inventory Edit age provided.
Redirected to Inventory Edit page where edit is confirmed.
Main Page completing user journey thank you for watching.