Two Wheel Philanthropy And Beyond - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

Two Wheel Philanthropy And Beyond

Description:

Two Wheel Philanthropy And Beyond. Practical uses for PHP. Two Wheel Philanthropy ... Merchant Account (a place to put your money, not a matress) ... – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 12
Provided by: aaron107
Category:

less

Transcript and Presenter's Notes

Title: Two Wheel Philanthropy And Beyond


1
Two Wheel Philanthropy And Beyond
  • Practical uses for PHP

2
Two Wheel Philanthropy
  • The Hard Lessons
  • Action-equals-whaa?
  • How does this server thingy work?
  • Solutions
  • Do this and print that!
  • Host base this!
  • Money Issues
  • What do I need? (Linkpoint, merchant accounts,
    security certificates)
  • How do I do that stuff? (Linkpoint XML sending
    and responding)
  • The Big Shabanga-Bang
  • How it works (our end).
  • How it works (their end).
  • Now, Sherman, what did we learn?
  • More about encapsulation (encapsul-wha-tion?)
  • Globals and security.

3
The hard lessons Action-equals-whaa?
  • Our menu was controlled by a form, and we planned
    on separating the files by the different screens.
  • Issue only one action can be given to a form,
    but until we enter information into the menu, we
    dont know which file to go to.

4
The Hard Lessons How Does This Server Thingy
Work?
  • Assumption 1 We can use globals, right? (By the
    way, whats a global?)
  • Assumption 2 Isnt PHP just a big program
    attached to Apache?
  • Assumption 3 Cant we just session_start and
    go?

5
Do this and print that!
  • Print functions display a page requiring
    information with a tag of where they are coming
    from.
  • Do functions process the information and move
    on to the next print function.
  • Other functions are for use within these.
  • We have one BIG file to work with.

6
Host Base This !
  • Well store a variable containing our host base
    URL and add the server variable from there.
  • Well explicitly state where we want our sessions
    stored.
  • Well deal with globals by declaring everything
    as global (not the best option).

7
Money Issues
  • What do I need?
  • Merchant Account (a place to put your money, not
    a matress)
  • Security certificate (a reason for people to
    trust you to take their money)
  • A service provider (to transfer money from their
    hands to yours)
  • How do I get that?
  • Merchant Accounts Apply for them through banks
    and such.
  • Security Certificates Provide proof of business
    to a security company (Thawte).
  • Program using an API of a company which has
    access to bank networks (Linkpoint, in our case).

8
The Big Shabanga-Bang How it works on our end.
  • All users are stored in an SQL table (their
    passwords have been encrypted to protect the
    innocent).
  • All transactions are stored in an SQL table (and
    are tagged with a random ID so PHP can tell the
    difference between them).
  • All events are stored in an SQL table (with any
    notes, the time, date, and location, and price
    attached).

9
The Big Shabanga-Bang How it works on their
(Linkpoints) end.
  • We collect the credit card and cost data.
  • We produce an XML string according to Linkpoints
    specifications.
  • Show the code
  • We receive a response in XML indicating the
    success or failure of the transaction, and order
    number, and a message.
  • Show the documentation
  • We store this data in a table, noting the
    servers response and only the last 4 digit of
    the credit card number.

10
Now, Sherman, what did we learn? More about
encapsulation (encapsul-wha-tion?)
  • Encapsulation- keeping tasks apart from each
    other so that we can change algorithms without
    changing the larger program.
  • Using PHP include files helps solve for this
    problem.
  • Show the code (duh)
  • Not using forms as flow control allows us to
    split the tasks into different files.
  • Yep, show the code again.

11
Now, Sherman, what did we learn? Globals and
Security
  • Globalizing variables means they came from
    anywhere.
  • The reason we had to declare each variable global
    was because PHP was running with a safety
    protocol.
  • Show the dang code
  • This opens up doors for people to trick the
    server. We can solve that by explicitly stating
    where the globals are supposed to come from.
  • Okay, last time, show the code.
Write a Comment
User Comments (0)
About PowerShow.com