Version Notes
* Support for SagePay server gateway
* Support for Transarmor gateway
* New integration process support
* Historical orders script upgraded
Download this release
Release Info
| Developer | Riskified_Mage |
| Extension | riskified_magento |
| Version | 1.0.6.4 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0.6.3 to 1.0.6.4
- app/code/community/Riskified/Full/.DS_Store +0 -0
- app/code/community/Riskified/Full/Helper/Order.php +52 -22
- app/code/community/Riskified/Full/Model/Observer.php +8 -4
- app/code/community/Riskified/Full/Test/.DS_Store +0 -0
- app/code/community/Riskified/Full/controllers/ResponseController.php +35 -10
- app/code/community/Riskified/Full/etc/config.xml +1 -1
- app/design/adminhtml/default/default/template/full/jsinit.phtml +3 -1
- lib/riskified_php_sdk/sample/callback.php +1 -1
- lib/riskified_php_sdk/sample/order_full_flow.php +199 -0
- lib/riskified_php_sdk/sample/order_marketplace_create.php +175 -0
- lib/riskified_php_sdk/sample/{order_webhook.php → order_simple_submit.php} +161 -216
- lib/riskified_php_sdk/sample/run_callback_server.sh +1 -1
- lib/riskified_php_sdk/sample/upload_historical.php +1 -1
- lib/riskified_php_sdk/src/Riskified/Common/Env.php +1 -1
- lib/riskified_php_sdk/src/Riskified/Common/Exception/BaseException.php +1 -1
- lib/riskified_php_sdk/src/Riskified/Common/Riskified.php +1 -1
- lib/riskified_php_sdk/src/Riskified/Common/Signature/HttpDataSignature.php +1 -1
- lib/riskified_php_sdk/src/Riskified/Common/Validations.php +1 -1
- lib/riskified_php_sdk/src/Riskified/DecisionNotification/Exception/AuthorizationException.php +1 -1
- lib/riskified_php_sdk/src/Riskified/DecisionNotification/Exception/BadHeaderException.php +1 -1
- lib/riskified_php_sdk/src/Riskified/DecisionNotification/Exception/BadPostJsonException.php +1 -1
- lib/riskified_php_sdk/src/Riskified/DecisionNotification/Exception/NotificationException.php +1 -1
- lib/riskified_php_sdk/src/Riskified/DecisionNotification/Model/Notification.php +1 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Exception/ClassMismatchPropertyException.php +1 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Exception/CurlException.php +1 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Exception/FormatMismatchPropertyException.php +1 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Exception/InvalidPropertyException.php +1 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Exception/MalformedJsonException.php +1 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Exception/MissingPropertyException.php +1 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Exception/MultiplePropertiesException.php +1 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Exception/PropertyException.php +1 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Exception/TypeMismatchPropertyException.php +1 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Exception/UnsuccessfulActionException.php +1 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/AbstractModel.php +1 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/Address.php +1 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/Attribute.php +1 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/AuthorizationError.php +30 -0
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/Checkout.php +23 -0
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/ClientDetails.php +1 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/Customer.php +5 -2
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/DiscountCode.php +1 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/Fulfillment.php +17 -28
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/FulfillmentDetails.php +37 -0
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/LineItem.php +7 -4
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/Order.php +7 -3
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/OrderCancellation.php +1 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/PaymentDetails.php +1 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/Refund.php +1 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/RefundDetails.php +1 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/Seller.php +31 -0
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/ShippingLine.php +1 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/SocialDetails.php +37 -0
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/TaxLine.php +1 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Transport/AbstractTransport.php +40 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Transport/CurlTransport.php +1 -1
- lib/riskified_php_sdk/src/Riskified/autoloader.php +1 -1
- package.xml +8 -7
app/code/community/Riskified/Full/.DS_Store
DELETED
|
Binary file
|
app/code/community/Riskified/Full/Helper/Order.php
CHANGED
|
@@ -3,6 +3,7 @@
|
|
| 3 |
require_once(Mage::getBaseDir('lib') . DIRECTORY_SEPARATOR . 'riskified_php_sdk' . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'Riskified' . DIRECTORY_SEPARATOR . 'autoloader.php');
|
| 4 |
use Riskified\Common\Riskified;
|
| 5 |
use Riskified\Common\Signature;
|
|
|
|
| 6 |
use Riskified\OrderWebhook\Model;
|
| 7 |
use Riskified\OrderWebhook\Transport;
|
| 8 |
use Riskified\DecisionNotification\Model\Notification as DecisionNotification;
|
|
@@ -61,6 +62,8 @@ class Riskified_Full_Helper_Order extends Mage_Core_Helper_Abstract {
|
|
| 61 |
break;
|
| 62 |
}
|
| 63 |
|
|
|
|
|
|
|
| 64 |
$eventData['response'] = $response;
|
| 65 |
|
| 66 |
Mage::dispatchEvent(
|
|
@@ -165,8 +168,14 @@ class Riskified_Full_Helper_Order extends Mage_Core_Helper_Abstract {
|
|
| 165 |
$headers = array($header_name => $request->getHeader($header_name));
|
| 166 |
$body = $request->getRawBody();
|
| 167 |
Mage::helper('full/log')->log("Received new notification request with headers: " . json_encode($headers) . " and body: $body. Trying to parse.");
|
| 168 |
-
return new
|
| 169 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
}
|
| 171 |
|
| 172 |
private $version;
|
|
@@ -180,7 +189,7 @@ class Riskified_Full_Helper_Order extends Mage_Core_Helper_Abstract {
|
|
| 180 |
$sdkVersion = Riskified::VERSION;
|
| 181 |
|
| 182 |
Mage::helper('full/log')->log("Riskified initSdk() - shop: $shopDomain, env: $env, token: $authToken, extension_version: $this->version, sdk_version: $sdkVersion");
|
| 183 |
-
Riskified::init($shopDomain, $authToken, $env,
|
| 184 |
}
|
| 185 |
|
| 186 |
private function getHeaders() {
|
|
@@ -195,7 +204,7 @@ class Riskified_Full_Helper_Order extends Mage_Core_Helper_Abstract {
|
|
| 195 |
|
| 196 |
private function getOrderCancellation($model) {
|
| 197 |
$orderCancellation = new Model\OrderCancellation(array_filter(array(
|
| 198 |
-
'id' => $
|
| 199 |
'cancelled_at' => $this->formatDateAsIso8601($this->getCancelledAt($model)),
|
| 200 |
'cancel_reason' => 'Cancelled by merchant'
|
| 201 |
)));
|
|
@@ -207,7 +216,7 @@ class Riskified_Full_Helper_Order extends Mage_Core_Helper_Abstract {
|
|
| 207 |
|
| 208 |
private function getOrder($model) {
|
| 209 |
$order_array = array(
|
| 210 |
-
'id' => $
|
| 211 |
'name' => $model->getIncrementId(),
|
| 212 |
'email' => $model->getCustomerEmail(),
|
| 213 |
'created_at' => $this->formatDateAsIso8601($model->getCreatedAt()),
|
|
@@ -227,7 +236,8 @@ class Riskified_Full_Helper_Order extends Mage_Core_Helper_Abstract {
|
|
| 227 |
'cancelled_at' => $this->formatDateAsIso8601($this->getCancelledAt($model)),
|
| 228 |
'financial_status' => $model->getState(),
|
| 229 |
'fulfillment_status' => $model->getStatus(),
|
| 230 |
-
'
|
|
|
|
| 231 |
);
|
| 232 |
|
| 233 |
if (Mage::getSingleton('admin/session')->isLoggedIn()) {
|
|
@@ -269,13 +279,21 @@ class Riskified_Full_Helper_Order extends Mage_Core_Helper_Abstract {
|
|
| 269 |
$customer_props['created_at'] = $this->formatDateAsIso8601($customer_details->getCreatedAt());
|
| 270 |
$customer_props['updated_at'] = $this->formatDateAsIso8601($customer_details->getUpdatedAt());
|
| 271 |
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 279 |
}
|
| 280 |
}
|
| 281 |
|
|
@@ -320,7 +338,6 @@ class Riskified_Full_Helper_Order extends Mage_Core_Helper_Abstract {
|
|
| 320 |
$protection_eligibility = $payment->getAdditionalInformation('paypal_protection_eligibility');
|
| 321 |
$payment_status = $payment->getAdditionalInformation('paypal_payment_status');
|
| 322 |
$pending_reason = $payment->getAdditionalInformation('paypal_pending_reason');
|
| 323 |
-
|
| 324 |
return new Model\PaymentDetails(array_filter(array(
|
| 325 |
'authorization_id' => $transactionId,
|
| 326 |
'payer_email' => $payer_email,
|
|
@@ -330,7 +347,6 @@ class Riskified_Full_Helper_Order extends Mage_Core_Helper_Abstract {
|
|
| 330 |
'payment_status' => $payment_status,
|
| 331 |
'pending_reason' => $pending_reason
|
| 332 |
), 'strlen'));
|
| 333 |
-
|
| 334 |
case 'paypal_direct':
|
| 335 |
case 'paypaluk_direct':
|
| 336 |
$avs_result_code = $payment->getAdditionalInformation('paypal_avs_code');
|
|
@@ -338,17 +354,32 @@ class Riskified_Full_Helper_Order extends Mage_Core_Helper_Abstract {
|
|
| 338 |
$credit_card_number = $payment->getCcLast4();
|
| 339 |
$credit_card_company = $payment->getCcType();
|
| 340 |
break;
|
| 341 |
-
|
| 342 |
case 'sagepaydirectpro':
|
|
|
|
|
|
|
| 343 |
$sage = $model->getSagepayInfo();
|
| 344 |
-
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 348 |
break;
|
| 349 |
|
| 350 |
default:
|
| 351 |
Mage::helper('full/log')->log("unknown gateway:" . $gateway_name);
|
|
|
|
| 352 |
break;
|
| 353 |
}
|
| 354 |
} catch (Exception $e) {
|
|
@@ -368,8 +399,7 @@ class Riskified_Full_Helper_Order extends Mage_Core_Helper_Abstract {
|
|
| 368 |
if (!isset($avs_result_code)) {
|
| 369 |
$avs_result_code = $payment->getCcAvsStatus();
|
| 370 |
}
|
| 371 |
-
|
| 372 |
-
if (!isset($credit_card_number)) {
|
| 373 |
$credit_card_number = "XXXX-XXXX-XXXX-" . $credit_card_number;
|
| 374 |
}
|
| 375 |
$credit_card_bin = $payment->getAdditionalInformation('riskified_cc_bin');
|
| 3 |
require_once(Mage::getBaseDir('lib') . DIRECTORY_SEPARATOR . 'riskified_php_sdk' . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'Riskified' . DIRECTORY_SEPARATOR . 'autoloader.php');
|
| 4 |
use Riskified\Common\Riskified;
|
| 5 |
use Riskified\Common\Signature;
|
| 6 |
+
use Riskified\Common\Validations;
|
| 7 |
use Riskified\OrderWebhook\Model;
|
| 8 |
use Riskified\OrderWebhook\Transport;
|
| 9 |
use Riskified\DecisionNotification\Model\Notification as DecisionNotification;
|
| 62 |
break;
|
| 63 |
}
|
| 64 |
|
| 65 |
+
Mage::helper('full/log')->log('Order posted successfully - invoking post order event');
|
| 66 |
+
|
| 67 |
$eventData['response'] = $response;
|
| 68 |
|
| 69 |
Mage::dispatchEvent(
|
| 168 |
$headers = array($header_name => $request->getHeader($header_name));
|
| 169 |
$body = $request->getRawBody();
|
| 170 |
Mage::helper('full/log')->log("Received new notification request with headers: " . json_encode($headers) . " and body: $body. Trying to parse.");
|
| 171 |
+
return new DecisionNotification(new Signature\HttpDataSignature(), $headers, $body);
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
public function getOrderOrigId($order) {
|
| 175 |
+
if(!$order) {
|
| 176 |
+
return null;
|
| 177 |
+
}
|
| 178 |
+
return $order->getId() . '_' . $order->getIncrementId();
|
| 179 |
}
|
| 180 |
|
| 181 |
private $version;
|
| 189 |
$sdkVersion = Riskified::VERSION;
|
| 190 |
|
| 191 |
Mage::helper('full/log')->log("Riskified initSdk() - shop: $shopDomain, env: $env, token: $authToken, extension_version: $this->version, sdk_version: $sdkVersion");
|
| 192 |
+
Riskified::init($shopDomain, $authToken, $env, Validations::SKIP);
|
| 193 |
}
|
| 194 |
|
| 195 |
private function getHeaders() {
|
| 204 |
|
| 205 |
private function getOrderCancellation($model) {
|
| 206 |
$orderCancellation = new Model\OrderCancellation(array_filter(array(
|
| 207 |
+
'id' => $this->getOrderOrigId($model),
|
| 208 |
'cancelled_at' => $this->formatDateAsIso8601($this->getCancelledAt($model)),
|
| 209 |
'cancel_reason' => 'Cancelled by merchant'
|
| 210 |
)));
|
| 216 |
|
| 217 |
private function getOrder($model) {
|
| 218 |
$order_array = array(
|
| 219 |
+
'id' => $this->getOrderOrigId($model),
|
| 220 |
'name' => $model->getIncrementId(),
|
| 221 |
'email' => $model->getCustomerEmail(),
|
| 222 |
'created_at' => $this->formatDateAsIso8601($model->getCreatedAt()),
|
| 236 |
'cancelled_at' => $this->formatDateAsIso8601($this->getCancelledAt($model)),
|
| 237 |
'financial_status' => $model->getState(),
|
| 238 |
'fulfillment_status' => $model->getStatus(),
|
| 239 |
+
'vendor_id' => $model->getStoreId(),
|
| 240 |
+
'vendor_name' => $model->getStoreName()
|
| 241 |
);
|
| 242 |
|
| 243 |
if (Mage::getSingleton('admin/session')->isLoggedIn()) {
|
| 279 |
$customer_props['created_at'] = $this->formatDateAsIso8601($customer_details->getCreatedAt());
|
| 280 |
$customer_props['updated_at'] = $this->formatDateAsIso8601($customer_details->getUpdatedAt());
|
| 281 |
|
| 282 |
+
try {
|
| 283 |
+
$customer_orders = Mage::getModel('sales/order')->getCollection()->addFieldToFilter('customer_id', $customer_id);
|
| 284 |
+
$customer_orders_count = $customer_orders->getSize();
|
| 285 |
+
|
| 286 |
+
$customer_props['orders_count'] = $customer_orders_count;
|
| 287 |
+
if ($customer_orders_count) {
|
| 288 |
+
$customer_props['last_order_id'] = $customer_orders->getLastItem()->getId();
|
| 289 |
+
$total_spent = $customer_orders
|
| 290 |
+
->addExpressionFieldToSelect('sum_total', 'SUM(base_grand_total)', 'base_grand_total')
|
| 291 |
+
->fetchItem()->getSumTotal();
|
| 292 |
+
$customer_props['total_spent'] = $total_spent;
|
| 293 |
+
}
|
| 294 |
+
} catch (Exception $e) {
|
| 295 |
+
Mage::helper('full/log')->logException($e);
|
| 296 |
+
Mage::getSingleton('adminhtml/session')->addError('Riskified extension: ' . $e->getMessage());
|
| 297 |
}
|
| 298 |
}
|
| 299 |
|
| 338 |
$protection_eligibility = $payment->getAdditionalInformation('paypal_protection_eligibility');
|
| 339 |
$payment_status = $payment->getAdditionalInformation('paypal_payment_status');
|
| 340 |
$pending_reason = $payment->getAdditionalInformation('paypal_pending_reason');
|
|
|
|
| 341 |
return new Model\PaymentDetails(array_filter(array(
|
| 342 |
'authorization_id' => $transactionId,
|
| 343 |
'payer_email' => $payer_email,
|
| 347 |
'payment_status' => $payment_status,
|
| 348 |
'pending_reason' => $pending_reason
|
| 349 |
), 'strlen'));
|
|
|
|
| 350 |
case 'paypal_direct':
|
| 351 |
case 'paypaluk_direct':
|
| 352 |
$avs_result_code = $payment->getAdditionalInformation('paypal_avs_code');
|
| 354 |
$credit_card_number = $payment->getCcLast4();
|
| 355 |
$credit_card_company = $payment->getCcType();
|
| 356 |
break;
|
|
|
|
| 357 |
case 'sagepaydirectpro':
|
| 358 |
+
case 'sage_pay_form':
|
| 359 |
+
case 'sagepayserver':
|
| 360 |
$sage = $model->getSagepayInfo();
|
| 361 |
+
if ($sage) {
|
| 362 |
+
$avs_result_code = $sage->getData('address_result');
|
| 363 |
+
$cvv_result_code = $sage->getData('cv2result');
|
| 364 |
+
$credit_card_number = $sage->getData('last_four_digits');
|
| 365 |
+
$credit_card_company = $sage->getData('card_type');
|
| 366 |
+
//Mage::helper('full/log')->log("sagepay payment (".$gateway_name.") additional info: ".PHP_EOL.var_export($sage->getAdditionalInformation(), 1));
|
| 367 |
+
Mage::helper('full/log')->log("sagepay payment (".$gateway_name.") additional info: ".PHP_EOL.var_export($payment->getAdditionalInformation(), 1));
|
| 368 |
+
}
|
| 369 |
+
else {
|
| 370 |
+
Mage::helper('full/log')->log("sagepay payment (".$gateway_name.") - getSagepayInfo returned null object");
|
| 371 |
+
}
|
| 372 |
+
break;
|
| 373 |
+
|
| 374 |
+
case 'transarmor':
|
| 375 |
+
$avs_result_code = $payment->getAdditionalInformation('avs_response');
|
| 376 |
+
$cvv_result_code = $payment->getAdditionalInformation('cvv2_response');
|
| 377 |
+
Mage::helper('full/log')->log("transarmor payment additional info: ".PHP_EOL.var_export($payment->getAdditionalInformation(), 1));
|
| 378 |
break;
|
| 379 |
|
| 380 |
default:
|
| 381 |
Mage::helper('full/log')->log("unknown gateway:" . $gateway_name);
|
| 382 |
+
Mage::helper('full/log')->log("Gateway payment (".$gateway_name.") additional info: ".PHP_EOL.var_export($payment->getAdditionalInformation(), 1));
|
| 383 |
break;
|
| 384 |
}
|
| 385 |
} catch (Exception $e) {
|
| 399 |
if (!isset($avs_result_code)) {
|
| 400 |
$avs_result_code = $payment->getCcAvsStatus();
|
| 401 |
}
|
| 402 |
+
if (isset($credit_card_number)) {
|
|
|
|
| 403 |
$credit_card_number = "XXXX-XXXX-XXXX-" . $credit_card_number;
|
| 404 |
}
|
| 405 |
$credit_card_bin = $payment->getAdditionalInformation('riskified_cc_bin');
|
app/code/community/Riskified/Full/Model/Observer.php
CHANGED
|
@@ -206,11 +206,15 @@ class Riskified_Full_Model_Observer {
|
|
| 206 |
if ($newState
|
| 207 |
&& ($newState != $currentState || $newStatus != $currentStatus)
|
| 208 |
&& Mage::helper('full')->getConfigStatusControlActive()) {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 209 |
$order->setState($newState, $newStatus, $description);
|
| 210 |
-
Mage::helper('full/log')->log("
|
| 211 |
$changed=true;
|
| 212 |
} elseif ($description && $riskifiedStatus != $riskifiedOldStatus) {
|
| 213 |
-
Mage::helper('full/log')->log("
|
| 214 |
$order->addStatusHistoryComment($description);
|
| 215 |
$changed=true;
|
| 216 |
} else {
|
|
@@ -340,9 +344,9 @@ class Riskified_Full_Model_Observer {
|
|
| 340 |
Mage::helper('full/order')->updateOrder($order, $status, $oldStatus, $description);
|
| 341 |
}
|
| 342 |
|
| 343 |
-
$
|
| 344 |
|
| 345 |
-
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__("Order #$
|
| 346 |
} else {
|
| 347 |
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__("Malformed response from Riskified"));
|
| 348 |
}
|
| 206 |
if ($newState
|
| 207 |
&& ($newState != $currentState || $newStatus != $currentStatus)
|
| 208 |
&& Mage::helper('full')->getConfigStatusControlActive()) {
|
| 209 |
+
if ($newState == Mage_Sales_Model_Order::STATE_CANCELED) {
|
| 210 |
+
Mage::helper('full/log')->log("Order '" . $order->getId() . "' should be canceled - calling cancel method");
|
| 211 |
+
$order->cancel();
|
| 212 |
+
}
|
| 213 |
$order->setState($newState, $newStatus, $description);
|
| 214 |
+
Mage::helper('full/log')->log("Updated order '" . $order->getId() . "' to: state: '$newState', status: '$newStatus', description: '$description'");
|
| 215 |
$changed=true;
|
| 216 |
} elseif ($description && $riskifiedStatus != $riskifiedOldStatus) {
|
| 217 |
+
Mage::helper('full/log')->log("Updated order " . $order->getId() . " history comment to: " . $description);
|
| 218 |
$order->addStatusHistoryComment($description);
|
| 219 |
$changed=true;
|
| 220 |
} else {
|
| 344 |
Mage::helper('full/order')->updateOrder($order, $status, $oldStatus, $description);
|
| 345 |
}
|
| 346 |
|
| 347 |
+
$name = $order->getIncrementId();
|
| 348 |
|
| 349 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__("Order #$name was successfully updated at Riskified"));
|
| 350 |
} else {
|
| 351 |
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__("Malformed response from Riskified"));
|
| 352 |
}
|
app/code/community/Riskified/Full/Test/.DS_Store
DELETED
|
Binary file
|
app/code/community/Riskified/Full/controllers/ResponseController.php
CHANGED
|
@@ -15,18 +15,25 @@ class Riskified_Full_ResponseController extends Mage_Core_Controller_Front_Actio
|
|
| 15 |
try {
|
| 16 |
$notification = $helper->parseRequest($request);
|
| 17 |
$id = $notification->id;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
|
|
|
| 30 |
}
|
| 31 |
} catch (Riskified\DecisionNotification\Exception\AuthorizationException $e) {
|
| 32 |
$logger->logException($e);
|
|
@@ -38,6 +45,7 @@ class Riskified_Full_ResponseController extends Mage_Core_Controller_Front_Actio
|
|
| 38 |
$msg = "JSON Parsing Error.";
|
| 39 |
} catch (Exception $e) {
|
| 40 |
$logger->log("ERROR: while processing notification for order $id");
|
|
|
|
| 41 |
$statusCode = 500;
|
| 42 |
$msg = "Internal Error";
|
| 43 |
}
|
|
@@ -45,6 +53,23 @@ class Riskified_Full_ResponseController extends Mage_Core_Controller_Front_Actio
|
|
| 45 |
$response->setHttpResponseCode($statusCode);
|
| 46 |
$response->setHeader('Content-Type', 'application/json');
|
| 47 |
$response->setBody('{ "order" : { "id" : "' . $id . '", "description" : "' . $msg .'" } }');
|
|
|
|
| 48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
}
|
| 50 |
}
|
| 15 |
try {
|
| 16 |
$notification = $helper->parseRequest($request);
|
| 17 |
$id = $notification->id;
|
| 18 |
+
if ($notification-> status == 'test' && $id == 0) {
|
| 19 |
+
$statusCode = 200;
|
| 20 |
+
$msg = 'Test notification received successfully';
|
| 21 |
+
Mage::helper('full/log')->log("Test Notification received: ", serialize($notification));
|
| 22 |
+
}
|
| 23 |
+
else {
|
| 24 |
|
| 25 |
+
Mage::helper('full/log')->log("Notification received: ", serialize($notification));
|
| 26 |
|
| 27 |
+
$order = $this->loadOrderByOrigId($id);
|
| 28 |
+
if (!$order || !$order->getId()) {
|
| 29 |
+
$logger->log("ERROR: Unable to load order (" . $id . ")");
|
| 30 |
+
$statusCode = 400;
|
| 31 |
+
$msg = 'Could not find order to update.';
|
| 32 |
+
} else {
|
| 33 |
+
$helper->updateOrder($order, $notification->status, $notification->oldStatus, $notification->description);
|
| 34 |
+
$statusCode = 200;
|
| 35 |
+
$msg = 'Order-Update event triggered.';
|
| 36 |
+
}
|
| 37 |
}
|
| 38 |
} catch (Riskified\DecisionNotification\Exception\AuthorizationException $e) {
|
| 39 |
$logger->logException($e);
|
| 45 |
$msg = "JSON Parsing Error.";
|
| 46 |
} catch (Exception $e) {
|
| 47 |
$logger->log("ERROR: while processing notification for order $id");
|
| 48 |
+
$logger->logException($e);
|
| 49 |
$statusCode = 500;
|
| 50 |
$msg = "Internal Error";
|
| 51 |
}
|
| 53 |
$response->setHttpResponseCode($statusCode);
|
| 54 |
$response->setHeader('Content-Type', 'application/json');
|
| 55 |
$response->setBody('{ "order" : { "id" : "' . $id . '", "description" : "' . $msg .'" } }');
|
| 56 |
+
}
|
| 57 |
|
| 58 |
+
private function loadOrderByOrigId($full_orig_id) {
|
| 59 |
+
if(!$full_orig_id) {
|
| 60 |
+
return null;
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
$magento_ids = explode("_",$full_orig_id);
|
| 64 |
+
$order_id = $magento_ids[0];
|
| 65 |
+
$increment_id = $magento_ids[1];
|
| 66 |
+
|
| 67 |
+
if ($order_id && $increment_id) {
|
| 68 |
+
return Mage::getModel('sales/order')->getCollection()
|
| 69 |
+
->addFieldToFilter('entity_id', $order_id)
|
| 70 |
+
->addFieldToFilter('increment_id',$increment_id)
|
| 71 |
+
->getFirstItem();
|
| 72 |
+
}
|
| 73 |
+
return Mage::getModel('sales/order')->load($order_id);
|
| 74 |
}
|
| 75 |
}
|
app/code/community/Riskified/Full/etc/config.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Riskified_Full>
|
| 5 |
-
<version>1.0.6.
|
| 6 |
</Riskified_Full>
|
| 7 |
</modules>
|
| 8 |
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Riskified_Full>
|
| 5 |
+
<version>1.0.6.4</version>
|
| 6 |
</Riskified_Full>
|
| 7 |
</modules>
|
| 8 |
|
app/design/adminhtml/default/default/template/full/jsinit.phtml
CHANGED
|
@@ -158,11 +158,13 @@ function riskifiedOnSave(event){
|
|
| 158 |
|
| 159 |
function riskifiedActivation(riskifiedPassword,riskifiedShopDomain,generatedKey){
|
| 160 |
var keys = "<?php echo $allkeys ?>";
|
|
|
|
| 161 |
var activateURL = 'https://' + '<?php echo Mage::helper("full/order")->getRiskifiedDomain()?>/magento/activate';
|
|
|
|
| 162 |
|
| 163 |
new Ajax.Request(activateURL, {
|
| 164 |
method: 'POST',
|
| 165 |
-
parameters: "shop_url="+riskifiedShopDomain+"&password="+riskifiedPassword+"&auth_token="+generatedKey+"&gws="+keys
|
| 166 |
onSuccess:
|
| 167 |
function(response) {
|
| 168 |
hideRiskifiedNotice("#magento-notice");
|
| 158 |
|
| 159 |
function riskifiedActivation(riskifiedPassword,riskifiedShopDomain,generatedKey){
|
| 160 |
var keys = "<?php echo $allkeys ?>";
|
| 161 |
+
var extensionVersion = '<?php echo Mage::helper('full')->getExtensionVersion()?>'
|
| 162 |
var activateURL = 'https://' + '<?php echo Mage::helper("full/order")->getRiskifiedDomain()?>/magento/activate';
|
| 163 |
+
var shopHostUrl = "<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB)?>";
|
| 164 |
|
| 165 |
new Ajax.Request(activateURL, {
|
| 166 |
method: 'POST',
|
| 167 |
+
parameters: "shop_url="+riskifiedShopDomain+"&password="+riskifiedPassword+"&auth_token="+generatedKey+"&gws="+keys+"&host_url="+shopHostUrl+"&extension_version="+extensionVersion,
|
| 168 |
onSuccess:
|
| 169 |
function(response) {
|
| 170 |
hideRiskifiedNotice("#magento-notice");
|
lib/riskified_php_sdk/sample/callback.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/sample/order_full_flow.php
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
+
* You may not use this file except in compliance with the License.
|
| 7 |
+
* A copy of the License is located at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0.html
|
| 10 |
+
*
|
| 11 |
+
* or in the "license" file accompanying this file. This file is distributed
|
| 12 |
+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
| 13 |
+
* express or implied. See the License for the specific language governing
|
| 14 |
+
* permissions and limitations under the License.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
// An example of a complete order flow.
|
| 18 |
+
// Usage: php order_full_flow.php
|
| 19 |
+
|
| 20 |
+
include __DIR__.'/../src/Riskified/autoloader.php';
|
| 21 |
+
use Riskified\Common\Riskified;
|
| 22 |
+
use Riskified\Common\Env;
|
| 23 |
+
use Riskified\Common\Validations;
|
| 24 |
+
use Riskified\Common\Signature;
|
| 25 |
+
use Riskified\OrderWebhook\Model;
|
| 26 |
+
use Riskified\OrderWebhook\Transport;
|
| 27 |
+
|
| 28 |
+
# Replace with the 'shop domain' of your account in Riskified
|
| 29 |
+
$domain = "test.com";
|
| 30 |
+
|
| 31 |
+
# Replace with the 'auth token' listed in the Riskified web app under the 'Settings' Tab
|
| 32 |
+
$authToken = "1388add8a99252fc1a4974de471e73cd";
|
| 33 |
+
|
| 34 |
+
Riskified::init($domain, $authToken, Env::SANDBOX, Validations::IGNORE_MISSING);
|
| 35 |
+
|
| 36 |
+
$order_details = array(
|
| 37 |
+
'id' => 'ch567',
|
| 38 |
+
'name' => '#1234',
|
| 39 |
+
'email' => 'great.customer@example.com',
|
| 40 |
+
'created_at' => '2010-01-10T11:00:00-05:00',
|
| 41 |
+
'closed_at' => null,
|
| 42 |
+
'currency' => 'CAD',
|
| 43 |
+
'updated_at' => '2010-01-10T11:00:00-05:00',
|
| 44 |
+
'gateway' => 'mypaymentprocessor',
|
| 45 |
+
'browser_ip' => '124.185.86.55',
|
| 46 |
+
'total_price' => 113.23,
|
| 47 |
+
'total_discounts' => 5.0,
|
| 48 |
+
'cart_token' => '1sdaf23j212',
|
| 49 |
+
'additional_emails' => array('my@email.com','second@email.co.uk'),
|
| 50 |
+
'note' => 'Shipped to my hotel.',
|
| 51 |
+
'referring_site' => 'google.com',
|
| 52 |
+
'line_items' => array(
|
| 53 |
+
new Model\LineItem(array(
|
| 54 |
+
'price' => 100,
|
| 55 |
+
'quantity' => 1,
|
| 56 |
+
'title' => 'ACME Widget',
|
| 57 |
+
'product_id' => '101',
|
| 58 |
+
'sku' => 'ABCD'
|
| 59 |
+
)),
|
| 60 |
+
new Model\LineItem(array(
|
| 61 |
+
'price' => 200,
|
| 62 |
+
'quantity' => 4,
|
| 63 |
+
'title' => 'ACME Spring',
|
| 64 |
+
'product_id' => '202',
|
| 65 |
+
'sku' => 'EFGH'
|
| 66 |
+
))
|
| 67 |
+
),
|
| 68 |
+
'discount_codes' => new Model\DiscountCode(array(
|
| 69 |
+
'amount' => 19.95,
|
| 70 |
+
'code' => '12'
|
| 71 |
+
)),
|
| 72 |
+
'shipping_lines' => new Model\ShippingLine(array(
|
| 73 |
+
'price' => 123.00,
|
| 74 |
+
'code' => 'Free',
|
| 75 |
+
)),
|
| 76 |
+
'payment_details' => new Model\PaymentDetails(array(
|
| 77 |
+
'credit_card_bin' => '370002',
|
| 78 |
+
'credit_card_number' => 'xxxx-xxxx-xxxx-1234',
|
| 79 |
+
'credit_card_company' => 'VISA'
|
| 80 |
+
)),
|
| 81 |
+
'customer' => new Model\Customer(array(
|
| 82 |
+
'email' => 'email@address.com',
|
| 83 |
+
'first_name' => 'Firstname',
|
| 84 |
+
'last_name' => 'Lastname',
|
| 85 |
+
'id' => '1233',
|
| 86 |
+
'created_at' => '2008-01-10T11:00:00-05:00',
|
| 87 |
+
'orders_count' => 6,
|
| 88 |
+
'verified_email' => true,
|
| 89 |
+
'account_type' => 'free'
|
| 90 |
+
)),
|
| 91 |
+
'billing_address' => new Model\Address(array(
|
| 92 |
+
'first_name' => 'John',
|
| 93 |
+
'last_name' => 'Doe',
|
| 94 |
+
'address1' => '108 Main Street',
|
| 95 |
+
'company' => 'Kansas Computers',
|
| 96 |
+
'country' => 'United States',
|
| 97 |
+
'country_code' => 'US',
|
| 98 |
+
'phone' => '1234567',
|
| 99 |
+
'city' => 'NYC',
|
| 100 |
+
'name' => 'John Doe',
|
| 101 |
+
'address2' => 'Apartment 12',
|
| 102 |
+
'province' => 'New York',
|
| 103 |
+
'province_code' => 'NY',
|
| 104 |
+
'zip' => '64155'
|
| 105 |
+
)),
|
| 106 |
+
'shipping_address' => new Model\Address(array(
|
| 107 |
+
'first_name' => 'John',
|
| 108 |
+
'last_name' => 'Doe',
|
| 109 |
+
'address1' => '108 Main Street',
|
| 110 |
+
'company' => 'Kansas Computers',
|
| 111 |
+
'country' => 'United States',
|
| 112 |
+
'country_code' => 'US',
|
| 113 |
+
'phone' => '1234567',
|
| 114 |
+
'city' => 'NYC',
|
| 115 |
+
'name' => 'John Doe',
|
| 116 |
+
'address2' => 'Apartment 12',
|
| 117 |
+
'province' => 'New York',
|
| 118 |
+
'province_code' => 'NY',
|
| 119 |
+
'zip' => '64155'
|
| 120 |
+
))
|
| 121 |
+
);
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
# Create a curl transport to the Riskified Server
|
| 125 |
+
$transport = new Transport\CurlTransport(new Signature\HttpDataSignature());
|
| 126 |
+
$transport->timeout = 10;
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
#### Create Checkout
|
| 130 |
+
$checkout = new Model\Checkout($order_details);
|
| 131 |
+
|
| 132 |
+
$response = $transport->createCheckout($checkout);
|
| 133 |
+
echo PHP_EOL."Create Checkout succeeded. Response: ".PHP_EOL.json_encode($response).PHP_EOL;
|
| 134 |
+
|
| 135 |
+
|
| 136 |
+
#### Notify Checkout Denied
|
| 137 |
+
# $response = $transport->deniedCheckout($checkout);
|
| 138 |
+
# echo PHP_EOL . "Denied Checkout succeeded. Response: " . PHP_EOL . json_encode($response) . PHP_EOL;
|
| 139 |
+
|
| 140 |
+
|
| 141 |
+
#### Create and Submit Order
|
| 142 |
+
$order = new Model\Order($order_details);
|
| 143 |
+
$order->checkout_id = $order->id;
|
| 144 |
+
$order->id = 'or1234';
|
| 145 |
+
$order->payment_details->avs_result_code = 'Y';
|
| 146 |
+
$order->payment_details->cvv_result_code = 'N';
|
| 147 |
+
|
| 148 |
+
$response = $transport->createOrder($order);
|
| 149 |
+
echo PHP_EOL."Create Order succeeded. Response: ".PHP_EOL.json_encode($response).PHP_EOL;
|
| 150 |
+
|
| 151 |
+
$response = $transport->submitOrder($order);
|
| 152 |
+
echo PHP_EOL."Submit Order succeeded. Response: ".PHP_EOL.json_encode($response).PHP_EOL;
|
| 153 |
+
|
| 154 |
+
|
| 155 |
+
#### Update Order
|
| 156 |
+
$updatedOrder = new Model\Order(array(
|
| 157 |
+
'id' => $order->id,
|
| 158 |
+
'email' => 'another.email@example.com',
|
| 159 |
+
));
|
| 160 |
+
|
| 161 |
+
$response = $transport->updateOrder($updatedOrder);
|
| 162 |
+
echo PHP_EOL."Update Order succeeded. Response: ".PHP_EOL.json_encode($response).PHP_EOL;
|
| 163 |
+
|
| 164 |
+
|
| 165 |
+
#### Partially Refund Order
|
| 166 |
+
$refund = new Model\Refund(array(
|
| 167 |
+
'id' => $order->id,
|
| 168 |
+
'refunds' => array(new Model\RefundDetails(array(
|
| 169 |
+
'refund_id' => 'refund_001',
|
| 170 |
+
'amount' => 33.12,
|
| 171 |
+
'currency' => 'USD',
|
| 172 |
+
'reason' => 'Product Missing'
|
| 173 |
+
)))
|
| 174 |
+
));
|
| 175 |
+
$response = $transport->refundOrder($refund);
|
| 176 |
+
echo PHP_EOL."Refund Order succeeded. Response: ".PHP_EOL.json_encode($response).PHP_EOL;
|
| 177 |
+
|
| 178 |
+
|
| 179 |
+
#### Notify Order Fulfillment
|
| 180 |
+
$fullfillments = new Model\Fulfillment(array (
|
| 181 |
+
'id' => $order->id,
|
| 182 |
+
'fulfillments' => array(new Model\FulfillmentDetails(array(
|
| 183 |
+
'created_at' => '2013-04-23T13:36:50Z',
|
| 184 |
+
'status' => 'success',
|
| 185 |
+
'tracking_company' => 'fedex',
|
| 186 |
+
'tracking_numbers' => 'abc123',
|
| 187 |
+
'tracking_urls' => 'http://fedex.com/track?q=abc123',
|
| 188 |
+
'message' => 'estimated delivery 2 days',
|
| 189 |
+
'receipt' => 'authorization: 765656'
|
| 190 |
+
)))
|
| 191 |
+
));
|
| 192 |
+
|
| 193 |
+
$response = $transport->fulfillOrder($fullfillments);
|
| 194 |
+
echo PHP_EOL."Fulfill Order succeeded. Response: ".PHP_EOL.json_encode($response).PHP_EOL;
|
| 195 |
+
|
| 196 |
+
|
| 197 |
+
#### Cancel (Full Refund) Order
|
| 198 |
+
$response = $transport->cancelOrder($order);
|
| 199 |
+
echo PHP_EOL."Cancel Order succeeded. Response: ".PHP_EOL.json_encode($response).PHP_EOL;
|
lib/riskified_php_sdk/sample/order_marketplace_create.php
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
+
* You may not use this file except in compliance with the License.
|
| 7 |
+
* A copy of the License is located at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0.html
|
| 10 |
+
*
|
| 11 |
+
* or in the "license" file accompanying this file. This file is distributed
|
| 12 |
+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
| 13 |
+
* express or implied. See the License for the specific language governing
|
| 14 |
+
* permissions and limitations under the License.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
// A simple example of creating a marketplace order.
|
| 18 |
+
// Usage: php order_marketplace_create.php
|
| 19 |
+
|
| 20 |
+
include __DIR__.'/../src/Riskified/autoloader.php';
|
| 21 |
+
use Riskified\Common\Riskified;
|
| 22 |
+
use Riskified\Common\Env;
|
| 23 |
+
use Riskified\Common\Validations;
|
| 24 |
+
use Riskified\Common\Signature;
|
| 25 |
+
use Riskified\OrderWebhook\Model;
|
| 26 |
+
use Riskified\OrderWebhook\Transport;
|
| 27 |
+
|
| 28 |
+
# Replace with the 'shop domain' of your account in Riskified
|
| 29 |
+
$domain = "test.com";
|
| 30 |
+
|
| 31 |
+
# Replace with the 'auth token' listed in the Riskified web app under the 'Settings' Tab
|
| 32 |
+
$authToken = "1388add8a99252fc1a4974de471e73cd";
|
| 33 |
+
|
| 34 |
+
Riskified::init($domain, $authToken, Env::SANDBOX, Validations::IGNORE_MISSING);
|
| 35 |
+
|
| 36 |
+
# Order
|
| 37 |
+
$order = new Model\Order(array(
|
| 38 |
+
'id' => '1234',
|
| 39 |
+
'name' => '#1234',
|
| 40 |
+
'email' => 'great.customer@example.com',
|
| 41 |
+
'created_at' => '2010-01-10T11:00:00-05:00',
|
| 42 |
+
'closed_at' => null,
|
| 43 |
+
'currency' => 'CAD',
|
| 44 |
+
'updated_at' => '2010-01-10T11:00:00-05:00',
|
| 45 |
+
'gateway' => 'mypaymentprocessor',
|
| 46 |
+
'browser_ip' => '124.185.86.55',
|
| 47 |
+
'total_price' => 113.23,
|
| 48 |
+
'total_discounts' => 5.0,
|
| 49 |
+
'cart_token' => '1sdaf23j212',
|
| 50 |
+
'additional_emails' => array('my@email.com','second@email.co.uk'),
|
| 51 |
+
'note' => 'Shipped to my hotel.',
|
| 52 |
+
'referring_site' => 'google.com',
|
| 53 |
+
'line_items' => array(
|
| 54 |
+
new Model\LineItem(array(
|
| 55 |
+
'price' => 100,
|
| 56 |
+
'quantity' => 1,
|
| 57 |
+
'title' => 'ACME Widget',
|
| 58 |
+
'product_id' => '101',
|
| 59 |
+
'sku' => 'ABCD',
|
| 60 |
+
'condition' => 'mint',
|
| 61 |
+
'seller' => new Model\Seller(array(
|
| 62 |
+
'customer' => new Model\Customer(array(
|
| 63 |
+
'email' => 'another@address.com',
|
| 64 |
+
'first_name' => 'SellerFirstname',
|
| 65 |
+
'last_name' => 'SellerLastname',
|
| 66 |
+
'id' => '4567',
|
| 67 |
+
'created_at' => '2008-01-10T11:00:00-05:00',
|
| 68 |
+
'orders_count' => 16,
|
| 69 |
+
'account_type' => 'premium',
|
| 70 |
+
'verified_email' => true
|
| 71 |
+
)),
|
| 72 |
+
'correspondence' => 77,
|
| 73 |
+
'price_negotiated' => false,
|
| 74 |
+
'starting_price' => 100.3
|
| 75 |
+
))
|
| 76 |
+
))
|
| 77 |
+
),
|
| 78 |
+
'discount_codes' => new Model\DiscountCode(array(
|
| 79 |
+
'amount' => 19.95,
|
| 80 |
+
'code' => '12'
|
| 81 |
+
)),
|
| 82 |
+
'shipping_lines' => new Model\ShippingLine(array(
|
| 83 |
+
'price' => 123.00,
|
| 84 |
+
'code' => 'Free',
|
| 85 |
+
)),
|
| 86 |
+
'payment_details' => new Model\PaymentDetails(array(
|
| 87 |
+
'credit_card_bin' => '370002',
|
| 88 |
+
'avs_result_code' => 'Y',
|
| 89 |
+
'cvv_result_code' => 'N',
|
| 90 |
+
'credit_card_number' => 'xxxx-xxxx-xxxx-1234',
|
| 91 |
+
'credit_card_company' => 'VISA'
|
| 92 |
+
)),
|
| 93 |
+
'customer' => new Model\Customer(array(
|
| 94 |
+
'email' => 'email@address.com',
|
| 95 |
+
'first_name' => 'Firstname',
|
| 96 |
+
'last_name' => 'Lastname',
|
| 97 |
+
'id' => '1233',
|
| 98 |
+
'created_at' => '2008-01-10T11:00:00-05:00',
|
| 99 |
+
'orders_count' => 6,
|
| 100 |
+
'verified_email' => true,
|
| 101 |
+
'account_type' => 'free',
|
| 102 |
+
'social' => array(
|
| 103 |
+
new Model\SocialDetails(array(
|
| 104 |
+
'network' => 'internal',
|
| 105 |
+
'public_username' => 'donnie7',
|
| 106 |
+
'community_score' => 68,
|
| 107 |
+
'profile_picture' => 'http://img.com/abc.png',
|
| 108 |
+
'email' => 'donnie@mail.com',
|
| 109 |
+
'bio' => 'avid mountaineer...',
|
| 110 |
+
'account_url' => 'http://shop.com/user/donnie7',
|
| 111 |
+
'following' => 231,
|
| 112 |
+
'followed' => 56,
|
| 113 |
+
'posts' => 10
|
| 114 |
+
)),
|
| 115 |
+
new Model\SocialDetails(array(
|
| 116 |
+
'network' => 'facebook',
|
| 117 |
+
'public_username' => '7231654'
|
| 118 |
+
))
|
| 119 |
+
)
|
| 120 |
+
)),
|
| 121 |
+
'billing_address' => new Model\Address(array(
|
| 122 |
+
'first_name' => 'John',
|
| 123 |
+
'last_name' => 'Doe',
|
| 124 |
+
'address1' => '108 Main Street',
|
| 125 |
+
'company' => 'Kansas Computers',
|
| 126 |
+
'country' => 'United States',
|
| 127 |
+
'country_code' => 'US',
|
| 128 |
+
'phone' => '1234567',
|
| 129 |
+
'city' => 'NYC',
|
| 130 |
+
'name' => 'John Doe',
|
| 131 |
+
'address2' => 'Apartment 12',
|
| 132 |
+
'province' => 'New York',
|
| 133 |
+
'province_code' => 'NY',
|
| 134 |
+
'zip' => '64155'
|
| 135 |
+
)),
|
| 136 |
+
'shipping_address' => new Model\Address(array(
|
| 137 |
+
'first_name' => 'John',
|
| 138 |
+
'last_name' => 'Doe',
|
| 139 |
+
'address1' => '108 Main Street',
|
| 140 |
+
'company' => 'Kansas Computers',
|
| 141 |
+
'country' => 'United States',
|
| 142 |
+
'country_code' => 'US',
|
| 143 |
+
'phone' => '1234567',
|
| 144 |
+
'city' => 'NYC',
|
| 145 |
+
'name' => 'John Doe',
|
| 146 |
+
'address2' => 'Apartment 12',
|
| 147 |
+
'province' => 'New York',
|
| 148 |
+
'province_code' => 'NY',
|
| 149 |
+
'zip' => '64155'
|
| 150 |
+
)),
|
| 151 |
+
'nocharge_amount' => new Model\RefundDetails(array(
|
| 152 |
+
'refund_id' => '1235',
|
| 153 |
+
'amount' => 20,
|
| 154 |
+
'currency' => 'USD',
|
| 155 |
+
'reason' => 'wallet'
|
| 156 |
+
))
|
| 157 |
+
));
|
| 158 |
+
|
| 159 |
+
echo "\nORDER REQUEST:".PHP_EOL.json_encode(json_decode($order->toJson())).PHP_EOL;
|
| 160 |
+
|
| 161 |
+
|
| 162 |
+
# Create a curl transport to the Riskified Server
|
| 163 |
+
$transport = new Transport\CurlTransport(new Signature\HttpDataSignature());
|
| 164 |
+
$transport->timeout = 10;
|
| 165 |
+
|
| 166 |
+
|
| 167 |
+
try {
|
| 168 |
+
$response = $transport->createOrder($order);
|
| 169 |
+
echo PHP_EOL."Create Order succeeded. Response: ".PHP_EOL.json_encode($response).PHP_EOL;
|
| 170 |
+
} catch(\Riskified\OrderWebhook\Exception\UnsuccessfulActionException $uae) {
|
| 171 |
+
echo PHP_EOL."Create Order not succeeded. Status code was: ".$uae->statusCode." and json body was: "
|
| 172 |
+
.json_encode($uae->jsonResponse).PHP_EOL;
|
| 173 |
+
} catch(Exception $e) {
|
| 174 |
+
echo PHP_EOL."Create Order not succeeded. Exception: ".$e->getMessage().PHP_EOL;
|
| 175 |
+
}
|
lib/riskified_php_sdk/sample/{order_webhook.php → order_simple_submit.php}
RENAMED
|
@@ -1,216 +1,161 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
-
*
|
| 5 |
-
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
-
* You may not use this file except in compliance with the License.
|
| 7 |
-
* A copy of the License is located at
|
| 8 |
-
*
|
| 9 |
-
* http://www.apache.org/licenses/LICENSE-2.0.html
|
| 10 |
-
*
|
| 11 |
-
* or in the "license" file accompanying this file. This file is distributed
|
| 12 |
-
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
| 13 |
-
* express or implied. See the License for the specific language governing
|
| 14 |
-
* permissions and limitations under the License.
|
| 15 |
-
*/
|
| 16 |
-
|
| 17 |
-
// A simple example of
|
| 18 |
-
// Usage: php
|
| 19 |
-
|
| 20 |
-
include __DIR__.'/../src/Riskified/autoloader.php';
|
| 21 |
-
use Riskified\Common\Riskified;
|
| 22 |
-
use Riskified\Common\Env;
|
| 23 |
-
use Riskified\Common\Validations;
|
| 24 |
-
use Riskified\Common\Signature;
|
| 25 |
-
use Riskified\OrderWebhook\Model;
|
| 26 |
-
use Riskified\OrderWebhook\Transport;
|
| 27 |
-
|
| 28 |
-
# Replace with the 'shop domain' of your account in Riskified
|
| 29 |
-
$domain = "test.com";
|
| 30 |
-
|
| 31 |
-
# Replace with the 'auth token' listed in the Riskified web app under the 'Settings' Tab
|
| 32 |
-
$authToken = "1388add8a99252fc1a4974de471e73cd";
|
| 33 |
-
|
| 34 |
-
Riskified::init($domain, $authToken, Env::SANDBOX, Validations::IGNORE_MISSING);
|
| 35 |
-
|
| 36 |
-
# Order
|
| 37 |
-
$order = new Model\Order(array(
|
| 38 |
-
'id' => '1234',
|
| 39 |
-
'name' => '#1234',
|
| 40 |
-
'email' => 'great.customer@example.com',
|
| 41 |
-
'created_at' => '2010-01-10T11:00:00-05:00',
|
| 42 |
-
'closed_at' => null,
|
| 43 |
-
'currency' => 'CAD',
|
| 44 |
-
'updated_at' => '2010-01-10T11:00:00-05:00',
|
| 45 |
-
'gateway' => 'mypaymentprocessor',
|
| 46 |
-
'browser_ip' => '124.185.86.55',
|
| 47 |
-
'total_price' => 113.23,
|
| 48 |
-
'total_discounts' => 5.0,
|
| 49 |
-
'cart_token' => '1sdaf23j212',
|
| 50 |
-
'additional_emails' => array('my@email.com','second@email.co.uk'),
|
| 51 |
-
'note' => 'Shipped to my hotel.',
|
| 52 |
-
'referring_site' => 'google.com'
|
| 53 |
-
));
|
| 54 |
-
|
| 55 |
-
# LineItems
|
| 56 |
-
$lineItem1 = new Model\LineItem(array(
|
| 57 |
-
'price' => 100,
|
| 58 |
-
'quantity' => 1,
|
| 59 |
-
'title' => 'ACME Widget',
|
| 60 |
-
'product_id' => '101',
|
| 61 |
-
'sku' => 'ABCD'
|
| 62 |
-
));
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
'
|
| 66 |
-
'
|
| 67 |
-
'
|
| 68 |
-
'
|
| 69 |
-
|
| 70 |
-
)
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
'
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
'
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
'
|
| 90 |
-
'
|
| 91 |
-
'
|
| 92 |
-
'
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
'
|
| 100 |
-
'
|
| 101 |
-
'
|
| 102 |
-
'
|
| 103 |
-
'
|
| 104 |
-
'
|
| 105 |
-
'
|
| 106 |
-
));
|
| 107 |
-
$order->customer = $customer;
|
| 108 |
-
|
| 109 |
-
# BillingAddress
|
| 110 |
-
$billingAddress = new Model\Address(array(
|
| 111 |
-
'first_name' => 'John',
|
| 112 |
-
'last_name' => 'Doe',
|
| 113 |
-
'address1' => '108 Main Street',
|
| 114 |
-
'company' => 'Kansas Computers',
|
| 115 |
-
'country' => 'United States',
|
| 116 |
-
'country_code' => 'US',
|
| 117 |
-
'phone' => '1234567',
|
| 118 |
-
'city' => 'NYC',
|
| 119 |
-
'name' => 'John Doe',
|
| 120 |
-
'address2' => 'Apartment 12',
|
| 121 |
-
'province' => 'New York',
|
| 122 |
-
'province_code' => 'NY',
|
| 123 |
-
'zip' => '64155'
|
| 124 |
-
));
|
| 125 |
-
$order->billing_address = $billingAddress;
|
| 126 |
-
|
| 127 |
-
# ShippingAddress
|
| 128 |
-
$shippingAddress = new Model\Address(array(
|
| 129 |
-
'first_name' => 'John',
|
| 130 |
-
'last_name' => 'Doe',
|
| 131 |
-
'address1' => '108 Main Street',
|
| 132 |
-
'company' => 'Kansas Computers',
|
| 133 |
-
'country' => 'United States',
|
| 134 |
-
'country_code' => 'US',
|
| 135 |
-
'phone' => '1234567',
|
| 136 |
-
'city' => 'NYC',
|
| 137 |
-
'name' => 'John Doe',
|
| 138 |
-
'address2' => 'Apartment 12',
|
| 139 |
-
'province' => 'New York',
|
| 140 |
-
'province_code' => 'NY',
|
| 141 |
-
'zip' => '64155'
|
| 142 |
-
));
|
| 143 |
-
$order->shipping_address = $shippingAddress;
|
| 144 |
-
|
| 145 |
-
echo "\
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
$transport
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
echo PHP_EOL."
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
}
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
$response = $transport->submitOrder($order);
|
| 163 |
-
echo PHP_EOL."Submit order succeeded. Response: ".PHP_EOL.json_encode($response).PHP_EOL;
|
| 164 |
-
} catch(\Riskified\OrderWebhook\Exception\UnsuccessfulActionException $uae) {
|
| 165 |
-
echo PHP_EOL."Submit order not succeeded. Status code was: ".$uae->statusCode." and json body was: "
|
| 166 |
-
.json_encode($uae->jsonResponse).PHP_EOL;
|
| 167 |
-
} catch(Exception $e) {
|
| 168 |
-
echo PHP_EOL."Submit order not succeeded. Exception: ".$e->getMessage().PHP_EOL;
|
| 169 |
-
}
|
| 170 |
-
|
| 171 |
-
$updatedOrder = new Model\Order(array(
|
| 172 |
-
'id' => $order->id,
|
| 173 |
-
'email' => 'another.email@example.com',
|
| 174 |
-
));
|
| 175 |
-
|
| 176 |
-
try {
|
| 177 |
-
$response = $transport->updateOrder($updatedOrder);
|
| 178 |
-
echo PHP_EOL."Update Order succeeded. Response: ".PHP_EOL.json_encode($response).PHP_EOL;
|
| 179 |
-
} catch(\Riskified\OrderWebhook\Exception\UnsuccessfulActionException $uae) {
|
| 180 |
-
echo PHP_EOL."Update order not succeeded. Status code was: ".$uae->statusCode." and json body was: "
|
| 181 |
-
.json_encode($uae->jsonResponse).PHP_EOL;
|
| 182 |
-
} catch(Exception $e) {
|
| 183 |
-
echo PHP_EOL."Update order not succeeded. Exception: ".$e->getMessage().PHP_EOL;
|
| 184 |
-
}
|
| 185 |
-
|
| 186 |
-
$refund = new Model\Refund(array(
|
| 187 |
-
'id' => $order->id,
|
| 188 |
-
'refunds' => array(new Model\RefundDetails(array(
|
| 189 |
-
'refund_id' => 'refund_001',
|
| 190 |
-
'amount' => 33.12,
|
| 191 |
-
'currency' => 'USD',
|
| 192 |
-
'reason' => 'Product Missing'
|
| 193 |
-
)))
|
| 194 |
-
));
|
| 195 |
-
|
| 196 |
-
echo "\nREQUEST:".PHP_EOL.json_encode(json_decode($refund->toJson())).PHP_EOL;
|
| 197 |
-
|
| 198 |
-
try {
|
| 199 |
-
$response = $transport->refundOrder($refund);
|
| 200 |
-
echo PHP_EOL."Refund Order succeeded. Response: ".PHP_EOL.json_encode($response).PHP_EOL;
|
| 201 |
-
} catch(\Riskified\OrderWebhook\Exception\UnsuccessfulActionException $uae) {
|
| 202 |
-
echo PHP_EOL."Refund order not succeeded. Status code was: ".$uae->statusCode." and json body was: "
|
| 203 |
-
.json_encode($uae->jsonResponse).PHP_EOL;
|
| 204 |
-
} catch(Exception $e) {
|
| 205 |
-
echo PHP_EOL."Refund order not succeeded. Exception: ".$e->getMessage().PHP_EOL;
|
| 206 |
-
}
|
| 207 |
-
|
| 208 |
-
try {
|
| 209 |
-
$response = $transport->cancelOrder($order);
|
| 210 |
-
echo PHP_EOL."Cancel order succeeded. Response: ".PHP_EOL.json_encode($response).PHP_EOL;
|
| 211 |
-
} catch(\Riskified\OrderWebhook\Exception\UnsuccessfulActionException $uae) {
|
| 212 |
-
echo PHP_EOL."Cancel order not succeeded. Status code was: ".$uae->statusCode." and json body was: "
|
| 213 |
-
.json_encode($uae->jsonResponse).PHP_EOL;
|
| 214 |
-
} catch(Exception $e) {
|
| 215 |
-
echo PHP_EOL."Cancel order not succeeded. Exception: ".$e->getMessage().PHP_EOL;
|
| 216 |
-
}
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
+
* You may not use this file except in compliance with the License.
|
| 7 |
+
* A copy of the License is located at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0.html
|
| 10 |
+
*
|
| 11 |
+
* or in the "license" file accompanying this file. This file is distributed
|
| 12 |
+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
| 13 |
+
* express or implied. See the License for the specific language governing
|
| 14 |
+
* permissions and limitations under the License.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
// A simple example of submitting an order.
|
| 18 |
+
// Usage: php order_simple_submit.php
|
| 19 |
+
|
| 20 |
+
include __DIR__.'/../src/Riskified/autoloader.php';
|
| 21 |
+
use Riskified\Common\Riskified;
|
| 22 |
+
use Riskified\Common\Env;
|
| 23 |
+
use Riskified\Common\Validations;
|
| 24 |
+
use Riskified\Common\Signature;
|
| 25 |
+
use Riskified\OrderWebhook\Model;
|
| 26 |
+
use Riskified\OrderWebhook\Transport;
|
| 27 |
+
|
| 28 |
+
# Replace with the 'shop domain' of your account in Riskified
|
| 29 |
+
$domain = "test.com";
|
| 30 |
+
|
| 31 |
+
# Replace with the 'auth token' listed in the Riskified web app under the 'Settings' Tab
|
| 32 |
+
$authToken = "1388add8a99252fc1a4974de471e73cd";
|
| 33 |
+
|
| 34 |
+
Riskified::init($domain, $authToken, Env::SANDBOX, Validations::IGNORE_MISSING);
|
| 35 |
+
|
| 36 |
+
# Order
|
| 37 |
+
$order = new Model\Order(array(
|
| 38 |
+
'id' => '1234',
|
| 39 |
+
'name' => '#1234',
|
| 40 |
+
'email' => 'great.customer@example.com',
|
| 41 |
+
'created_at' => '2010-01-10T11:00:00-05:00',
|
| 42 |
+
'closed_at' => null,
|
| 43 |
+
'currency' => 'CAD',
|
| 44 |
+
'updated_at' => '2010-01-10T11:00:00-05:00',
|
| 45 |
+
'gateway' => 'mypaymentprocessor',
|
| 46 |
+
'browser_ip' => '124.185.86.55',
|
| 47 |
+
'total_price' => 113.23,
|
| 48 |
+
'total_discounts' => 5.0,
|
| 49 |
+
'cart_token' => '1sdaf23j212',
|
| 50 |
+
'additional_emails' => array('my@email.com','second@email.co.uk'),
|
| 51 |
+
'note' => 'Shipped to my hotel.',
|
| 52 |
+
'referring_site' => 'google.com'
|
| 53 |
+
));
|
| 54 |
+
|
| 55 |
+
# LineItems
|
| 56 |
+
$lineItem1 = new Model\LineItem(array(
|
| 57 |
+
'price' => 100,
|
| 58 |
+
'quantity' => 1,
|
| 59 |
+
'title' => 'ACME Widget',
|
| 60 |
+
'product_id' => '101',
|
| 61 |
+
'sku' => 'ABCD'
|
| 62 |
+
));
|
| 63 |
+
$lineItem2 = new Model\LineItem(array(
|
| 64 |
+
'price' => 200,
|
| 65 |
+
'quantity' => 4,
|
| 66 |
+
'title' => 'ACME Spring',
|
| 67 |
+
'product_id' => '202',
|
| 68 |
+
'sku' => 'EFGH'
|
| 69 |
+
));
|
| 70 |
+
$order->line_items = array($lineItem1, $lineItem2);
|
| 71 |
+
|
| 72 |
+
# DiscountCodes
|
| 73 |
+
$discountCode = new Model\DiscountCode(array(
|
| 74 |
+
'amount' => 19.95,
|
| 75 |
+
'code' => '12'
|
| 76 |
+
));
|
| 77 |
+
$order->discount_codes = $discountCode;
|
| 78 |
+
|
| 79 |
+
# ShippingLines
|
| 80 |
+
$shippingLine = new Model\ShippingLine(array(
|
| 81 |
+
'price' => 123.00,
|
| 82 |
+
'code' => 'Free',
|
| 83 |
+
));
|
| 84 |
+
$order->shipping_lines = $shippingLine;
|
| 85 |
+
|
| 86 |
+
# PaymentDetais
|
| 87 |
+
$paymentDetails = new Model\PaymentDetails(array(
|
| 88 |
+
'credit_card_bin' => '370002',
|
| 89 |
+
'avs_result_code' => 'Y',
|
| 90 |
+
'cvv_result_code' => 'N',
|
| 91 |
+
'credit_card_number' => 'xxxx-xxxx-xxxx-1234',
|
| 92 |
+
'credit_card_company' => 'VISA'
|
| 93 |
+
));
|
| 94 |
+
$order->payment_details = $paymentDetails;
|
| 95 |
+
|
| 96 |
+
# Customer
|
| 97 |
+
$customer = new Model\Customer(array(
|
| 98 |
+
'email' => 'email@address.com',
|
| 99 |
+
'first_name' => 'Firstname',
|
| 100 |
+
'last_name' => 'Lastname',
|
| 101 |
+
'id' => '1233',
|
| 102 |
+
'created_at' => '2008-01-10T11:00:00-05:00',
|
| 103 |
+
'orders_count' => 6,
|
| 104 |
+
'verified_email' => true,
|
| 105 |
+
'account_type' => 'free'
|
| 106 |
+
));
|
| 107 |
+
$order->customer = $customer;
|
| 108 |
+
|
| 109 |
+
# BillingAddress
|
| 110 |
+
$billingAddress = new Model\Address(array(
|
| 111 |
+
'first_name' => 'John',
|
| 112 |
+
'last_name' => 'Doe',
|
| 113 |
+
'address1' => '108 Main Street',
|
| 114 |
+
'company' => 'Kansas Computers',
|
| 115 |
+
'country' => 'United States',
|
| 116 |
+
'country_code' => 'US',
|
| 117 |
+
'phone' => '1234567',
|
| 118 |
+
'city' => 'NYC',
|
| 119 |
+
'name' => 'John Doe',
|
| 120 |
+
'address2' => 'Apartment 12',
|
| 121 |
+
'province' => 'New York',
|
| 122 |
+
'province_code' => 'NY',
|
| 123 |
+
'zip' => '64155'
|
| 124 |
+
));
|
| 125 |
+
$order->billing_address = $billingAddress;
|
| 126 |
+
|
| 127 |
+
# ShippingAddress
|
| 128 |
+
$shippingAddress = new Model\Address(array(
|
| 129 |
+
'first_name' => 'John',
|
| 130 |
+
'last_name' => 'Doe',
|
| 131 |
+
'address1' => '108 Main Street',
|
| 132 |
+
'company' => 'Kansas Computers',
|
| 133 |
+
'country' => 'United States',
|
| 134 |
+
'country_code' => 'US',
|
| 135 |
+
'phone' => '1234567',
|
| 136 |
+
'city' => 'NYC',
|
| 137 |
+
'name' => 'John Doe',
|
| 138 |
+
'address2' => 'Apartment 12',
|
| 139 |
+
'province' => 'New York',
|
| 140 |
+
'province_code' => 'NY',
|
| 141 |
+
'zip' => '64155'
|
| 142 |
+
));
|
| 143 |
+
$order->shipping_address = $shippingAddress;
|
| 144 |
+
|
| 145 |
+
echo "\nORDER REQUEST:".PHP_EOL.json_encode(json_decode($order->toJson())).PHP_EOL;
|
| 146 |
+
|
| 147 |
+
|
| 148 |
+
# Create a curl transport to the Riskified Server
|
| 149 |
+
$transport = new Transport\CurlTransport(new Signature\HttpDataSignature());
|
| 150 |
+
$transport->timeout = 10;
|
| 151 |
+
|
| 152 |
+
|
| 153 |
+
try {
|
| 154 |
+
$response = $transport->submitOrder($order);
|
| 155 |
+
echo PHP_EOL."Submit Order succeeded. Response: ".PHP_EOL.json_encode($response).PHP_EOL;
|
| 156 |
+
} catch(\Riskified\OrderWebhook\Exception\UnsuccessfulActionException $uae) {
|
| 157 |
+
echo PHP_EOL."Submit Order not succeeded. Status code was: ".$uae->statusCode." and json body was: "
|
| 158 |
+
.json_encode($uae->jsonResponse).PHP_EOL;
|
| 159 |
+
} catch(Exception $e) {
|
| 160 |
+
echo PHP_EOL."Submit Order not succeeded. Exception: ".$e->getMessage().PHP_EOL;
|
| 161 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/riskified_php_sdk/sample/run_callback_server.sh
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
#!/bin/sh
|
| 2 |
|
| 3 |
-
# Copyright 2013-
|
| 4 |
#
|
| 5 |
# Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
# You may not use this file except in compliance with the License.
|
| 1 |
#!/bin/sh
|
| 2 |
|
| 3 |
+
# Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
#
|
| 5 |
# Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
# You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/sample/upload_historical.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/Common/Env.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/Common/Exception/BaseException.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\Common\Exception;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\Common\Exception;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/Common/Riskified.php
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?php namespace Riskified\Common;
|
| 2 |
|
| 3 |
/**
|
| 4 |
-
* Copyright 2013-
|
| 5 |
*
|
| 6 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 7 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\Common;
|
| 2 |
|
| 3 |
/**
|
| 4 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 5 |
*
|
| 6 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 7 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/Common/Signature/HttpDataSignature.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\Common\Signature;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\Common\Signature;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/Common/Validations.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/DecisionNotification/Exception/AuthorizationException.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\DecisionNotification\Exception;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\DecisionNotification\Exception;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/DecisionNotification/Exception/BadHeaderException.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\DecisionNotification\Exception;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\DecisionNotification\Exception;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/DecisionNotification/Exception/BadPostJsonException.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\DecisionNotification\Exception;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\DecisionNotification\Exception;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/DecisionNotification/Exception/NotificationException.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\DecisionNotification\Exception;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\DecisionNotification\Exception;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/DecisionNotification/Model/Notification.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\DecisionNotification\Model;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\DecisionNotification\Model;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Exception/ClassMismatchPropertyException.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Exception;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\OrderWebhook\Exception;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Exception/CurlException.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Exception;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\OrderWebhook\Exception;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Exception/FormatMismatchPropertyException.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Exception;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\OrderWebhook\Exception;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Exception/InvalidPropertyException.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Exception;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\OrderWebhook\Exception;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Exception/MalformedJsonException.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Exception;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\OrderWebhook\Exception;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Exception/MissingPropertyException.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Exception;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\OrderWebhook\Exception;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Exception/MultiplePropertiesException.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Exception;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\OrderWebhook\Exception;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Exception/PropertyException.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Exception;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\OrderWebhook\Exception;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Exception/TypeMismatchPropertyException.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Exception;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\OrderWebhook\Exception;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Exception/UnsuccessfulActionException.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Exception;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\OrderWebhook\Exception;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/AbstractModel.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/Address.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/Attribute.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/AuthorizationError.php
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
+
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
+
* You may not use this file except in compliance with the License.
|
| 7 |
+
* A copy of the License is located at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0.html
|
| 10 |
+
*
|
| 11 |
+
* or in the "license" file accompanying this file. This file is distributed
|
| 12 |
+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
| 13 |
+
* express or implied. See the License for the specific language governing
|
| 14 |
+
* permissions and limitations under the License.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
/**
|
| 18 |
+
* Class AuthorizationError
|
| 19 |
+
* failed result of an authorization attempt by a payment gateway.
|
| 20 |
+
* @package Riskified\OrderWebhook\Model
|
| 21 |
+
*/
|
| 22 |
+
class AuthorizationError extends Order {
|
| 23 |
+
|
| 24 |
+
protected $_fields = array(
|
| 25 |
+
'created_at' => 'date',
|
| 26 |
+
'error_code' => 'string',
|
| 27 |
+
'message' => 'string optional'
|
| 28 |
+
);
|
| 29 |
+
|
| 30 |
+
}
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/Checkout.php
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
+
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
+
* You may not use this file except in compliance with the License.
|
| 7 |
+
* A copy of the License is located at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0.html
|
| 10 |
+
*
|
| 11 |
+
* or in the "license" file accompanying this file. This file is distributed
|
| 12 |
+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
| 13 |
+
* express or implied. See the License for the specific language governing
|
| 14 |
+
* permissions and limitations under the License.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
/**
|
| 18 |
+
* Class Checkout
|
| 19 |
+
* pre-order checkout data model, includes nested models
|
| 20 |
+
* @package Riskified\OrderWebhook\Model
|
| 21 |
+
*/
|
| 22 |
+
class Checkout extends Order {
|
| 23 |
+
}
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/ClientDetails.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/Customer.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
|
@@ -40,6 +40,9 @@ class Customer extends AbstractModel {
|
|
| 40 |
'state' => 'string optional',
|
| 41 |
'total_spent' => 'float optional',
|
| 42 |
'tags' => 'string optional',
|
| 43 |
-
'
|
|
|
|
|
|
|
|
|
|
| 44 |
);
|
| 45 |
}
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 40 |
'state' => 'string optional',
|
| 41 |
'total_spent' => 'float optional',
|
| 42 |
'tags' => 'string optional',
|
| 43 |
+
'account_type' => 'string optional',
|
| 44 |
+
|
| 45 |
+
'default_address' => 'object \Address optional',
|
| 46 |
+
'social' => 'array object \SocialDetails optional'
|
| 47 |
);
|
| 48 |
}
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/DiscountCode.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/Fulfillment.php
CHANGED
|
@@ -1,39 +1,28 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
-
/**
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
|
| 17 |
/**
|
| 18 |
* Class Fulfillment
|
| 19 |
-
* data model of fulfillment
|
| 20 |
* @package Riskified\OrderWebhook\Model
|
| 21 |
*/
|
| 22 |
class Fulfillment extends AbstractModel {
|
| 23 |
|
| 24 |
protected $_fields = array(
|
| 25 |
-
'created_at' => 'date',
|
| 26 |
-
'updated_at' => 'date',
|
| 27 |
'id' => 'string',
|
| 28 |
-
'
|
| 29 |
-
'service' => 'string',
|
| 30 |
-
'status' => 'string',
|
| 31 |
-
|
| 32 |
-
'tracking_company' => 'string optional',
|
| 33 |
-
'tracking_number' => 'string optional',
|
| 34 |
-
'tracking_url' => 'string optional',
|
| 35 |
-
'line_items' => 'array object \LineItem optional'
|
| 36 |
);
|
| 37 |
-
}
|
| 38 |
-
|
| 39 |
-
// "receipt":{"gift_cards":[{"id":732301,"line_item_id":372051657,"masked_code":"\u00b7\u00b7\u00b7\u00b7 \u00b7\u00b7\u00b7\u00b7 \u00b7\u00b7\u00b7\u00b7 gcae"}]}
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
+
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
+
* You may not use this file except in compliance with the License.
|
| 7 |
+
* A copy of the License is located at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0.html
|
| 10 |
+
*
|
| 11 |
+
* or in the "license" file accompanying this file. This file is distributed
|
| 12 |
+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
| 13 |
+
* express or implied. See the License for the specific language governing
|
| 14 |
+
* permissions and limitations under the License.
|
| 15 |
+
*/
|
| 16 |
|
| 17 |
/**
|
| 18 |
* Class Fulfillment
|
| 19 |
+
* data model of an existing order's fulfillment attempts
|
| 20 |
* @package Riskified\OrderWebhook\Model
|
| 21 |
*/
|
| 22 |
class Fulfillment extends AbstractModel {
|
| 23 |
|
| 24 |
protected $_fields = array(
|
|
|
|
|
|
|
| 25 |
'id' => 'string',
|
| 26 |
+
'fulfillments' => 'array object \FulfillmentDetails'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
);
|
| 28 |
+
}
|
|
|
|
|
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/FulfillmentDetails.php
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
+
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
+
* You may not use this file except in compliance with the License.
|
| 7 |
+
* A copy of the License is located at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0.html
|
| 10 |
+
*
|
| 11 |
+
* or in the "license" file accompanying this file. This file is distributed
|
| 12 |
+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
| 13 |
+
* express or implied. See the License for the specific language governing
|
| 14 |
+
* permissions and limitations under the License.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
/**
|
| 18 |
+
* Class FulfillmentDetails
|
| 19 |
+
* data model of fulfillment
|
| 20 |
+
* @package Riskified\OrderWebhook\Model
|
| 21 |
+
*/
|
| 22 |
+
class FulfillmentDetails extends AbstractModel {
|
| 23 |
+
|
| 24 |
+
protected $_fields = array(
|
| 25 |
+
'created_at' => 'date',
|
| 26 |
+
'fulfillment_id' => 'string',
|
| 27 |
+
'status' => 'string',
|
| 28 |
+
|
| 29 |
+
'tracking_company' => 'string optional',
|
| 30 |
+
'tracking_numbers' => 'string optional',
|
| 31 |
+
'tracking_urls' => 'string optional',
|
| 32 |
+
'message' => 'string optional',
|
| 33 |
+
'receipt' => 'string',
|
| 34 |
+
|
| 35 |
+
'line_items' => 'array object \LineItem optional'
|
| 36 |
+
);
|
| 37 |
+
}
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/LineItem.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
|
@@ -40,11 +40,14 @@ class LineItem extends AbstractModel {
|
|
| 40 |
'requires_shipping' => 'boolean optional',
|
| 41 |
'taxable' => 'boolean optional',
|
| 42 |
'product_exists' => 'boolean optional',
|
| 43 |
-
'properties' =>'array object \Attribute optional',
|
| 44 |
-
'tax_lines' => 'array object \TaxLine optional',
|
| 45 |
'event_sub_category_name' => 'string optional',
|
| 46 |
'event_name' => 'string optional',
|
| 47 |
'event_section_name' => 'string optional',
|
| 48 |
-
'event_date' => 'date optional'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
);
|
| 50 |
}
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 40 |
'requires_shipping' => 'boolean optional',
|
| 41 |
'taxable' => 'boolean optional',
|
| 42 |
'product_exists' => 'boolean optional',
|
|
|
|
|
|
|
| 43 |
'event_sub_category_name' => 'string optional',
|
| 44 |
'event_name' => 'string optional',
|
| 45 |
'event_section_name' => 'string optional',
|
| 46 |
+
'event_date' => 'date optional',
|
| 47 |
+
'condition' => 'string optional',
|
| 48 |
+
|
| 49 |
+
'properties' =>'array object \Attribute optional',
|
| 50 |
+
'tax_lines' => 'array object \TaxLine optional',
|
| 51 |
+
'seller' => 'object \Seller optional'
|
| 52 |
);
|
| 53 |
}
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/Order.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
|
@@ -68,7 +68,8 @@ class Order extends AbstractModel {
|
|
| 68 |
'processing_method' => 'string optional',
|
| 69 |
'checkout_id' => 'string optional',
|
| 70 |
'tags' => 'string optional',
|
| 71 |
-
'
|
|
|
|
| 72 |
|
| 73 |
'shipping_address' => 'object \Address optional',
|
| 74 |
'billing_address' => 'object \Address optional',
|
|
@@ -77,6 +78,9 @@ class Order extends AbstractModel {
|
|
| 77 |
'discount_codes' => 'array object \DiscountCode optional',
|
| 78 |
'shipping_lines' => 'array object \ShippingLine optional',
|
| 79 |
'note_attributes' => 'array object \Attribute optional',
|
| 80 |
-
'tax_lines' => 'array object \TaxLine optional'
|
|
|
|
|
|
|
|
|
|
| 81 |
);
|
| 82 |
}
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 68 |
'processing_method' => 'string optional',
|
| 69 |
'checkout_id' => 'string optional',
|
| 70 |
'tags' => 'string optional',
|
| 71 |
+
'vendor_id' => 'string optional',
|
| 72 |
+
'vendor_name' => 'string optional',
|
| 73 |
|
| 74 |
'shipping_address' => 'object \Address optional',
|
| 75 |
'billing_address' => 'object \Address optional',
|
| 78 |
'discount_codes' => 'array object \DiscountCode optional',
|
| 79 |
'shipping_lines' => 'array object \ShippingLine optional',
|
| 80 |
'note_attributes' => 'array object \Attribute optional',
|
| 81 |
+
'tax_lines' => 'array object \TaxLine optional',
|
| 82 |
+
|
| 83 |
+
'authorization_error' => 'object \AuthorizationError optional',
|
| 84 |
+
'nocharge_amount' => 'object \RefundDetails optional'
|
| 85 |
);
|
| 86 |
}
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/OrderCancellation.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/PaymentDetails.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/Refund.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/RefundDetails.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/Seller.php
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
+
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
+
* You may not use this file except in compliance with the License.
|
| 7 |
+
* A copy of the License is located at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0.html
|
| 10 |
+
*
|
| 11 |
+
* or in the "license" file accompanying this file. This file is distributed
|
| 12 |
+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
| 13 |
+
* express or implied. See the License for the specific language governing
|
| 14 |
+
* permissions and limitations under the License.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
/**
|
| 18 |
+
* Class Seller
|
| 19 |
+
* data model of seller in a marketplace
|
| 20 |
+
* @package Riskified\OrderWebhook\Model
|
| 21 |
+
*/
|
| 22 |
+
class Seller extends AbstractModel {
|
| 23 |
+
|
| 24 |
+
protected $_fields = array(
|
| 25 |
+
'customer' => 'object \Customer',
|
| 26 |
+
'correspondence' => 'number optional',
|
| 27 |
+
'price_negotiated' => 'boolean optional',
|
| 28 |
+
'starting_price' => 'float optional'
|
| 29 |
+
);
|
| 30 |
+
|
| 31 |
+
}
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/ShippingLine.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/SocialDetails.php
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
+
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
+
* You may not use this file except in compliance with the License.
|
| 7 |
+
* A copy of the License is located at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0.html
|
| 10 |
+
*
|
| 11 |
+
* or in the "license" file accompanying this file. This file is distributed
|
| 12 |
+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
| 13 |
+
* express or implied. See the License for the specific language governing
|
| 14 |
+
* permissions and limitations under the License.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
/**
|
| 18 |
+
* Class SocialDetails
|
| 19 |
+
* data model of shipping line costs
|
| 20 |
+
* @package Riskified\OrderWebhook\Model
|
| 21 |
+
*/
|
| 22 |
+
class SocialDetails extends AbstractModel {
|
| 23 |
+
|
| 24 |
+
protected $_fields = array(
|
| 25 |
+
'network' => 'string',
|
| 26 |
+
'public_username' => 'string',
|
| 27 |
+
'community_score' => 'number optional',
|
| 28 |
+
'profile_picture' => 'string optional',
|
| 29 |
+
'email' => 'string optional',
|
| 30 |
+
'bio' => 'string optional',
|
| 31 |
+
'account_url' => 'string optional',
|
| 32 |
+
'following' => 'integer optional',
|
| 33 |
+
'followed' => 'integer optional',
|
| 34 |
+
'posts' => 'integer optional'
|
| 35 |
+
);
|
| 36 |
+
|
| 37 |
+
}
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/TaxLine.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\OrderWebhook\Model;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Transport/AbstractTransport.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Transport;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
|
@@ -104,12 +104,43 @@ abstract class AbstractTransport {
|
|
| 104 |
return $this->send_order($order, 'refund', false);
|
| 105 |
}
|
| 106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
public function sendHistoricalOrders($orders) {
|
| 108 |
$joined = join(',',array_map(function($order) { return $order->toJson(); }, $orders));
|
| 109 |
$json = '{"orders":['.$joined.']}';
|
| 110 |
return $this->send_json_request($json, 'historical');
|
| 111 |
}
|
| 112 |
|
|
|
|
| 113 |
protected function send_order($order, $endpoint, $enforce_required_keys) {
|
| 114 |
if ($this->validate($order, $enforce_required_keys)) {
|
| 115 |
$json = '{"order":' . $order->toJson() . '}';
|
|
@@ -118,6 +149,14 @@ abstract class AbstractTransport {
|
|
| 118 |
return null;
|
| 119 |
}
|
| 120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 121 |
protected function validate($order, $enforce_required_keys=true) {
|
| 122 |
if (Riskified::$validations == Validations::SKIP)
|
| 123 |
return true;
|
| 1 |
<?php namespace Riskified\OrderWebhook\Transport;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 104 |
return $this->send_order($order, 'refund', false);
|
| 105 |
}
|
| 106 |
|
| 107 |
+
/**
|
| 108 |
+
* Send order fulfillment status
|
| 109 |
+
* @param $fulfillment object Fulfillment with order id and fulfillment details
|
| 110 |
+
* @return object Response object
|
| 111 |
+
* @throws \Riskified\Common\Exception\BaseException on any issue
|
| 112 |
+
*/
|
| 113 |
+
public function fulfillOrder($fulfillment) {
|
| 114 |
+
return $this->send_order($fulfillment, 'fulfill', true);
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
/**
|
| 118 |
+
* Send a Checkout to Riskified
|
| 119 |
+
* @param $checkout object Checkout to send
|
| 120 |
+
* @return object Response object
|
| 121 |
+
* @throws \Riskified\Common\Exception\BaseException on any issue
|
| 122 |
+
*/
|
| 123 |
+
public function createCheckout($checkout) {
|
| 124 |
+
return $this->send_checkout($checkout, 'checkout_create');
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
/**
|
| 128 |
+
* Notify that a Checkout failed
|
| 129 |
+
* @param $checkout object Checkout to send (with AuthotizationError field)
|
| 130 |
+
* @return object Response object
|
| 131 |
+
* @throws \Riskified\Common\Exception\BaseException on any issue
|
| 132 |
+
*/
|
| 133 |
+
public function deniedCheckout($checkout) {
|
| 134 |
+
return $this->send_checkout($checkout, 'checkout_denied');
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
public function sendHistoricalOrders($orders) {
|
| 138 |
$joined = join(',',array_map(function($order) { return $order->toJson(); }, $orders));
|
| 139 |
$json = '{"orders":['.$joined.']}';
|
| 140 |
return $this->send_json_request($json, 'historical');
|
| 141 |
}
|
| 142 |
|
| 143 |
+
|
| 144 |
protected function send_order($order, $endpoint, $enforce_required_keys) {
|
| 145 |
if ($this->validate($order, $enforce_required_keys)) {
|
| 146 |
$json = '{"order":' . $order->toJson() . '}';
|
| 149 |
return null;
|
| 150 |
}
|
| 151 |
|
| 152 |
+
protected function send_checkout($checkout, $endpoint) {
|
| 153 |
+
if ($this->validate($checkout, false)) {
|
| 154 |
+
$json = '{"checkout":' . $checkout->toJson() . '}';
|
| 155 |
+
return $this->send_json_request($json, $endpoint);
|
| 156 |
+
}
|
| 157 |
+
return null;
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
protected function validate($order, $enforce_required_keys=true) {
|
| 161 |
if (Riskified::$validations == Validations::SKIP)
|
| 162 |
return true;
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Transport/CurlTransport.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php namespace Riskified\OrderWebhook\Transport;
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php namespace Riskified\OrderWebhook\Transport;
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
lib/riskified_php_sdk/src/Riskified/autoloader.php
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php
|
| 2 |
/**
|
| 3 |
-
* Copyright 2013-
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
| 1 |
<?php
|
| 2 |
/**
|
| 3 |
+
* Copyright 2013-2015 Riskified.com, Inc. or its affiliates. All Rights Reserved.
|
| 4 |
*
|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License").
|
| 6 |
* You may not use this file except in compliance with the License.
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>riskified_magento</name>
|
| 4 |
-
<version>1.0.6.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>OSL v3.0</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -9,13 +9,14 @@
|
|
| 9 |
<summary>Riskified Magento extension</summary>
|
| 10 |
<description>Riskified reviews, approves & guarantees
|
| 11 |
transactions you would otherwise decline.</description>
|
| 12 |
-
<notes>*
|
| 13 |
-
*
|
| 14 |
-
*
|
|
|
|
| 15 |
<authors><author><name>Riskified_Mage</name><user>Riskified_Mage</user><email>support@riskified.com</email></author></authors>
|
| 16 |
-
<date>
|
| 17 |
-
<time>
|
| 18 |
-
<contents><target name="magecommunity"><dir name="Riskified"><dir name="Full"><dir><dir name="Helper"><file name="Data.php" hash="2d3f448cc5a13b49950826af2cd07148"/><file name="Debug.php" hash="18335d988a142ee639ea59dbecafa15c"/><file name="Log.php" hash="14125243576ab5b08f40066d24b7241d"/><dir name="Order"><file name="Invoice.php" hash="fd6fcbdedd44551785eddd0e1a482e80"/><file name="Status.php" hash="201a5c07c1d0d0b0a15d3bfb94a46d4b"/></dir><file name="Order.php" hash="
|
| 19 |
<compatible/>
|
| 20 |
<dependencies><required><php><min>4.4.0</min><max>6.0.0</max></php></required></dependencies>
|
| 21 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>riskified_magento</name>
|
| 4 |
+
<version>1.0.6.4</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>OSL v3.0</license>
|
| 7 |
<channel>community</channel>
|
| 9 |
<summary>Riskified Magento extension</summary>
|
| 10 |
<description>Riskified reviews, approves & guarantees
|
| 11 |
transactions you would otherwise decline.</description>
|
| 12 |
+
<notes>* Support for SagePay server gateway
|
| 13 |
+
* Support for Transarmor gateway
|
| 14 |
+
* New integration process support
|
| 15 |
+
* Historical orders script upgraded</notes>
|
| 16 |
<authors><author><name>Riskified_Mage</name><user>Riskified_Mage</user><email>support@riskified.com</email></author></authors>
|
| 17 |
+
<date>2015-02-15</date>
|
| 18 |
+
<time>10:58:02</time>
|
| 19 |
+
<contents><target name="magecommunity"><dir name="Riskified"><dir name="Full"><dir><dir name="Helper"><file name="Data.php" hash="2d3f448cc5a13b49950826af2cd07148"/><file name="Debug.php" hash="18335d988a142ee639ea59dbecafa15c"/><file name="Log.php" hash="14125243576ab5b08f40066d24b7241d"/><dir name="Order"><file name="Invoice.php" hash="fd6fcbdedd44551785eddd0e1a482e80"/><file name="Status.php" hash="201a5c07c1d0d0b0a15d3bfb94a46d4b"/></dir><file name="Order.php" hash="5a7c1c431fb7a8c7dccbee1f78d41f65"/></dir><dir name="Model"><file name="Authorizenet.php" hash="bd42f62d06a036b9da7709d2e40fc8f1"/><file name="Cron.php" hash="187b86ebe9238ff132ed0337f05a8ae9"/><file name="Observer.php" hash="f15afcb69bf13683d637b293fbdf1a6c"/><dir name="Resource"><dir name="Retry"><file name="Collection.php" hash="fd62ad4e4cdd8d372751bfa9988cc3a9"/></dir><file name="Retry.php" hash="3be3db7e54bd8bb45e0faffa1941f515"/></dir><file name="Retry.php" hash="89e7344139affa4fe0b9a252a5d1c592"/><dir name="System"><dir name="Config"><dir name="Source"><file name="ApprovedState.php" hash="5c620d1039347218354bd58c2238ecb4"/><file name="CaptureCase.php" hash="daafa6f53c65fa6e6e7ffbb067dbbbba"/><file name="DeclinedState.php" hash="a00907072c06ade079483e3db03bb94f"/><file name="Env.php" hash="4d923355b3e56fac95c2a9b3c353ab76"/></dir></dir></dir></dir><dir name="Test"><dir name="Config"><file name="General.php" hash="a5d4950c5655960879e7d75c06977941"/></dir><dir name="Helper"><dir name="General"><dir name="fixtures"><file name="extensionConfigEnabled.yaml" hash="eec8c8d8a1d5de49897b19740cf8e074"/></dir></dir><file name="General.php" hash="607c9711656be48084f6688e114b6bf6"/></dir><dir name="Model"><file name="Environments.php" hash="f3fc028d17c82b9b84b709b932e64eae"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="FullController.php" hash="f80e78a808e99f11a7bc00bd02be3f2e"/></dir><file name="ResponseController.php" hash="550c29c6c6706067bac3531b8f3eb37f"/></dir><dir name="etc"><file name="config.xml" hash="5ba5a1e9d059360274157d4c6b2dfc24"/><file name="system.xml" hash="9ed5ff1209c08a7babb0e286804c1f9b"/></dir><dir name="sql"><dir name="riskified_full_setup"><file name="mysql4-install-1.0.1.php" hash="6d29dde79353e8bfefa6ea7bc2ef562a"/><file name="mysql4-upgrade-1.0.2.0-1.0.2.1.php" hash="822e85326678a320f141a3ae948e4a24"/><file name="mysql4-upgrade-1.0.4-1.0.5.0.php" hash="557115e1a978d9b194b2cd1cfb8b5a95"/><file name="mysql4-upgrade-1.0.5.5-1.0.6.0.php" hash="0318846fbe8f3e56d8f7d3fdc750e102"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Riskified_Full.xml" hash="d684caecdf710e5d0173ca07e5c5d1c0"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="full.xml" hash="8dbb3dd16fcb5821eb07e9b5d978d55c"/></dir><dir name="template"><dir name="full"><file name="jsinit.phtml" hash="6f8f54c41d7f3f56a44627489eaf1923"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="full.xml" hash="9497753e5c3d2860062c5446c058b4bc"/></dir><dir name="template"><dir name="full"><file name="riskified.phtml" hash="fe4a577c6ef98316d906c36c17f11406"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="riskified"><file name="logo.jpg" hash="0ac96bf07aa8b8ecb3ff06c2ccbf0827"/></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="riskified_php_sdk"><file name="README.md" hash="f37118baa641e4ef6d670bb1c0298482"/><dir><dir name="sample"><file name="callback.php" hash="c6fb5a90b2c527b794fcec803acb36d9"/><file name="order_full_flow.php" hash="71d931fff3aa98402c9a7d3b271a6ae4"/><file name="order_marketplace_create.php" hash="ae3d2fb28154a710934d6243302a590d"/><file name="order_simple_submit.php" hash="d8458f7992b486b6dac28558526f068b"/><file name="run_callback_server.sh" hash="8202fd93c15e088d072805d3a2f4c02b"/><file name="upload_historical.php" hash="78bdb85c036183de16968a79c8836efd"/></dir><dir name="src"><dir name="Riskified"><dir name="Common"><file name="Env.php" hash="3fc8342a423141fb0c110901deebfe25"/><dir name="Exception"><file name="BaseException.php" hash="ce902d0a3bd9af53b3c1923541602ead"/></dir><file name="Riskified.php" hash="2137e73cf6371aeb113a6755357b603f"/><dir name="Signature"><file name="HttpDataSignature.php" hash="b9f5d57db1903126a72eb38ca55ba878"/></dir><file name="Validations.php" hash="4af37b31901f215b660c868c31594b75"/></dir><dir name="DecisionNotification"><dir name="Exception"><file name="AuthorizationException.php" hash="4cab71ac324efd3b29bdfa6236a8f531"/><file name="BadHeaderException.php" hash="407a0d9e94d52e8b43bed02e34bd4a70"/><file name="BadPostJsonException.php" hash="2e2a7f84fae19fd525f01f6899ea218b"/><file name="NotificationException.php" hash="8f7d1ed8b9523ec66423c6ff2703085f"/></dir><dir name="Model"><file name="Notification.php" hash="9e2f5fd421abe37ab7b742767966f312"/></dir></dir><dir name="OrderWebhook"><dir name="Exception"><file name="ClassMismatchPropertyException.php" hash="8854b7aea6736b290826eb44ac0ba578"/><file name="CurlException.php" hash="27488d2dd0fa2c25b647a5967e3821b1"/><file name="FormatMismatchPropertyException.php" hash="2729989c3ac2a245341fd01a4d004b49"/><file name="InvalidPropertyException.php" hash="97084ff2ff33f5c657c5876a44aa97d2"/><file name="MalformedJsonException.php" hash="8c795b605988f20f1899dcf160f29cf1"/><file name="MissingPropertyException.php" hash="5ad8df6ba645a113fac7b65e08167d2c"/><file name="MultiplePropertiesException.php" hash="aaa042c5a0fcfd15dc2744059b15798b"/><file name="PropertyException.php" hash="7a234406434c5616aab72da27a1ed6ed"/><file name="TypeMismatchPropertyException.php" hash="5eed61220c954a462411f433a2c85bf2"/><file name="UnsuccessfulActionException.php" hash="b02fafbda955fa889ca36c5092ccc68d"/></dir><dir name="Model"><file name="AbstractModel.php" hash="73adfaac9fe9e189827baac5a71e41a4"/><file name="Address.php" hash="68d2ed178575374f2b6f7701b6f30cd9"/><file name="Attribute.php" hash="e7fa146d7c9c807494c225e6a41afcfb"/><file name="AuthorizationError.php" hash="b82229eff42d94ceba58d4d6a3a4118b"/><file name="Checkout.php" hash="ede0e6d2fd8319ada669de35b4c3190f"/><file name="ClientDetails.php" hash="50b329fa6b77bcbeff4b725705b957af"/><file name="Customer.php" hash="02801c70557fbfa6aea7ac6058f6f4b4"/><file name="DiscountCode.php" hash="0861920950828a3ff19904b92b4cb50d"/><file name="Fulfillment.php" hash="9111db9b13ae7b2fbe6bf806a66d78f2"/><file name="FulfillmentDetails.php" hash="d3c11d4e8943862fc4a774f3f8e9d7d7"/><file name="LineItem.php" hash="3a03c75348060aa9ca930174b9d5dc56"/><file name="Order.php" hash="d32cd686532d5cc2810321c5befe3149"/><file name="OrderCancellation.php" hash="f6f2d5234bb98b56902e632fbccc07b3"/><file name="PaymentDetails.php" hash="413b5a6ab26ec6b9b0664a9d9e301c02"/><file name="Refund.php" hash="1c3ad264984585cfcefc909ffa708dc4"/><file name="RefundDetails.php" hash="f9a0e27e26bbfb6699bb0dd44fe6a184"/><file name="Seller.php" hash="2dd5dc2dc22582231263cad803149a16"/><file name="ShippingLine.php" hash="5ac14361474789db570fa6d14b17a973"/><file name="SocialDetails.php" hash="8a9296a4277a645bb86f5956b7437081"/><file name="TaxLine.php" hash="59f82a19bc9ada690aa79bc96307db5e"/></dir><dir name="Transport"><file name="AbstractTransport.php" hash="4ab3636ee044c9272542ce8076ac8d33"/><file name="CurlTransport.php" hash="ecfb195ac0f8f9599dd859dffc40c968"/></dir></dir><file name="autoloader.php" hash="f3471e90daf6184a096d337bbcd40bd1"/></dir></dir></dir><file name=".gitignore" hash="73f01e1298c44b6cc3e24a70cad8c56c"/></dir></target></contents>
|
| 20 |
<compatible/>
|
| 21 |
<dependencies><required><php><min>4.4.0</min><max>6.0.0</max></php></required></dependencies>
|
| 22 |
</package>
|
