adyen-php-api-library: Getting curl timeout on success calls with runTenderSync() on send POS terminal a payment

You would call it something like:

$adyen = (new Client())->getAdyenClient();
(new PosPayment($adyen))->runTenderAsync($request_body);

See https://docs.adyen.com/point-of-sale/basic-tapi-integration/make-a-payment on what to put in the request body

_Originally posted by @gjghendriks in https://github.com/Adyen/adyen-php-api-library/issues/429#issuecomment-1419143750_

Hi there, I can now send a payment to POS terminal, but some new things came out.

When I call the indicated method ( runTenderSync, not async, becouse I need the return of te call as indicated on https://docs.adyen.com/point-of-sale/basic-tapi-integration/make-a-payment#payment-response ), I get a timeout of your curl call, this happens every time I got a success call, all rejected calls is ok:

“Could not connect to Adyen (https://terminal-api-live.adyen.com/sync). Please check your internet connection and try again. (Network error [errno 28]: Operation timed out after 8001 milliseconds with 0 bytes received)”

How can I increase curl’s wait time or is this something that needs to be fixed on your side?

Another thing, how can I indicate in JSON the properties of the payment, where is it an Debit or Credit and the number of installmnets ?

My example:

{ “SaleToPOIRequest”: { “MessageHeader”: { “ProtocolVersion”: “3.0”, “MessageClass”: “Service”, “MessageCategory”: “Payment”, “MessageType”: “Request”, “ServiceID”: “U19T999P22”, “SaleID”: “0304232”, “POIID”: “V240mPlus-XXXXXXXXX” }, “PaymentRequest”: { “SaleData”: { “SaleTransactionID”: { “TransactionID”: “PP|1|1|0”, “TimeStamp”: “2023-04-03T16:10:52+03:00” } }, “PaymentTransaction”: { “AmountsReq”: { “Currency”: “BRL”, “RequestedAmount”: 1 } } } } }

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 20 (10 by maintainers)

Most upvoted comments

Hi @VictorMetzler,

Thanks for reaching out to us with this issue. Glad to hear you’ve been able to figure out the payment to a POS terminal with this library. The timeout on the curlclient you can set in the Config object that you pass along to the client. This line shows you the key in the config that you can set the timeout. The standard is 13 seconds (int value).

For instalments I recommend taking a look at this docs page (assuming you’re using Brazilian instalments).

Best, Jilling Adyen