paynl / sdk

Pay.nl SDK
MIT License
37 stars 46 forks source link

Transaction Not Found when adding recurring #163

Closed zaincb closed 1 year ago

zaincb commented 1 year ago

I am attempting to set up recurring payments. I successfully start a transaction, but when I try to add the transaction as recurring, I receive an error: "100 - Transaction not found".

Here is the code I'm using:

$startData['amount'] = 12.50;
$startData['returnUrl'] = dirname(\Paynl\Helper::getBaseUrl()) . '/return.php';
$startData['testmode'] = 1;

$result = \Paynl\Transaction::start($startData);
$transactionId = $result->getTransactionId();

$recurring = \Paynl\Transaction::addRecurring(array(
    'transactionId' => trim($transactionId),
    'amount' => 10,
    'description' => 'Your recurring payment',
    'extra1' => 'SDK'
));

Am I doing something wrong here? Is recurring only available for direct debits? Any help is appreciated!

escruickshank commented 1 year ago

Thank you for your message. This seems like an API error, rather than an SDK one. Recurring should be available for Visa and Mastercard also (not just direct debits). I will check with our API team and get back to you.

escruickshank commented 1 year ago

Hi @zaincb, do you have the full call for me please? What transaction ID was actually used? If you could please send these answers with your M-code to support@pay.nl that would be great. Thank you!

zaincb commented 1 year ago

Sure