Changeset 44

Show
Ignore:
Timestamp:
04/15/08 22:15:58 (4 years ago)
Author:
tim
Message:

Implements RetryTransaction? to the best of my knowledge

Location:
trunk/fpys
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/fpys/client.py

    r43 r44  
    109109        # Hackish at best...  
    110110        root_tag = document.getroot().tag 
    111         for tag_name in ["PayResponse", "RefundResponse", "ReserveResponse", "SettleResponse"]: 
     111        for tag_name in ["PayResponse", "RefundResponse", "ReserveResponse", 
     112                         "RetryTransactionResponse", "SettleResponse"]: 
    112113            if self.success and root_tag.find(tag_name) >= 0: 
    113114                self.transaction = TransactionResponse() 
  • trunk/fpys/tests/client_test.py

    r43 r44  
    201201    assert response.transaction.id == "134OLF7MHB2L4V9T54RHADQ9FCK5NLVZHDC" 
    202202 
    203 # def test_retry(): 
    204 #     response = fps_client.retryTransaction("123") 
    205 #     assert response.success == True 
     203def test_retry(): 
     204    response = fps_client.retryTransaction("123") 
     205    assert response.success == True 
     206    assert response.transaction.status == "Initiated" 
    206207 
    207208def test_settle_over_amount(): 
  • trunk/fpys/tests/wsgi_responder.py

    r43 r44  
    8888 
    8989    def RetryTransaction(self, environ): 
    90         response = """ """ 
     90        response = """<ns0:RetryTransactionResponse xmlns:ns0="http://fps.amazonaws.com/doc/2007-01-08/"><ns0:TransactionResponse><TransactionId>134OLF7MHB2L4V9T54RHADQ9FCK5NLVZHDC</TransactionId><Status>Initiated</Status></ns0:TransactionResponse><Status>Success</Status><RequestId>a412e705-389e-4579-ad78-eee5bb611467:0</RequestId></ns0:RetryTransactionResponse>""" 
    9191        return [response] 
    9292