Re: [PHP] logic for grabbing what we need from user-input addresses for AVS?

2008-10-19 Thread Ashley Sheridan
On Sun, 2008-10-19 at 11:26 -0400, Robert Cummings wrote:

> On Sun, 2008-10-19 at 10:03 +0100, Ashley Sheridan wrote:
> > On Sun, 2008-10-19 at 01:10 -0400, Robert Cummings wrote:
> > > On Sat, 2008-10-18 at 22:56 -0600, Govinda wrote:
> > > > Hi all
> > > > 
> > > > This is not exactly PHP, but an issue that we have to work out in code  
> > > > (whatever we use) -
> > > > I am working on a shopping cart site which will have orders from any  
> > > > country.
> > > > 
> > > > To cut down on fraudulent orders, our cc processor (whatever we call  
> > > > them), to enable "Address Verification System (AVS)",  accepts a var/ 
> > > > value which is "The numeric portion of the street address".  It is  
> > > > "Required for AVS".  Now to get this from what the user input, I can:
> > > > 
> > > > - just read the *numeric* characters off the front of the first (of 2)  
> > > > address text inputs, stopping grabbing them once I reach any non- 
> > > > numeric char., or I could
> > > > - get *any* numeric  chars input in that text area and concatenate  
> > > > them all together (if there is more than one continuous run of them), or
> > > > - get *any* numeric  chars input in *either* of the address text areas  
> > > > and concatenate that all together (if there is more than one  
> > > > continuous run of them), or
> > > > - (what are the other possibilities?)
> > > > 
> > > > I am asking you guys/gals using AVS:  what are they looking for?  The  
> > > > docs make this clear that they want: "The numeric portion of the  
> > > > street address", but just because I can't think of addresses that  
> > > > don't match a pattern I am thinking of does not mean they don't exist  
> > > > or are not valid.  And how should the logic of my algorithm be written  
> > > > if it was just for USA addresses?  ... and more importantly - if I am  
> > > > writing it to handle addresses from any country?
> > > > 
> > > > Thanks for any insight/logic based on experience,  ;-)
> > > 
> > > AVS systems I've used don't ask for the street number. They ask for the
> > > entire address and they do the matching for me and return a code
> > > indicating what portions matched. For one client in particular an AVS
> > > fail allows the order to go through, but it is flagged as peculiar and
> > > requires someone to manually reject or allow the order to be fulfilled.
> > > This was necessary since a lot of AVS failures were encountered for
> > > regular clients.
> > > 
> > > If I had to make a choice given your system, I think I would just grab
> > > the integer value of the first address line. No concatenation, and no
> > > fussing with a second line...
> > > 
> > > $number = (int)$input;
> > > 
> > > 
> > It does sound like a bit of a flawed system you are using though, I
> > mean, some addresses have only house names, not numbers, so there would
> > be no number, and what about business addresses in business centres?
> > "Unit 3 of Suchandsuch Business Centre, 20-30 Somesuch Road..." How
> > would you go about getting the numerical part from that?
> 
> Is this targetted at me? Doesn't seem applicable to my own case since I
> pass the entire address to the payment gateway.
> 
> Cheers,
> Rob.

Not you Rob, don't be so paranoid ;) I was just saying it for Govinda's
benefit, as it seems to be particular to the system he is using, and I
just thought I'd point out a couple of the more obvious problems with
it.


Ash
www.ashleysheridan.co.uk


Re: [PHP] logic for grabbing what we need from user-input addresses for AVS?

2008-10-19 Thread Robert Cummings
On Sun, 2008-10-19 at 10:03 +0100, Ashley Sheridan wrote:
> On Sun, 2008-10-19 at 01:10 -0400, Robert Cummings wrote:
> > On Sat, 2008-10-18 at 22:56 -0600, Govinda wrote:
> > > Hi all
> > > 
> > > This is not exactly PHP, but an issue that we have to work out in code  
> > > (whatever we use) -
> > > I am working on a shopping cart site which will have orders from any  
> > > country.
> > > 
> > > To cut down on fraudulent orders, our cc processor (whatever we call  
> > > them), to enable "Address Verification System (AVS)",  accepts a var/ 
> > > value which is "The numeric portion of the street address".  It is  
> > > "Required for AVS".  Now to get this from what the user input, I can:
> > > 
> > > - just read the *numeric* characters off the front of the first (of 2)  
> > > address text inputs, stopping grabbing them once I reach any non- 
> > > numeric char., or I could
> > > - get *any* numeric  chars input in that text area and concatenate  
> > > them all together (if there is more than one continuous run of them), or
> > > - get *any* numeric  chars input in *either* of the address text areas  
> > > and concatenate that all together (if there is more than one  
> > > continuous run of them), or
> > > - (what are the other possibilities?)
> > > 
> > > I am asking you guys/gals using AVS:  what are they looking for?  The  
> > > docs make this clear that they want: "The numeric portion of the  
> > > street address", but just because I can't think of addresses that  
> > > don't match a pattern I am thinking of does not mean they don't exist  
> > > or are not valid.  And how should the logic of my algorithm be written  
> > > if it was just for USA addresses?  ... and more importantly - if I am  
> > > writing it to handle addresses from any country?
> > > 
> > > Thanks for any insight/logic based on experience,  ;-)
> > 
> > AVS systems I've used don't ask for the street number. They ask for the
> > entire address and they do the matching for me and return a code
> > indicating what portions matched. For one client in particular an AVS
> > fail allows the order to go through, but it is flagged as peculiar and
> > requires someone to manually reject or allow the order to be fulfilled.
> > This was necessary since a lot of AVS failures were encountered for
> > regular clients.
> > 
> > If I had to make a choice given your system, I think I would just grab
> > the integer value of the first address line. No concatenation, and no
> > fussing with a second line...
> > 
> > $number = (int)$input;
> > 
> > 
> It does sound like a bit of a flawed system you are using though, I
> mean, some addresses have only house names, not numbers, so there would
> be no number, and what about business addresses in business centres?
> "Unit 3 of Suchandsuch Business Centre, 20-30 Somesuch Road..." How
> would you go about getting the numerical part from that?

Is this targetted at me? Doesn't seem applicable to my own case since I
pass the entire address to the payment gateway.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] logic for grabbing what we need from user-input addresses for AVS?

2008-10-19 Thread Govinda


On Oct 18, 2008, at 11:10 PM, Robert Cummings wrote:


On Sat, 2008-10-18 at 22:56 -0600, Govinda wrote:


To cut down on fraudulent orders, our cc processor (whatever we call
them), to enable "Address Verification System (AVS)",  ...



 The
docs make this clear that they want: "The numeric portion of the
street address", ...



  And how should the logic of my algorithm be written
if it was just for USA addresses?  ... and more importantly - if I am
writing it to handle addresses from any country?

AVS systems I've used don't ask for the street number. They ask for  
the

entire address and they do the matching for me and return a code
indicating what portions matched. For one client in particular an AVS
fail allows the order to go through, but it is flagged as peculiar and
requires someone to manually reject or allow the order to be  
fulfilled.

This was necessary since a lot of AVS failures were encountered for
regular clients.

If I had to make a choice given your system, I think I would just grab
the integer value of the first address line. No concatenation, and no
fussing with a second line...

   $number = (int)$input;

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP


Yes, here also they want the entire billing data for different checks  
to be run on the card validity (like postal code check, card security  
code check, etc.), but for just this AVS (address) check in  
particular, which I am asking about,  they explicitly state which part  
of that billing data they use:   "The numeric portion of the street  
address"


Thanks all for your replies!

-Govinda
--
(I have so much work that I have never bothered about my resume,  
personal business site, sig file..  nothing.  Nor do I have any fun  
quote generator lined up.  But since it is Sunday, and sig files seem  
to be tolerated well, here's one quote off the top of my head:

"Now we measure power in terms of nourishing ability."
-Maharishi Mahesh Yogi

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] logic for grabbing what we need from user-input addresses for AVS?

2008-10-19 Thread Ashley Sheridan
On Sun, 2008-10-19 at 01:10 -0400, Robert Cummings wrote:
> On Sat, 2008-10-18 at 22:56 -0600, Govinda wrote:
> > Hi all
> > 
> > This is not exactly PHP, but an issue that we have to work out in code  
> > (whatever we use) -
> > I am working on a shopping cart site which will have orders from any  
> > country.
> > 
> > To cut down on fraudulent orders, our cc processor (whatever we call  
> > them), to enable "Address Verification System (AVS)",  accepts a var/ 
> > value which is "The numeric portion of the street address".  It is  
> > "Required for AVS".  Now to get this from what the user input, I can:
> > 
> > - just read the *numeric* characters off the front of the first (of 2)  
> > address text inputs, stopping grabbing them once I reach any non- 
> > numeric char., or I could
> > - get *any* numeric  chars input in that text area and concatenate  
> > them all together (if there is more than one continuous run of them), or
> > - get *any* numeric  chars input in *either* of the address text areas  
> > and concatenate that all together (if there is more than one  
> > continuous run of them), or
> > - (what are the other possibilities?)
> > 
> > I am asking you guys/gals using AVS:  what are they looking for?  The  
> > docs make this clear that they want: "The numeric portion of the  
> > street address", but just because I can't think of addresses that  
> > don't match a pattern I am thinking of does not mean they don't exist  
> > or are not valid.  And how should the logic of my algorithm be written  
> > if it was just for USA addresses?  ... and more importantly - if I am  
> > writing it to handle addresses from any country?
> > 
> > Thanks for any insight/logic based on experience,  ;-)
> 
> AVS systems I've used don't ask for the street number. They ask for the
> entire address and they do the matching for me and return a code
> indicating what portions matched. For one client in particular an AVS
> fail allows the order to go through, but it is flagged as peculiar and
> requires someone to manually reject or allow the order to be fulfilled.
> This was necessary since a lot of AVS failures were encountered for
> regular clients.
> 
> If I had to make a choice given your system, I think I would just grab
> the integer value of the first address line. No concatenation, and no
> fussing with a second line...
> 
> $number = (int)$input;
> 
> Cheers,
> Rob.
> -- 
> http://www.interjinn.com
> Application and Templating Framework for PHP
> 
> 
It does sound like a bit of a flawed system you are using though, I
mean, some addresses have only house names, not numbers, so there would
be no number, and what about business addresses in business centres?
"Unit 3 of Suchandsuch Business Centre, 20-30 Somesuch Road..." How
would you go about getting the numerical part from that?


Ash
www.ashleysheridan.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] logic for grabbing what we need from user-input addresses for AVS?

2008-10-18 Thread Robert Cummings
On Sat, 2008-10-18 at 22:56 -0600, Govinda wrote:
> Hi all
> 
> This is not exactly PHP, but an issue that we have to work out in code  
> (whatever we use) -
> I am working on a shopping cart site which will have orders from any  
> country.
> 
> To cut down on fraudulent orders, our cc processor (whatever we call  
> them), to enable "Address Verification System (AVS)",  accepts a var/ 
> value which is "The numeric portion of the street address".  It is  
> "Required for AVS".  Now to get this from what the user input, I can:
> 
> - just read the *numeric* characters off the front of the first (of 2)  
> address text inputs, stopping grabbing them once I reach any non- 
> numeric char., or I could
> - get *any* numeric  chars input in that text area and concatenate  
> them all together (if there is more than one continuous run of them), or
> - get *any* numeric  chars input in *either* of the address text areas  
> and concatenate that all together (if there is more than one  
> continuous run of them), or
> - (what are the other possibilities?)
> 
> I am asking you guys/gals using AVS:  what are they looking for?  The  
> docs make this clear that they want: "The numeric portion of the  
> street address", but just because I can't think of addresses that  
> don't match a pattern I am thinking of does not mean they don't exist  
> or are not valid.  And how should the logic of my algorithm be written  
> if it was just for USA addresses?  ... and more importantly - if I am  
> writing it to handle addresses from any country?
> 
> Thanks for any insight/logic based on experience,  ;-)

AVS systems I've used don't ask for the street number. They ask for the
entire address and they do the matching for me and return a code
indicating what portions matched. For one client in particular an AVS
fail allows the order to go through, but it is flagged as peculiar and
requires someone to manually reject or allow the order to be fulfilled.
This was necessary since a lot of AVS failures were encountered for
regular clients.

If I had to make a choice given your system, I think I would just grab
the integer value of the first address line. No concatenation, and no
fussing with a second line...

$number = (int)$input;

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] logic for grabbing what we need from user-input addresses for AVS?

2008-10-18 Thread Waynn Lue
AVS generally only exists for us and canada and parts of the uk, if I
remember correctly. Usually they're just looking for the beginning
part of the street address, not the concatenation or anything else
like that. No need for apartment numbers, for example if you're just
looking at avs.

If you're doing a full credit card auth, though, that's a different matter.

Waynn

On 10/18/08, Govinda <[EMAIL PROTECTED]> wrote:
> Hi all
>
> This is not exactly PHP, but an issue that we have to work out in code
> (whatever we use) -
> I am working on a shopping cart site which will have orders from any
> country.
>
> To cut down on fraudulent orders, our cc processor (whatever we call
> them), to enable "Address Verification System (AVS)",  accepts a var/
> value which is "The numeric portion of the street address".  It is
> "Required for AVS".  Now to get this from what the user input, I can:
>
> - just read the *numeric* characters off the front of the first (of 2)
> address text inputs, stopping grabbing them once I reach any non-
> numeric char., or I could
> - get *any* numeric  chars input in that text area and concatenate
> them all together (if there is more than one continuous run of them), or
> - get *any* numeric  chars input in *either* of the address text areas
> and concatenate that all together (if there is more than one
> continuous run of them), or
> - (what are the other possibilities?)
>
> I am asking you guys/gals using AVS:  what are they looking for?  The
> docs make this clear that they want: "The numeric portion of the
> street address", but just because I can't think of addresses that
> don't match a pattern I am thinking of does not mean they don't exist
> or are not valid.  And how should the logic of my algorithm be written
> if it was just for USA addresses?  ... and more importantly - if I am
> writing it to handle addresses from any country?
>
> Thanks for any insight/logic based on experience,  ;-)
>
> -Govinda
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
Sent from my mobile device

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] logic for grabbing what we need from user-input addresses for AVS?

2008-10-18 Thread Govinda

Hi all

This is not exactly PHP, but an issue that we have to work out in code  
(whatever we use) -
I am working on a shopping cart site which will have orders from any  
country.


To cut down on fraudulent orders, our cc processor (whatever we call  
them), to enable "Address Verification System (AVS)",  accepts a var/ 
value which is "The numeric portion of the street address".  It is  
"Required for AVS".  Now to get this from what the user input, I can:


- just read the *numeric* characters off the front of the first (of 2)  
address text inputs, stopping grabbing them once I reach any non- 
numeric char., or I could
- get *any* numeric  chars input in that text area and concatenate  
them all together (if there is more than one continuous run of them), or
- get *any* numeric  chars input in *either* of the address text areas  
and concatenate that all together (if there is more than one  
continuous run of them), or

- (what are the other possibilities?)

I am asking you guys/gals using AVS:  what are they looking for?  The  
docs make this clear that they want: "The numeric portion of the  
street address", but just because I can't think of addresses that  
don't match a pattern I am thinking of does not mean they don't exist  
or are not valid.  And how should the logic of my algorithm be written  
if it was just for USA addresses?  ... and more importantly - if I am  
writing it to handle addresses from any country?


Thanks for any insight/logic based on experience,  ;-)

-Govinda

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php