Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

shopping cart programming

0 views
Skip to first unread message

Delanie

unread,
Aug 19, 2010, 4:36:20 AM8/19/10
to
hi Folks,

i'm into basic web design; advanced scripting makes my brain scream.

can someone point me in the right direction for this stuff?

one of my clients who sells books thru normal payment gateways like Paypal
or USA-epay, as requirements from a new fulfillment house, that orders are
send to them in a plain text file. I'll paste an example of their output
below.

I've set up simple "buy now" paypal buttons, and set up other more complex
parameters on user consoles for shopping carts, but this kind of output is
like "greek" to me, and I've not a clue how to set up any payment gateway to
generate this kind of output. It's sort of like stings of quote-delimited
fields, terminated with carriage returns (CR-LF). Reminds me of a CSV file.

i'm not server-side or database 'savvy'...

here's an example of requested output file in ASCII text:


++++++++++++++++++++++++++++++++++++
"H","INVOICE1","TEST","U25","SHDOME","06/16/2004","John Doe","10 Main
St.","Suite 110","","","Boston","MA","zip","USA","12345","123-4567",""
"D","7777","1","INVOICE1"
"D","9","1","INVOICE1"

+++++++++++++++++++++++++++++++++++++++++

thanks for any hints.

Brian


Geoff Berrow

unread,
Aug 19, 2010, 5:17:47 AM8/19/10
to
On Thu, 19 Aug 2010 01:36:20 -0700, "Delanie" <sh...@cart.com> wrote:

>I've set up simple "buy now" paypal buttons, and set up other more complex
>parameters on user consoles for shopping carts, but this kind of output is
>like "greek" to me, and I've not a clue how to set up any payment gateway to
>generate this kind of output. It's sort of like stings of quote-delimited
>fields, terminated with carriage returns (CR-LF). Reminds me of a CSV file.

It /is/ a csv file. Each position in the CSV file will contain and
item of data and the positions are important which is why you have
space fillers.

Inn this section

"John Doe","10 Main

St.","Suite 110","","","Boston","MA","zip","USA",...

would represent

Name, Address1, Address2, Address3, Address4, City, State, Zip,
Country,...

So if you know what each slot represents, you can fill it with data.

Creating the file is fairly straightforward for a coder, it will
probably be a combination of data you already have and data returned
from the gateway.
--
Geoff Berrow (Put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs www.4theweb.co.uk/rfdmaker

Al Klein

unread,
Aug 25, 2010, 3:45:25 PM8/25/10
to
On Thu, 19 Aug 2010 01:36:20 -0700, "Delanie" <sh...@cart.com> wrote:

>Reminds me of a CSV file.

>here's an example of requested output file in ASCII text:

>++++++++++++++++++++++++++++++++++++
>"H","INVOICE1","TEST","U25","SHDOME","06/16/2004","John Doe","10 Main
>St.","Suite 110","","","Boston","MA","zip","USA","12345","123-4567",""
>"D","7777","1","INVOICE1"
>"D","9","1","INVOICE1"
>
>+++++++++++++++++++++++++++++++++++++++++

Strictly speaking it's not a csv file - csv specifies quoting only if
the field contains a comma, newline or double-quote. But most
programs that will read a strict csv file will read that format as
well.

Just be aware, when you're generating the text file that, since it's
user input, you may get a double-quote character in the text. In that
case you have to escape it with another one:

"H","INVOICE1","TEST","U25","SHDOME","06/16/2004","John Doe","10 Main
St.","Suite
""110""","","","Boston","MA","zip","USA","12345","123-4567",""
"D","7777","1","INVOICE1" "D","9","1","INVOICE1"

(Notice that the 110 in the suite number was entered as "110".) It's
trivial code to replace " with "" - str_replace().

0 new messages