RE: Credit Card Checksum

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 13579
interpreted = N
texte = Nelson -I'm not sure about the formula you've described (credit card verification isn't my area of expertise), but it sounds like you can still use either the $purchase command or the [purchase] tag. You don't need to have WebMerchant to use the purchase command - all it does is add whatever info you've just submitted (billing info, credit card number, etc.) to the current cart and move that cart file from the ShoppingCarts folder to the Orders folder. If you like, you can have all the custom error checking you want, then use the [purchase] tag (put it inside a [showif] or [hideif] context to make sure it only happens if none of the other errors occur) on your ThankYou.tmpl file to perform the credit card checksum and move the cart to the Orders folder. You can also customize the credit card error message by editing the 'ErrorMessages.db' file, which should be in your WebCatalog folder. This way your client can just manually process the files in the Orders folder, which theoretically should all have valid credit card numbers. You can also use [showif] and [listfiles] to check for the presence of that cart number in the Orders folder, before you email off the order. This is all a bit complicated and it may be easier to write a custom AppleScript, but you can do all of this in WebDNA if you like.I hope this helps,Marc Eagle StarNine Technologies http://www.smithmicro.com/>From: WebDNA-Talk@smithmicro.com on Tue, Sep 23, 1997 11:21 AM >Subject: Re: Credit Card Checksum >To: WebDNA-Talk@smithmicro.com > >Basically I'm building a shoppiong cart for a client that wants >everything customized (all the error messages for required fields etc). >The order will be PGP encrypted to a email box. So, there will be some >Applescript here. However, there will not be live verification via >Webmerchant; so I just think maybe it would be nice to at least check >the credit card checksum. I found the following formula off the net, is >it the valid algorithum? Is it the one that Pacific Coast/Starnine use. >I suppose I can use Applescript to parse the field and do a checksum >procedure. Thanks. > >Nelson > ># For a card with an even number of digits, double every odd numbered > # digit and subtract 9 if the product is greater than 9. Add up all >the > # even digits as well as the doubled-odd digits, and the result must >be > # a multiple of 10 or it's not a valid card. If the card has an odd > > # number of digits, perform the same addition doubling the even >numbered > # digits instead. > > >Marc Eagle wrote: > >> Nelson - >> >> >Is there a way to use the functionality of verifying credit card >> >checksum without actually using the >> >$purchase command. Maybe soime [webdna][/webdna] tag will do the >> trick? >> >> No, the checksum is only performed for a $purchase command or a >> [purchase] tag. What are you trying to do? Maybe there's another way >> to approach it. >> >> cheers, >> >> Marc Eagle >> StarNine Technologies >> http://www.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. RE: Credit Card Checksum (Marc Eagle 1997)
  2. RE: Credit Card Checksum (Marc Eagle 1997)
  3. Re: Credit Card Checksum (Nelson Chen 1997)
Nelson -I'm not sure about the formula you've described (credit card verification isn't my area of expertise), but it sounds like you can still use either the $purchase command or the [purchase] tag. You don't need to have WebMerchant to use the purchase command - all it does is add whatever info you've just submitted (billing info, credit card number, etc.) to the current cart and move that cart file from the ShoppingCarts folder to the Orders folder. If you like, you can have all the custom error checking you want, then use the [purchase] tag (put it inside a [showif] or [hideif] context to make sure it only happens if none of the other errors occur) on your ThankYou.tmpl file to perform the credit card checksum and move the cart to the Orders folder. You can also customize the credit card error message by editing the 'ErrorMessages.db' file, which should be in your WebCatalog folder. This way your client can just manually process the files in the Orders folder, which theoretically should all have valid credit card numbers. You can also use [showif] and [listfiles] to check for the presence of that cart number in the Orders folder, before you email off the order. This is all a bit complicated and it may be easier to write a custom AppleScript, but you can do all of this in WebDNA if you like.I hope this helps,Marc Eagle StarNine Technologies http://www.smithmicro.com/>From: WebDNA-Talk@smithmicro.com on Tue, Sep 23, 1997 11:21 AM >Subject: Re: Credit Card Checksum >To: WebDNA-Talk@smithmicro.com > >Basically I'm building a shoppiong cart for a client that wants >everything customized (all the error messages for required fields etc). >The order will be PGP encrypted to a email box. So, there will be some >Applescript here. However, there will not be live verification via >Webmerchant; so I just think maybe it would be nice to at least check >the credit card checksum. I found the following formula off the net, is >it the valid algorithum? Is it the one that Pacific Coast/Starnine use. >I suppose I can use Applescript to parse the field and do a checksum >procedure. Thanks. > >Nelson > ># For a card with an even number of digits, double every odd numbered > # digit and subtract 9 if the product is greater than 9. Add up all >the > # even digits as well as the doubled-odd digits, and the result must >be > # a multiple of 10 or it's not a valid card. If the card has an odd > > # number of digits, perform the same addition doubling the even >numbered > # digits instead. > > >Marc Eagle wrote: > >> Nelson - >> >> >Is there a way to use the functionality of verifying credit card >> >checksum without actually using the >> >$purchase command. Maybe soime [webdna][/webdna] tag will do the >> trick? >> >> No, the checksum is only performed for a $purchase command or a >> [purchase] tag. What are you trying to do? Maybe there's another way >> to approach it. >> >> cheers, >> >> Marc Eagle >> StarNine Technologies >> http://www.smithmicro.com/ Marc Eagle

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Unix 4.0.2b5 (2000) random prob (2003) Searhing for logic (1999) [showif] / [hideif] (1997) Generating Report Totals (1997) is sku a REQUIRED field on NT (1997) Math with Time (1997) Plugin or CGI or both (1997) HTTP header line is too long? (1997) WC2.0 Memory Requirements (1997) Calculating multiple shipping... (1997) Other tags inside the founditems context? (1998) Variables for chat (1997) Summing Fields (1998) WebCat with WebTen (1998) re: Large databases in WebCat (1997) This list needs a digest: rant, rave... (1997) What's the grep? (2004) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) .htaccess to make WebDNA serve HTML (2007)