Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CVV is unsupported #486

Closed
steveklabnik opened this issue Jan 20, 2014 · 1 comment
Closed

CVV is unsupported #486

steveklabnik opened this issue Jan 20, 2014 · 1 comment

Comments

@steveklabnik
Copy link
Contributor

test:

    When I make a POST request to /cards with the body:                                                                                                            
      """                                                                                                                                                          
        {                                                                                                                                                          
          "number": "4111111111111111",                                                                                                                            
          "expiration_month": 12,                                                                                                                                  
          "expiration_year": 2016,                                                                                                                                 
          "cvv": "901"                                                                                                                                             
        }                                                                                                                                                          
      """                                                                                                                                                          

    Then I should get a 201 CREATED status code                                                                                                                    
    And the response is valid according to the "cards" schema                                                                                                      
    And the fields on this card match:                                                                                                                             
    """                                                                                                                                                            
        {                                                                                                                                                          
         "cvv_match": "unsupported"                                                                                                                                
        }                                                                                                                                                          
      """    

result:

<"unsupported"> expected but was                                                                                                                                   
<"yes">. (MiniTest::Assertion)    

Is this just wrong fixture data?

steveklabnik added a commit that referenced this issue Jan 20, 2014
@mjallday
Copy link
Contributor

https://github.com/balanced/balanced-api/blob/revision1/scenarios/cards/cvv_match.yml#L12

Sounds like it's not working as expected. Here's the logic that is supposed to control these fixtures:

{
    None: CSCCheck.NONE,
    '901': CSCCheck.UNKNOWN,
    '902': CSCCheck.FAILED,
}

and

{
    None: AVSPostalCheck.NONE,
    '90211': AVSPostalCheck.UNKNOWN,
    '90210': AVSPostalCheck.FAILED,
}

Everything else should return OK/YES.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants