KptiveStudio/KptivePaymentSipsBundle — pull request #3 by alex-pex (2014-05-13 12:28:31+00:00)
Title: Handle response_code

approveAndDeposit method didn't handle "response_code" (payment status) but only "code" (parsing status). Bad payment was considered valid (eg: user canceled, invalid card number, payment refused)

The new process is :
- check "code" value (0 is OK, -1 means response executable failed to parse POST data)
- **check "response_code" value (0 is OK, other values indicates payment error, like user canceling his request or bank refused an expired card)**
- if transaction passes the tests, set transaction responseCode to SUCCESS

Tests are updated