Hello team,
Im using the following method to add payments to the invoices trought the SDK: sdk-php/PaymentsTest.php at main · invoiceninja/sdk-php · GitHub
Somehow transaction_reference is not arriving, its allways null on IN side, any ideas?
Im using latest version of the SDK and IN version v5.3.85-C81
Regards and thank you for your awesome support!
hillel
August 30, 2022, 6:32am
2
Hi,
It may help to update to the latest version of v5.
@david do you have any thoughts?
david
August 30, 2022, 7:06am
3
@Santukon
I cannot recreate this issue, I wrote a test for it here:
[
'invoice_id' => $invoice['data']['id'],
'amount' => 10
],
],
'transaction_reference' => 'IAMAWESOME'
]);
$this->assertTrue(is_array($payments));
$this->assertEquals('IAMAWESOME', $payments['data']['transaction_reference']);
}
}
Ok will update and let you know thank you,
Oh now I see that you added the transaction reference outside of invoices array. But I can be sending several payments in there, and each has a different transaction reference. I will change it to send a request per payment and let you know.
Thank you!
OK, that works, thank you!