-
Notifications
You must be signed in to change notification settings - Fork 18
Home
eyal1 edited this page Mar 11, 2014
·
8 revisions
This wiki will describe the requirements and implementation steps for the Riskified PHP SDK.
The purpose of the SDK is to help merchants integrate with Riskified in a fast and straight forward way on their end, and for Riskified to receive the full order information.
Currently we supply them a sample script that builds the data structure that is sent over the wire. This causes the following problems:
- In some cases, they need us on the other side to tell them what the error is.
- They have no indication of which fields are mandatory and which fields are optional.
- We need to perform several iterations with them until all the order information is full.
- Create the first release of the PHP SDK.
- Integrate the release into the Magento extension and make sure that it works.
- Release the PHP SDK.
The following design goals should be satisfied by the SDK:
- Provide client side validation (give the Merchant informative error messages about missing/invalid data.
- Separate the transport layer from the data models/objects. We should be able to use separate PHP transport mechanisms (such as curl or guzzle) to submit the order information to Riskified.
- Require not external dependencies on other PHP packages. Meaning, the data models should not rely on external PHP packages. In theory only the transport layer should depend on external packages.
- The user should be able to submit an order in either JSON or XML format.
- The classes that need to be implemented are committed in skeleton from into the repository. They are taken directly from the latest integration spec document (version 2.01).
- Each class should be able to validate itself. The optional and required fields appear in the integration spec document.
- The order class should perform the final validation.
- Validation should be limited in the beginning to making sure that the necessary fields are filled. No need to go overboard with field validation.