capturetransaction in the API solution working