PHP Code - Creating a New Payment for Specific Invoice (API V2)
I want to create a new payment for specific invoice by using PHP client app.
Anybody have done PHP client through Wild Apricot API v2. Please share if you have done any PHP code sample which shows Creating a New Payment for Specific Invoice, it will be great help.
Hi,
JSON structure for creating payment is really simple: https://gist.github.com/DmitriySmirnov/002e7d502bb15005b5f3
If you use php client from https://github.com/WildApricot/ApiSamples/blob/master/PHP/sampleApplication.php
then result code will look like:
https://gist.github.com/DmitriySmirnov/0768302795e76712fa25
FYI: I’m not a PHP developer so the code may contain errors.
-
Sorry but the information you have provided is not enough to say something. Could you please provide server response status code and content?
-
Anonymous commented
Hi Dmitry,
Thank you for the valuable answers.
There is no errors and I have create object as shows in API sample.
Array
(
[Value] => 100
[Invoices] => Array
(
[0] => Array
(
[Id] => 4
))
[Tender] => Array
(
[Id] => 1189054
)[Contact] => Array
(
[Id] => 30612422
)[Comment] => Some comment for administrator
)However, I didn't get any response.
Thanks
Samu -
Anonymous commented
Hi,
Thanks for the reply. But I got following warnings;Notice: Use of undefined constant Value - assumed 'Value' in /var/www/html/x/x.php on line 34
Warning: Illegal offset type in /var/www/html/x/x.php on line 34
Notice: Use of undefined constant Invoices - assumed 'Invoices' in /var/www/html/x/x.php on line 35
Notice: Use of undefined constant Id - assumed 'Id' in /var/www/html/x/x.php on line 39
Warning: Illegal offset type in /var/www/html/x/x.php on line 40
Warning: Illegal offset type in /var/www/html/x/x.php on line 41
Warning: Illegal offset type in /var/www/html/x/x.php on line 41
Notice: Use of undefined constant Tender - assumed 'Tender' in /var/www/html/x/x.php on line 42
Notice: Use of undefined constant Id - assumed 'Id' in /var/www/html/x/x.php on line 44
Warning: Illegal offset type in /var/www/html/x/x.php on line 45
Warning: Illegal offset type in /var/www/html/x/x.php on line 45
Notice: Use of undefined constant Contact - assumed 'Contact' in /var/www/html/x/x.php on line 46
Notice: Use of undefined constant Id - assumed 'Id' in /var/www/html/x/x.php on line 48
Warning: Illegal offset type in /var/www/html/x/x.php on line 49
Warning: Illegal offset type in /var/www/html/x/x.php on line 49
Notice: Use of undefined constant Comment - assumed 'Comment' in /var/www/html/x/x.php on line 50
Warning: Illegal offset type in /var/www/html/x/x.php on line 51
New payment was created. Id: