Comments (4)
Hi @alex-grau ,
Thank you for opening the issue. Could you please send us the object (with masked sensitive data) you send in the library request?
Debugging code we see that Adyen\Service\AbstractResource changes this field on the method handleApplicationInfoInRequestPOS, it adds: "applicationInfo":{"adyenLibrary":{"name":"adyen-php-api-library","version":"6.0.1"}} and changes format to base64encoded json (without urlencode!).
Adding the applicationInfo
is an expected behaviour also reformatting should be fine but maybe there is a mismatch in that.
Thank you in advance,
Attila
Adyen
from adyen-php-api-library.
Hello @alex-grau,
Do you have any updates about the issue? Are you still able to send us the object that you send in the library request so we can investigate it further?
kind regards,
Alexandros
from adyen-php-api-library.
Hi @alex-grau ,
Due to inactivity I am closing this issue but please feel free to reopen it in case the issue is still there.
Best,
Attila
Adyen
from adyen-php-api-library.
Hello! Sorry, I was out and not using this library again, until today (and the error still exists, at least for me). The problem is using \Adyen\Service\PosPayment($client);
This is the current code:
$adyenClient = new Adyen\Client();
$adyenClient->setApplicationName($applicationName);
$adyenClient->setXApiKey($apiKey);
$adyenClient->setMerchantAccount($accountId);
$adyenClient->setEnvironment(Adyen\Environment::TEST);
$request = [
'SaleToPOIRequest' => [
'MessageHeader' => [
'ProtocolVersion' => '3.0',
'MessageClass' => 'Service',
'MessageCategory' => 'Payment',
'MessageType' => 'Request',
'SaleID' => $serialNumber,
'ServiceID' => '' . (string)rand(1000000, 9000000) . '',
'POIID' => $serialNumber
],
'PaymentRequest' => ['SaleData' => [
'SaleTransactionID' => [
'TransactionID' => (string)rand(1234, 5678),
'TimeStamp' => (new DateTime())->format(DateTime::ATOM)
],
'SaleToAcquirerData' => 'authorisationType=PreAuth'
],
'PaymentTransaction' => [
'AmountsReq' => [
'Currency' => 'USD',
'RequestedAmount' => 150.00
],
]
]
]
];
$service = new Adyen\Service\PosPayment($adyenClient);
$response = $service->runTenderSync($request);
var_dump($response);
Response.result is "Failure" because it seems that I don't have permisions, BUT, I receive an additional warning in AdditionalResponse: "eyAid2FybmluZ3MiOiAiQXQgU2FsZVRvUE9JUmVxdWVzdCwgZmllbGQgbWVyY2hhbnRBY2NvdW50OiBVbmV4cGVjdGVkIiwgIm1lc3NhZ2UiOiAiU2FsZSB0byBBY3F1aXJlciBEYXRhOiBOb3RBbGxvd2VkIFZhbHVlOiBleHRyYSBkYXRhLCBSZWFzb246IEZhaWxlZCB2YWxpZGF0aW9uIiB9", it means "{ "warnings": "At SaleToPOIRequest, field merchantAccount: Unexpected", "message": "Sale to Acquirer Data: NotAllowed Value: extra data, Reason: Failed validation" }"
But I haven't added that "merchantAccount" on the SaleToPOIRequest. I checked the library and it's on the Adyen\Service\AbstractResource:122, inside addDefaultParametersToRequest method.
from adyen-php-api-library.
Related Issues (20)
- Delete stored payment returns as error HOT 1
- Getting curl timeout on success calls with runTenderSync() on send POS terminal a payment HOT 20
- Please reopen issue #473
- API response not correctly handled HOT 2
- composer require adyen/php-api-library pulling a different version of code than the specified version in the doc HOT 3
- Missing option to get result of the payment session? HOT 2
- CheckoutStateDataValidator does not allow RequestedTestAcquirerResponseCode for testing purposes HOT 2
- CheckoutStateDataValidator removes origin parameter? HOT 4
- Attempted to call an undefined method named "isValidWebhookHMAC" of class "Adyen\Util\HmacSignature"." at Adyen/Service/WebhookReceiver.php line 39 HOT 1
- Fatal error on "Disable stored payment details" API call HOT 1
- Replacement for deprecated RiskManagement service HOT 1
- RecurringApi::deleteTokenForStoredPaymentDetails call fails even though the request is correctly performed and successfully finished HOT 4
- Error using splitCardFundingSources in paymentMethods HOT 3
- Error on PaymentRequest with v16.1.0 HOT 3
- Requesting session API returns failure ( version 17.0.0) HOT 1
- Changes to CreateCheckoutSessionRequest and CreateCheckoutSessionResponse in 17.2.0 break hosted checkout HOT 2
- Checkout Api not up to date HOT 1
- Wrong parameter type in metadata functions HOT 3
- Can you make this library not suck? HOT 1
- Non-nullable billingToken issue for non-recurring PayPal payments HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adyen-php-api-library.