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

Get Transaction ID although exception is thrown #136

Open
wittfabian opened this issue Jan 29, 2017 · 0 comments
Open

Get Transaction ID although exception is thrown #136

wittfabian opened this issue Jan 29, 2017 · 0 comments

Comments

@wittfabian
Copy link

Hi,

I use the following code to generate a transaction:

try{
            $paymillRequest = new Paymill\Request( 'PAYMILL_PRIVATE_KEY' );
            $transaction = new Paymill\Models\Request\Transaction();
            $transaction->setAmount('1000')
                        ->setPayment('paymill_payment_id')
                        ->setCurrency('EUR')
                        ->setClient('paymill_client_id')
                        ->setDescription('Premium XYZ');
            $response = $paymillRequest->create($transaction);

        } catch(Exception $e){ 
syslog(....)
}

Tonight I got the following error. According to the webhook, the transaction was created and then failed. The problem is, I am not getting a transaction number at the creation step, because an exception is thrown. The error itself is clear, by the way.

Paymill\Services\PaymillException' with message 'Card blacklisted.' in /.../paymill/paymill/lib/Paymill/Request.php:264
Stack trace:
#0 /.../paymill/paymill/lib/Paymill/Request.php(81): Paymill\Request->_request(Object(Paymill\Models\Request\Transaction), 'create')
#1 /../: Paymill\Request->create(Object(Paymill\Models\Request\Transaction))
#2 {main}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant