signifyd / php Goto Github PK
View Code? Open in Web Editor NEWSignifyd's PHP Library
License: MIT License
Signifyd's PHP Library
License: MIT License
I am using this package inside a Laravel app, i want to validate webhook request, in Laravel , you can get request body using $request->getContents()
, $request->all(),
$request->all()returns PHP array which i
json_encode`'s and passes to https://github.com/signifyd/signifyd-php/blob/master/lib/Core/SignifydAPI.php#L159
Please can you explain, what the structure of $request should be, fields and data type, obviously it should be a string but how is that string generated, from what?
I get wrong hash no matter what i do, it does not match the request header's X-SIGNIFYD-SEC-HMAC-SHA256
Hello,
In Model Product has not sense property $itemHeight, probably you want $itemWeight, right?
IMHO your system lack of a basic feature, the ability to send you not successful transaction, sometime thelf try many time with different cards until success.
Perhaps I'm wrong but you don't create fingerprint on client site?I couldn't find yet any signifyd's JS to integrate in our system that send you that information.
Thank you.
We try install from composer latest version (0.1.6) but couldn't. Seem's its occur throw this line in composer.json - "type:metapackage". When we return to 0.1.5 all install properly
Currently when a call to the API results in an error the only information being logged is the HTTP code returned by the server:
$this->logError("Returned http error: ".$info['http_code'])
Under certain circumstances it is hard to figure out what's the error root cause with just the HTTP code. The logging error message could be easily improved by adding the response returned by the server in order to provide more context.
A couple of examples:
When will v3 return events be added to this SDK?
There's a mismatch between the documentation and the implementation for the Product Model.
According to the documentation it should expose an itemImage attribute:
{
"itemId": "1",
"itemName": "Sparkly sandals",
"itemUrl": "http://mydomain.com/sparkly-sandals",
"itemImage": "http://mydomain.com/images/sparkly-sandals.jpeg",
"itemQuantity": 1,
"itemPrice": 49.99,
"itemWeight": 5
}
But the field is missing from the \Signifyd\Models\Product class.
The issue is present in the library version 0.1.2
There's no method in the \Signifyd\Core\SignifydAPI to call the Update Investigate Label end point described here: https://signifyd.zendesk.com/hc/en-us/articles/206387737-Update-Investigation-Label.
A new method could be provided similar to updatePayment
... in order to be recognized as a stable version by composer.
Currently the tag is 0.1.3
but it should be v0.1.3
.
With the current tag composer install
yields the following message:
The requested package signifyd/signifyd-php ^0.1.3 exists as signifyd/signifyd-php[dev-SDK, dev-master, v0.1.0, v0.1.1, v0.1.2] but these are rejected by your constraint.
For some reason the latest version is not pulling in properly via composer. It simply removes the package completely unless I peg it to a previous version.
Hi! While testing sending transaction, I've received error:
Error: Call to undefined method Signifyd\Core\Response\TransactionsResponse::setError() in Signifyd\Core\Connection->handleResponse() (line 275 of /var/www/html/vendor/signifyd/signifyd-php/lib/Core/Connection.php)
Maybe TransactionsResponse should extend Response class instead of Model and implement the setError() method? Other classed from Response folder extend Response.
I used such code:
$caseApi = new CaseApi(['apiKey' => $this->apiKey]);
$response = $caseApi->createTransaction($transactions_data);
where $transactions_data is array of test values.
Latest release (0.1.2) does not contain the SignifydAPI::updateInvestigationLabel
method.
Could a new release be created in order to make latest code changes available via composer?
Pretty simple fix.
Change both references of "itemQuality" to "itemQuantity" in /lib/Models/Product.php
We recently upgraded from v3.* to v4.0.2 and are still operating on V2 of the API. I am getting an error when attempting to create a case (https://api.signifyd.com/v2/cases) which says a transaction type is required. I am passing one along but I notice in v4.0.0 $type
was removed from the Transactions
class and its $fields
array which is called in CaseModel
which may be the cause. Any help is appreciated.
$caseApi = signifyd_get_case_api();
$case = new \Signifyd\Models\CaseModel($caseDetails);
$caseResponse = $caseApi->createCase($case); // Error
$caseDetails:
[
'purchase' => [...],
'transactions' =>
[
0 =>
[
'transactionId' => '...',
'createdAt' => '2022-09-22T20:20:59+00:00',
'gateway' => '...',
'gatewayStatusCode' => 'SUCCESS',
'paymentMethod' => 'CREDIT_CARD',
'type' => 'AUTHORIZATION', // Type Here
'currency' => 'USD',
'amount' => '43.09',
'checkoutPaymentDetails' => [...]
],
],
'userAccount' => NULL,
]
$case:
'transactions' => [
0 => [
'transactionId' => '...',
'gatewayStatusCode' => 'SUCCESS',
'paymentMethod' => 'CREDIT_CARD',
'checkoutPaymentDetails' => []
'billingAddress' => [...],
'accountHolderName' => NULL,
'accountHolderTaxId' => NULL,
'accountHolderTaxIdCountry' => NULL,
'accountLast4' => NULL,
'abaRoutingNumber' => NULL,
'cardToken' => NULL,
'cardTokenProvider' => NULL,
'cardBin' => '...',
'cardExpiryMonth' => '...',
'cardExpiryYear' => '...',
'cardLast4' => '...',
'cardBrand' => NULL,
'cardFunding' => NULL,
'cardInstallments' => NULL,
'fields' => [...],
'fieldsValidation' => [...],
]
]
Full Error:
<?
Signifyd\Core\Response\CaseResponse::__set_state(array(
'messages' =>
array (
0 => '{"errors":{"transactions[0].type":["This field is required."]}}',
),
'guaranteeEligible' => NULL,
'guaranteeDisposition' => NULL,
'status' => NULL,
'caseId' => NULL,
'score' => NULL,
'uuid' => NULL,
'headline' => NULL,
'orderId' => NULL,
'orderDate' => NULL,
'orderAmount' => NULL,
'associatedTeam' => NULL,
'reviewDisposition' => NULL,
'createdAt' => NULL,
'updatedAt' => NULL,
'orderOutcome' => NULL,
'currency' => NULL,
'adjustedScore' => NULL,
'testInvestigation' => NULL,
'logger' =>
Signifyd\Core\Logging::__set_state(array(
'logger' =>
Monolog\Logger::__set_state(array(
'name' => 'Signifyd PHP Library',
'handlers' =>
array (
0 =>
Monolog\Handler\StreamHandler::__set_state(array(
'level' =>
Monolog\Level::Debug,
'bubble' => true,
'processors' =>
array (
),
'formatter' => NULL,
'streamChunkSize' => 13421772,
'stream' => NULL,
'url' => '...',
'errorMessage' => NULL,
'filePermission' => NULL,
'useLocking' => false,
'dirCreated' => NULL,
)),
),
'processors' =>
array (
),
'microsecondTimestamps' => true,
'timezone' =>
DateTimeZone::__set_state(array(
'timezone_type' => 3,
'timezone' => 'UTC',
)),
'exceptionHandler' => NULL,
'logDepth' => 0,
'detectCycles' => true,
)),
'settings' =>
Signifyd\Core\Settings::__set_state(array(
'apiKey' => '...',
'apiAddress' => 'https://api.signifyd.com/',
'timeout' => 30,
'retry' => true,
'SSLVerification' => false,
'consoleOut' => false,
'logEnabled' => false,
'logFileName' => 'signifyd_core.log',
'logLocation' => '.',
)),
)),
'isError' => false,
'errorMessage' => NULL,
'checkpointAction' => NULL,
'checkpointActionReason' => NULL,
'test' => NULL,
'guaranteeIneligibleReason' => NULL,
'guaranteed' => NULL,
'recommendedAction' => NULL,
'isTest' => NULL,
'customerCaseId' => NULL,
))
...instead of HTTP 201.
I submitted pull request #9 to address this issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.