riskified_magento - Version 1.0.9.3

Version Notes

* Support for /api/checkout_denied call.
* Only sends session ID for orders initiated by the end customer.

Download this release

Release Info

Developer Riskified_Mage
Extension riskified_magento
Version 1.0.9.3
Comparing to
See all releases


Code changes from version 1.0.9.2 to 1.0.9.3

app/code/community/Riskified/Full/.DS_Store CHANGED
Binary file
app/code/community/Riskified/Full/Helper/Data.php CHANGED
@@ -104,4 +104,36 @@ class Riskified_Full_Helper_Data extends Mage_Core_Helper_Abstract
104
  {
105
  return Riskified\Common\Riskified::API_VERSION;
106
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  }
104
  {
105
  return Riskified\Common\Riskified::API_VERSION;
106
  }
107
+
108
+ /**
109
+ * Return accept language header.
110
+ *
111
+ * @return string
112
+ */
113
+ public function getAcceptLanguage()
114
+ {
115
+ if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
116
+ $acceptLanguage = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
117
+ } else {
118
+ $acceptLanguage = Mage::app()->getLocale()->getLocaleCode();
119
+ }
120
+
121
+ return $acceptLanguage;
122
+ }
123
+
124
+ /**
125
+ * Return current date time with timezone.
126
+ *
127
+ * @param string $time Time.
128
+ *
129
+ * @return string
130
+ */
131
+ public function getDateTime($time = 'now')
132
+ {
133
+ $timezone = Mage::getStoreConfig('general/locale/timezone');
134
+ $dateTimeZone = new DateTimeZone($timezone);
135
+ $dateTime = new DateTime($time, $dateTimeZone);
136
+
137
+ return $dateTime->format($dateTime::ATOM);
138
+ }
139
  }
app/code/community/Riskified/Full/Helper/Order.php CHANGED
@@ -15,8 +15,12 @@ class Riskified_Full_Helper_Order extends Mage_Core_Helper_Abstract
15
  const ACTION_UPDATE = 'update';
16
  const ACTION_SUBMIT = 'submit';
17
  const ACTION_CANCEL = 'cancel';
 
 
 
18
 
19
  private $_customer = array();
 
20
 
21
  public function __construct()
22
  {
@@ -90,17 +94,28 @@ class Riskified_Full_Helper_Order extends Mage_Core_Helper_Abstract
90
  case self::ACTION_UPDATE:
91
  $orderForTransport = $this->getOrder($order);
92
  $response = $transport->updateOrder($orderForTransport);
93
-
94
  break;
95
  case self::ACTION_SUBMIT:
96
  $orderForTransport = $this->getOrder($order);
97
  $response = $transport->submitOrder($orderForTransport);
98
-
99
  break;
100
  case self::ACTION_CANCEL:
101
  $orderForTransport = $this->getOrderCancellation($order);
102
  $response = $transport->cancelOrder($orderForTransport);
103
-
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  break;
105
  }
106
 
@@ -138,6 +153,7 @@ class Riskified_Full_Helper_Order extends Mage_Core_Helper_Abstract
138
  throw $e;
139
  }
140
  catch (Exception $e) {
 
141
  Mage::helper('full/log')->logException($e);
142
  Mage::getSingleton('adminhtml/session')->addError('Riskified extension: ' . $e->getMessage());
143
 
@@ -263,6 +279,9 @@ class Riskified_Full_Helper_Order extends Mage_Core_Helper_Abstract
263
  {
264
  $transport = new Transport\CurlTransport(new Signature\HttpDataSignature());
265
  $transport->timeout = 15;
 
 
 
266
  return $transport;
267
  }
268
 
@@ -282,12 +301,15 @@ class Riskified_Full_Helper_Order extends Mage_Core_Helper_Abstract
282
  private function getOrder($model)
283
  {
284
  $gateway = 'unavailable';
 
 
285
  if ($model->getPayment()) {
286
  $gateway = $model->getPayment()->getMethod();
287
  }
288
 
289
  $order_array = array(
290
  'id' => $this->getOrderOrigId($model),
 
291
  'name' => $model->getIncrementId(),
292
  'email' => $model->getCustomerEmail(),
293
  'created_at' => $this->formatDateAsIso8601($model->getCreatedAt()),
@@ -316,12 +338,18 @@ class Riskified_Full_Helper_Order extends Mage_Core_Helper_Abstract
316
  unset($order_array['cart_token']);
317
  }
318
 
 
 
 
 
319
  $order = new Model\Order(array_filter($order_array, 'strlen'));
320
 
321
  $order->customer = $this->getCustomer($model);
322
  $order->shipping_address = $this->getShippingAddress($model);
323
  $order->billing_address = $this->getBillingAddress($model);
324
- $order->payment_details = $this->getPaymentDetails($model);
 
 
325
  $order->line_items = $this->getLineItems($model);
326
  $order->shipping_lines = $this->getShippingLines($model);
327
 
@@ -387,233 +415,6 @@ class Riskified_Full_Helper_Order extends Mage_Core_Helper_Abstract
387
  return $this->getAddress($mageAddr);
388
  }
389
 
390
- private function logPaymentData($model)
391
- {
392
- Mage::helper('full/log')->log("Payment info debug Logs:");
393
- try {
394
- $payment = $model->getPayment();
395
- $gatewayName = $payment->getMethod();
396
- Mage::helper('full/log')->log("Payment Gateway: " . $gatewayName);
397
- Mage::helper('full/log')->log("payment->getCcLast4(): " . $payment->getCcLast4());
398
- Mage::helper('full/log')->log("payment->getCcType(): " . $payment->getCcType());
399
- Mage::helper('full/log')->log("payment->getCcCidStatus(): " . $payment->getCcCidStatus());
400
- Mage::helper('full/log')->log("payment->getCcAvsStatus(): " . $payment->getCcAvsStatus());
401
- Mage::helper('full/log')->log("payment->getAdditionalInformation(): " . PHP_EOL . var_export($payment->getAdditionalInformation(), 1));
402
-
403
-
404
- Mage::helper('full/log')->log("payment->getAdyenPspReference(): " . $payment->getAdyenPspReference());
405
- Mage::helper('full/log')->log("payment->getAdyenKlarnaNumber(): " . $payment->getAdyenKlarnaNumber());
406
- Mage::helper('full/log')->log("payment->getAdyenAvsResult(): " . $payment->getAdyenAvsResult());
407
- Mage::helper('full/log')->log("payment->getAdyenCvcResult(): " . $payment->getAdyenCvcResult());
408
- Mage::helper('full/log')->log("payment->getAdyenBoletoPaidAmount(): " . $payment->getAdyenBoletoPaidAmount());
409
- Mage::helper('full/log')->log("payment->getAdyenTotalFraudScore(): " . $payment->getAdyenTotalFraudScore());
410
- Mage::helper('full/log')->log("payment->getAdyenRefusalReasonRaw(): " . $payment->getAdyenRefusalReasonRaw());
411
- Mage::helper('full/log')->log("payment->getAdyenAcquirerReference(): " . $payment->getAdyenAcquirerReference());
412
- Mage::helper('full/log')->log("(possibly BIN?) payment->getAdyenAuthCode(): " . $payment->getAdyenAuthCode());
413
-
414
- Mage::helper('full/log')->log("payment->getInfo(): " . PHP_EOL . var_export($payment->getInfo(), 1));
415
-
416
- # paypal_avs_code,paypal_cvv2_match,paypal_fraud_filters,avs_result,cvv2_check_result,address_verification,
417
- # postcode_verification,payment_status,pending_reason,payer_id,payer_status,email,credit_card_cvv2,
418
- # cc_avs_status,cc_approval,cc_last4,cc_owner,cc_exp_month,cc_exp_year,
419
- $sage = $model->getSagepayInfo();
420
- if (is_object($sage)) {
421
- #####,postcode_result,avscv2,address_status,payer_status
422
- Mage::helper('full/log')->log("sagepay->getLastFourDigits(): " . $sage->getLastFourDigits());
423
- Mage::helper('full/log')->log("sagepay->last_four_digits: " . $sage->getData('last_four_digits'));
424
- Mage::helper('full/log')->log("sagepay->getCardType(): " . $sage->getCardType());
425
- Mage::helper('full/log')->log("sagepay->card_type: " . $sage->getData('card_type'));
426
- Mage::helper('full/log')->log("sagepay->getAvsCv2Status: " . $sage->getAvsCv2Status());
427
- Mage::helper('full/log')->log("sagepay->address_result: " . $sage->getData('address_result'));
428
- Mage::helper('full/log')->log("sagepay->getCv2result: " . $sage->getCv2result());
429
- Mage::helper('full/log')->log("sagepay->cv2result: " . $sage->getData('cv2result'));
430
- Mage::helper('full/log')->log("sagepay->getAvscv2: " . $sage->getAvscv2());
431
- Mage::helper('full/log')->log("sagepay->getAddressResult: " . $sage->getAddressResult());
432
- Mage::helper('full/log')->log("sagepay->getPostcodeResult: " . $sage->getPostcodeResult());
433
- Mage::helper('full/log')->log("sagepay->getDeclineCode: " . $sage->getDeclineCode());
434
- Mage::helper('full/log')->log("sagepay->getBankAuthCode: " . $sage->getBankAuthCode());
435
- Mage::helper('full/log')->log("sagepay->getPayerStatus: " . $sage->getPayerStatus());
436
- }
437
- if ($gatewayName == "optimal_hosted") {
438
- $optimalTransaction = unserialize($payment->getAdditionalInformation('transaction'));
439
- if ($optimalTransaction) {
440
- Mage::helper('full/log')->log("Optimal transaction: ");
441
- Mage::helper('full/log')->log("transaction->cvdVerification: " . $optimalTransaction->cvdVerification);
442
- Mage::helper('full/log')->log("transaction->houseNumberVerification: " . $optimalTransaction->houseNumberVerification);
443
- Mage::helper('full/log')->log("transaction->zipVerification: " . $optimalTransaction->zipVerification);
444
- } else {
445
- Mage::helper('full/log')->log("Optimal gateway but no transaction found");
446
- }
447
- }
448
-
449
- } catch (Exception $e) {
450
- Mage::helper('full/log')->logException($e);
451
- }
452
- }
453
-
454
- private function getPaymentDetails($model)
455
- {
456
- $payment = $model->getPayment();
457
- if (!$payment) {
458
- return null;
459
- }
460
-
461
- if (Mage::helper('full')->isDebugLogsEnabled()) {
462
- $this->logPaymentData($model);
463
- }
464
-
465
- $transactionId = $payment->getTransactionId();
466
-
467
- $gatewayName = $payment->getMethod();
468
-
469
- try {
470
- switch ($gatewayName) {
471
- case 'authorizenet':
472
- $authorizeData = $payment->getAdditionalInformation('authorize_cards');
473
- if ($authorizeData && is_array($authorizeData)) {
474
- $cardsData = array_values($authorizeData);
475
- if ($cardsData && $cardsData[0]) {
476
- $cardData = $cardsData[0];
477
- if (isset($cardData['cc_last4'])) {
478
- $creditCardNumber = $cardData['cc_last4'];
479
- }
480
- if (isset($cardData['cc_type'])) {
481
- $creditCardCompany = $cardData['cc_type'];
482
- }
483
- if (isset($cardData['cc_avs_result_code'])) {
484
- $avsResultCode = $cardData['cc_avs_result_code'];
485
- }// getAvsResultCode
486
- if (isset($cardData['cc_response_code'])) {
487
- $cvvResultCode = $cardData['cc_response_code'];
488
- } // getCardCodeResponseCode
489
- }
490
- }
491
- break;
492
- case 'authnetcim':
493
- $avsResultCode = $payment->getAdditionalInformation('avs_result_code');
494
- $cvvResultCode = $payment->getAdditionalInformation('card_code_response_code');
495
- #$cavv_result_code = $payment->getAdditionalInformation('cavv_response_code');
496
- #$is_fraud = $payment->getAdditionalInformation('is_fraud');
497
- break;
498
- case 'optimal_hosted':
499
- try {
500
- $optimalTransaction = unserialize($payment->getAdditionalInformation('transaction'));
501
- $cvvResultCode = $optimalTransaction->cvdVerification;
502
- $houseVerification = $optimalTransaction->houseNumberVerification;
503
- $zipVerification = $optimalTransaction->zipVerification;
504
- $avsResultCode = $houseVerification . ',' . $zipVerification;
505
- } catch (Exception $e) {
506
- Mage::helper('full/log')->log("optimal payment (" . $gatewayName . ") additional payment info failed to parse:" . $e->getMessage());
507
- }
508
- break;
509
- case 'paypal_express':
510
- case 'paypaluk_express':
511
- case 'paypal_standard':
512
- $payerEmail = $payment->getAdditionalInformation('paypal_payer_email');
513
- $payerStatus = $payment->getAdditionalInformation('paypal_payer_status');
514
- $payerAddressStatus = $payment->getAdditionalInformation('paypal_address_status');
515
- $protectionEligibility = $payment->getAdditionalInformation('paypal_protection_eligibility');
516
- $paymentStatus = $payment->getAdditionalInformation('paypal_payment_status');
517
- $pendingReason = $payment->getAdditionalInformation('paypal_pending_reason');
518
- return new Model\PaymentDetails(array_filter(array(
519
- 'authorization_id' => $transactionId,
520
- 'payer_email' => $payerEmail,
521
- 'payer_status' => $payerStatus,
522
- 'payer_address_status' => $payerAddressStatus,
523
- 'protection_eligibility' => $protectionEligibility,
524
- 'payment_status' => $paymentStatus,
525
- 'pending_reason' => $pendingReason
526
- ), 'strlen'));
527
- case 'paypal_direct':
528
- case 'paypaluk_direct':
529
- $avsResultCode = $payment->getAdditionalInformation('paypal_avs_code');
530
- $cvvResultCode = $payment->getAdditionalInformation('paypal_cvv2_match');
531
- $creditCardNumber = $payment->getCcLast4();
532
- $creditCardCompany = $payment->getCcType();
533
- break;
534
- case 'sagepaydirectpro':
535
- case 'sage_pay_form':
536
- case 'sagepayserver':
537
- $sage = $model->getSagepayInfo();
538
- if ($sage) {
539
- $avsResultCode = $sage->getData('address_result');
540
- $cvvResultCode = $sage->getData('cv2result');
541
- $creditCardNumber = $sage->getData('last_four_digits');
542
- $creditCardCompany = $sage->getData('card_type');
543
- //Mage::helper('full/log')->log("sagepay payment (".$gatewayName.") additional info: ".PHP_EOL.var_export($sage->getAdditionalInformation(), 1));
544
- Mage::helper('full/log')->log("sagepay payment (" . $gatewayName . ") additional info: " . PHP_EOL . var_export($payment->getAdditionalInformation(), 1));
545
- } else {
546
- Mage::helper('full/log')->log("sagepay payment (" . $gatewayName . ") - getSagepayInfo returned null object");
547
- }
548
- break;
549
-
550
- case 'transarmor':
551
- $avsResultCode = $payment->getAdditionalInformation('avs_response');
552
- $cvvResultCode = $payment->getAdditionalInformation('cvv2_response');
553
- Mage::helper('full/log')->log("transarmor payment additional info: " . PHP_EOL . var_export($payment->getAdditionalInformation(), 1));
554
- break;
555
-
556
- case 'braintree':
557
- case 'braintreevzero':
558
- $cvvResultCode = $payment->getAdditionalInformation('cvvResponseCode');
559
- $creditCardBin = $payment->getAdditionalInformation('bin');
560
- $houseVerification = $payment->getAdditionalInformation('avsStreetAddressResponseCode');
561
- $zipVerification = $payment->getAdditionalInformation('avsPostalCodeResponseCode');
562
- $avsResultCode = $houseVerification . ',' . $zipVerification;
563
- break;
564
-
565
- case 'adyen_cc':
566
- $avsResultCode = $payment->getAdyenAvsResult();
567
- $cvvResultCode = $payment->getAdyenCvcResult();
568
- $transactionId = $payment->getAdyenPspReference();
569
- $creditCardBin = $payment->getAdyenCardBin();
570
- break;
571
-
572
- // Conekta gateway
573
- case 'card':
574
- $creditCardBin = $payment->getCardBin();
575
- break;
576
-
577
- default:
578
- Mage::helper('full/log')->log("unknown gateway:" . $gatewayName);
579
- Mage::helper('full/log')->log("Gateway payment (" . $gatewayName . ") additional info: " . PHP_EOL . var_export($payment->getAdditionalInformation(), 1));
580
- break;
581
- }
582
- } catch (Exception $e) {
583
- Mage::helper('full/log')->logException($e);
584
- Mage::getSingleton('adminhtml/session')->addError('Riskified extension: ' . $e->getMessage());
585
- }
586
-
587
- if (!isset($cvvResultCode)) {
588
- $cvvResultCode = $payment->getCcCidStatus();
589
- }
590
- if (!isset($creditCardNumber)) {
591
- $creditCardNumber = $payment->getCcLast4();
592
- }
593
- if (!isset($creditCardCompany)) {
594
- $creditCardCompany = $payment->getCcType();
595
- }
596
- if (!isset($avsResultCode)) {
597
- $avsResultCode = $payment->getCcAvsStatus();
598
- }
599
- if (!isset($creditCardBin)) {
600
- $creditCardBin = $payment->getAdditionalInformation('riskified_cc_bin');
601
- }
602
- if (isset($creditCardNumber)) {
603
- $creditCardNumber = "XXXX-XXXX-XXXX-" . $creditCardNumber;
604
- }
605
-
606
-
607
- return new Model\PaymentDetails(array_filter(array(
608
- 'authorization_id' => $transactionId,
609
- 'avs_result_code' => $avsResultCode,
610
- 'cvv_result_code' => $cvvResultCode,
611
- 'credit_card_number' => $creditCardNumber,
612
- 'credit_card_company' => $creditCardCompany,
613
- 'credit_card_bin' => $creditCardBin
614
- ), 'strlen'));
615
- }
616
-
617
  private function getLineItems($model)
618
  {
619
  $lineItems = array();
@@ -675,7 +476,7 @@ class Riskified_Full_Helper_Order extends Mage_Core_Helper_Abstract
675
  private function getClientDetails($model)
676
  {
677
  return new Model\ClientDetails(array_filter(array(
678
- 'accept_language' => Mage::app()->getLocale()->getLocaleCode(),
679
  //'browser_ip' => $this->getRemoteIp($model),
680
  'user_agent' => Mage::helper('core/http')->getHttpUserAgent()
681
  ), 'strlen'));
15
  const ACTION_UPDATE = 'update';
16
  const ACTION_SUBMIT = 'submit';
17
  const ACTION_CANCEL = 'cancel';
18
+ const ACTION_REFUND = 'refund';
19
+ const ACTION_CHECKOUT_CREATE = 'checkout_create';
20
+ const ACTION_CHECKOUT_DENIED = 'checkout_denied';
21
 
22
  private $_customer = array();
23
+ protected $requestData = array();
24
 
25
  public function __construct()
26
  {
94
  case self::ACTION_UPDATE:
95
  $orderForTransport = $this->getOrder($order);
96
  $response = $transport->updateOrder($orderForTransport);
 
97
  break;
98
  case self::ACTION_SUBMIT:
99
  $orderForTransport = $this->getOrder($order);
100
  $response = $transport->submitOrder($orderForTransport);
 
101
  break;
102
  case self::ACTION_CANCEL:
103
  $orderForTransport = $this->getOrderCancellation($order);
104
  $response = $transport->cancelOrder($orderForTransport);
105
+ break;
106
+ case self::ACTION_REFUND:
107
+ $orderForTransport = new Model\Refund($order);
108
+ $response = $transport->refundOrder($orderForTransport);
109
+ break;
110
+ case self::ACTION_CHECKOUT_CREATE:
111
+ $checkoutForTransport = new Model\Checkout($order);
112
+ $response = $transport->createCheckout($checkoutForTransport);
113
+ Mage::log(var_export($this->requestData, true), null, 'riskified-request-data.log');
114
+ break;
115
+ case self::ACTION_CHECKOUT_DENIED:
116
+ $checkoutForTransport = new Model\Checkout($order);
117
+ $response = $transport->deniedCheckout($checkoutForTransport);
118
+ Mage::log(var_export($this->requestData, true), null, 'riskified-request-data.log');
119
  break;
120
  }
121
 
153
  throw $e;
154
  }
155
  catch (Exception $e) {
156
+ Mage::log(var_export($this->requestData, true), null, 'riskified-request-data.log');
157
  Mage::helper('full/log')->logException($e);
158
  Mage::getSingleton('adminhtml/session')->addError('Riskified extension: ' . $e->getMessage());
159
 
279
  {
280
  $transport = new Transport\CurlTransport(new Signature\HttpDataSignature());
281
  $transport->timeout = 15;
282
+
283
+ $transport->requestData = &$this->requestData;
284
+
285
  return $transport;
286
  }
287
 
301
  private function getOrder($model)
302
  {
303
  $gateway = 'unavailable';
304
+ $currentStore = Mage::app()->getStore();
305
+
306
  if ($model->getPayment()) {
307
  $gateway = $model->getPayment()->getMethod();
308
  }
309
 
310
  $order_array = array(
311
  'id' => $this->getOrderOrigId($model),
312
+ 'checkout_id' => $model->getQuoteId(),
313
  'name' => $model->getIncrementId(),
314
  'email' => $model->getCustomerEmail(),
315
  'created_at' => $this->formatDateAsIso8601($model->getCreatedAt()),
338
  unset($order_array['cart_token']);
339
  }
340
 
341
+ if ($currentStore->isAdmin()) {
342
+ $order_array['cart_token'] = null;
343
+ }
344
+
345
  $order = new Model\Order(array_filter($order_array, 'strlen'));
346
 
347
  $order->customer = $this->getCustomer($model);
348
  $order->shipping_address = $this->getShippingAddress($model);
349
  $order->billing_address = $this->getBillingAddress($model);
350
+
351
+ $orderPaymentHelper = Mage::helper('full/order_payment');
352
+ $order->payment_details = $orderPaymentHelper->getPaymentDetails($model);
353
  $order->line_items = $this->getLineItems($model);
354
  $order->shipping_lines = $this->getShippingLines($model);
355
 
415
  return $this->getAddress($mageAddr);
416
  }
417
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
418
  private function getLineItems($model)
419
  {
420
  $lineItems = array();
476
  private function getClientDetails($model)
477
  {
478
  return new Model\ClientDetails(array_filter(array(
479
+ 'accept_language' => Mage::helper('full')->getAcceptLanguage(),
480
  //'browser_ip' => $this->getRemoteIp($model),
481
  'user_agent' => Mage::helper('core/http')->getHttpUserAgent()
482
  ), 'strlen'));
app/code/community/Riskified/Full/Helper/Order/Payment.php ADDED
@@ -0,0 +1,414 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once
4
+ Mage::getBaseDir('lib')
5
+ . DS . 'riskified_php_sdk'
6
+ . DS . 'src'
7
+ . DS . 'Riskified'
8
+ . DS . 'autoloader.php';
9
+
10
+ use Riskified\OrderWebhook\Model;
11
+
12
+ /**
13
+ * Riskified Full order payment helper.
14
+ *
15
+ * @category Riskified
16
+ * @package Riskified_Full
17
+ * @author Piotr Pierzak <piotrek.pierzak@gmail.com>
18
+ */
19
+ class Riskified_Full_Helper_Order_Payment extends Mage_Core_Helper_Abstract
20
+ {
21
+ /**
22
+ * Return order payment details.
23
+ *
24
+ * @param Mage_Sales_Model_Order $order Order object.
25
+ *
26
+ * @return Model\PaymentDetails|null
27
+ */
28
+ public function getPaymentDetails($order)
29
+ {
30
+ $payment = $order->getPayment();
31
+ if (!$payment) {
32
+ return null;
33
+ }
34
+
35
+ if (Mage::helper('full')->isDebugLogsEnabled()) {
36
+ $this->logPaymentData($order);
37
+ }
38
+
39
+ $transactionId = $payment->getTransactionId();
40
+ $gatewayName = $payment->getMethod();
41
+
42
+ try {
43
+ switch ($gatewayName) {
44
+ case 'authorizenet':
45
+ $authorizeData = $payment
46
+ ->getAdditionalInformation('authorize_cards');
47
+ if ($authorizeData && is_array($authorizeData)) {
48
+ $cardsData = array_values($authorizeData);
49
+ if ($cardsData && $cardsData[0]) {
50
+ $cardData = $cardsData[0];
51
+ if (isset($cardData['cc_last4'])) {
52
+ $creditCardNumber = $cardData['cc_last4'];
53
+ }
54
+ if (isset($cardData['cc_type'])) {
55
+ $creditCardCompany = $cardData['cc_type'];
56
+ }
57
+ if (isset($cardData['cc_avs_result_code'])) {
58
+ $avsResultCode = $cardData['cc_avs_result_code'];
59
+ } // getAvsResultCode
60
+ if (isset($cardData['cc_response_code'])) {
61
+ $cvvResultCode = $cardData['cc_response_code'];
62
+ } // getCardCodeResponseCode
63
+ }
64
+ }
65
+ break;
66
+ case 'authnetcim':
67
+ $avsResultCode = $payment
68
+ ->getAdditionalInformation('avs_result_code');
69
+ $cvvResultCode = $payment
70
+ ->getAdditionalInformation('card_code_response_code');
71
+ break;
72
+ case 'optimal_hosted':
73
+ try {
74
+ $optimalTransaction = unserialize(
75
+ $payment->getAdditionalInformation('transaction')
76
+ );
77
+ $cvvResultCode = $optimalTransaction->cvdVerification;
78
+ $houseVerification = $optimalTransaction
79
+ ->houseNumberVerification;
80
+ $zipVerification = $optimalTransaction->zipVerification;
81
+ $avsResultCode = $houseVerification . ',' . $zipVerification;
82
+ } catch (Exception $e) {
83
+ Mage::helper('full/log')->log(
84
+ 'optimal payment (' . $gatewayName . ') additional '
85
+ . 'payment info failed to parse:' . $e->getMessage()
86
+ );
87
+ }
88
+ break;
89
+ case 'paypal_express':
90
+ case 'paypaluk_express':
91
+ case 'paypal_standard':
92
+ $payerEmail = $payment
93
+ ->getAdditionalInformation('paypal_payer_email');
94
+ $payerStatus = $payment
95
+ ->getAdditionalInformation('paypal_payer_status');
96
+ $payerAddressStatus = $payment
97
+ ->getAdditionalInformation('paypal_address_status');
98
+ $protectionEligibility = $payment
99
+ ->getAdditionalInformation('paypal_protection_eligibility');
100
+ $paymentStatus = $payment
101
+ ->getAdditionalInformation('paypal_payment_status');
102
+ $pendingReason = $payment
103
+ ->getAdditionalInformation('paypal_pending_reason');
104
+
105
+ return new Model\PaymentDetails(
106
+ array_filter(
107
+ array(
108
+ 'authorization_id' => $transactionId,
109
+ 'payer_email' => $payerEmail,
110
+ 'payer_status' => $payerStatus,
111
+ 'payer_address_status' => $payerAddressStatus,
112
+ 'protection_eligibility' => $protectionEligibility,
113
+ 'payment_status' => $paymentStatus,
114
+ 'pending_reason' => $pendingReason,
115
+ ),
116
+ 'strlen'
117
+ )
118
+ );
119
+ case 'paypal_direct':
120
+ case 'paypaluk_direct':
121
+ $avsResultCode = $payment
122
+ ->getAdditionalInformation('paypal_avs_code');
123
+ $cvvResultCode = $payment
124
+ ->getAdditionalInformation('paypal_cvv2_match');
125
+ $creditCardNumber = $payment->getCcLast4();
126
+ $creditCardCompany = $payment->getCcType();
127
+ break;
128
+ case 'sagepaydirectpro':
129
+ case 'sage_pay_form':
130
+ case 'sagepayserver':
131
+ $sage = $order->getSagepayInfo();
132
+ if ($sage) {
133
+ $avsResultCode = $sage->getData('address_result');
134
+ $cvvResultCode = $sage->getData('cv2result');
135
+ $creditCardNumber = $sage->getData('last_four_digits');
136
+ $creditCardCompany = $sage->getData('card_type');
137
+ Mage::helper('full/log')->log(
138
+ 'sagepay payment (' . $gatewayName . ') additional'
139
+ . 'info: ' . PHP_EOL
140
+ . var_export($payment->getAdditionalInformation(),
141
+ 1)
142
+ );
143
+ } else {
144
+ Mage::helper('full/log')->log(
145
+ 'sagepay payment (' . $gatewayName . ') - '
146
+ . 'getSagepayInfo returned null object'
147
+ );
148
+ }
149
+ break;
150
+
151
+ case 'transarmor':
152
+ $avsResultCode = $payment
153
+ ->getAdditionalInformation('avs_response');
154
+ $cvvResultCode = $payment
155
+ ->getAdditionalInformation('cvv2_response');
156
+ Mage::helper('full/log')->log(
157
+ 'transarmor payment additional info: ' . PHP_EOL
158
+ . var_export($payment->getAdditionalInformation(), 1)
159
+ );
160
+ break;
161
+
162
+ case 'braintree':
163
+ case 'braintreevzero':
164
+ $cvvResultCode = $payment
165
+ ->getAdditionalInformation('cvvResponseCode');
166
+ $creditCardBin = $payment
167
+ ->getAdditionalInformation('bin');
168
+ $houseVerification = $payment
169
+ ->getAdditionalInformation('avsStreetAddressResponseCode');
170
+ $zipVerification = $payment
171
+ ->getAdditionalInformation('avsPostalCodeResponseCode');
172
+ $avsResultCode = $houseVerification . ',' . $zipVerification;
173
+ break;
174
+
175
+ case 'adyen_cc':
176
+ $avsResultCode = $payment->getAdyenAvsResult();
177
+ $cvvResultCode = $payment->getAdyenCvcResult();
178
+ $transactionId = $payment->getAdyenPspReference();
179
+ $creditCardBin = $payment->getAdyenCardBin();
180
+ break;
181
+
182
+ // Conekta gateway
183
+ case 'card':
184
+ $creditCardBin = $payment->getCardBin();
185
+ break;
186
+
187
+ default:
188
+ Mage::helper('full/log')->log('unknown gateway:' . $gatewayName);
189
+ Mage::helper('full/log')->log(
190
+ 'Gateway payment (' . $gatewayName . ') additional '
191
+ . 'info: ' . PHP_EOL
192
+ . var_export($payment->getAdditionalInformation(), 1)
193
+ );
194
+ break;
195
+ }
196
+ } catch (Exception $e) {
197
+ Mage::helper('full/log')->logException($e);
198
+ Mage::getSingleton('adminhtml/session')
199
+ ->addError('Riskified extension: ' . $e->getMessage());
200
+ }
201
+
202
+ if (!isset($cvvResultCode)) {
203
+ $cvvResultCode = $payment->getCcCidStatus();
204
+ }
205
+ if (!isset($creditCardNumber)) {
206
+ $creditCardNumber = $payment->getCcLast4();
207
+ }
208
+ if (!isset($creditCardCompany)) {
209
+ $creditCardCompany = $payment->getCcType();
210
+ }
211
+ if (!isset($avsResultCode)) {
212
+ $avsResultCode = $payment->getCcAvsStatus();
213
+ }
214
+ if (!isset($creditCardBin)) {
215
+ $creditCardBin = $payment->getAdditionalInformation('riskified_cc_bin');
216
+ }
217
+ if (isset($creditCardNumber)) {
218
+ $creditCardNumber = "XXXX-XXXX-XXXX-" . $creditCardNumber;
219
+ }
220
+
221
+ return new Model\PaymentDetails(
222
+ array_filter(
223
+ array(
224
+ 'authorization_id' => $transactionId,
225
+ 'avs_result_code' => $avsResultCode,
226
+ 'cvv_result_code' => $cvvResultCode,
227
+ 'credit_card_number' => $creditCardNumber,
228
+ 'credit_card_company' => $creditCardCompany,
229
+ 'credit_card_bin' => $creditCardBin,
230
+ ),
231
+ 'strlen'
232
+ )
233
+ );
234
+ }
235
+
236
+ /**
237
+ * Log payment data.
238
+ *
239
+ * @param Mage_Sales_Model_Order $order Order object.
240
+ *
241
+ * @return Riskified_Full_Helper_Order_Payment
242
+ */
243
+ protected function logPaymentData($order)
244
+ {
245
+ $logHelper = Mage::helper('full/log');
246
+
247
+ $logHelper->log('Payment info debug Logs:');
248
+ try {
249
+ $payment = $order->getPayment();
250
+ $gatewayName = $payment->getMethod();
251
+
252
+ $logHelper->log(
253
+ 'Payment Gateway: ' . $gatewayName
254
+ );
255
+ $logHelper->log(
256
+ 'payment->getCcLast4(): ' . $payment->getCcLast4()
257
+ );
258
+ $logHelper->log(
259
+ 'payment->getCcType(): ' . $payment->getCcType()
260
+ );
261
+ $logHelper->log(
262
+ 'payment->getCcCidStatus(): '
263
+ . $payment->getCcCidStatus()
264
+ );
265
+ $logHelper->log(
266
+ 'payment->getCcAvsStatus(): '
267
+ . $payment->getCcAvsStatus()
268
+ );
269
+ $logHelper->log(
270
+ 'payment->getAdditionalInformation(): ' . PHP_EOL
271
+ . var_export($payment->getAdditionalInformation(), 1)
272
+ );
273
+
274
+ $logHelper->log(
275
+ 'payment->getAdyenPspReference(): '
276
+ . $payment->getAdyenPspReference()
277
+ );
278
+ $logHelper->log(
279
+ 'payment->getAdyenKlarnaNumber(): '
280
+ . $payment->getAdyenKlarnaNumber()
281
+ );
282
+ $logHelper->log(
283
+ 'payment->getAdyenAvsResult(): '
284
+ . $payment->getAdyenAvsResult()
285
+ );
286
+ $logHelper->log(
287
+ 'payment->getAdyenCvcResult(): '
288
+ . $payment->getAdyenCvcResult()
289
+ );
290
+ $logHelper->log(
291
+ 'payment->getAdyenBoletoPaidAmount(): '
292
+ . $payment->getAdyenBoletoPaidAmount()
293
+ );
294
+ $logHelper->log(
295
+ 'payment->getAdyenTotalFraudScore(): '
296
+ . $payment->getAdyenTotalFraudScore()
297
+ );
298
+ $logHelper->log(
299
+ 'payment->getAdyenRefusalReasonRaw(): '
300
+ . $payment->getAdyenRefusalReasonRaw()
301
+ );
302
+ $logHelper->log(
303
+ 'payment->getAdyenAcquirerReference(): '
304
+ . $payment->getAdyenAcquirerReference()
305
+ );
306
+ $logHelper->log(
307
+ '(possibly BIN?) payment->getAdyenAuthCode(): '
308
+ . $payment->getAdyenAuthCode()
309
+ );
310
+
311
+ $logHelper->log(
312
+ 'payment->getInfo(): ' . PHP_EOL
313
+ . var_export($payment->getInfo(), 1)
314
+ );
315
+
316
+ // paypal_avs_code,paypal_cvv2_match,paypal_fraud_filters,
317
+ // avs_result,cvv2_check_result,address_verification,
318
+ // postcode_verification,payment_status,pending_reason,payer_id,
319
+ // payer_status,email,credit_card_cvv2, cc_avs_status,cc_approval,
320
+ // cc_last4,cc_owner,cc_exp_month,cc_exp_year
321
+
322
+ $sage = $order->getSagepayInfo();
323
+ if (is_object($sage)) {
324
+ // postcode_result,avscv2,address_status,payer_status
325
+ $logHelper->log(
326
+ 'sagepay->getLastFourDigits(): '
327
+ . $sage->getLastFourDigits()
328
+ );
329
+ $logHelper->log(
330
+ 'sagepay->last_four_digits: '
331
+ . $sage->getData('last_four_digits')
332
+ );
333
+ $logHelper->log(
334
+ 'sagepay->getCardType(): '
335
+ . $sage->getCardType()
336
+ );
337
+ $logHelper->log(
338
+ 'sagepay->card_type: '
339
+ . $sage->getData('card_type')
340
+ );
341
+ $logHelper->log(
342
+ 'sagepay->getAvsCv2Status: '
343
+ . $sage->getAvsCv2Status()
344
+ );
345
+ $logHelper->log(
346
+ 'sagepay->address_result: '
347
+ . $sage->getData('address_result')
348
+ );
349
+ $logHelper->log(
350
+ 'sagepay->getCv2result: '
351
+ . $sage->getCv2result()
352
+ );
353
+ $logHelper->log(
354
+ 'sagepay->cv2result: '
355
+ . $sage->getData('cv2result')
356
+ );
357
+ $logHelper->log(
358
+ 'sagepay->getAvscv2: '
359
+ . $sage->getAvscv2()
360
+ );
361
+ $logHelper->log(
362
+ 'sagepay->getAddressResult: '
363
+ . $sage->getAddressResult()
364
+ );
365
+ $logHelper->log(
366
+ 'sagepay->getPostcodeResult: '
367
+ . $sage->getPostcodeResult()
368
+ );
369
+ $logHelper->log(
370
+ 'sagepay->getDeclineCode: '
371
+ . $sage->getDeclineCode()
372
+ );
373
+ $logHelper->log(
374
+ 'sagepay->getBankAuthCode: '
375
+ . $sage->getBankAuthCode()
376
+ );
377
+ $logHelper->log(
378
+ 'sagepay->getPayerStatus: '
379
+ . $sage->getPayerStatus()
380
+ );
381
+ }
382
+
383
+ if ($gatewayName == 'optimal_hosted') {
384
+ $optimalTransaction = unserialize(
385
+ $payment->getAdditionalInformation('transaction')
386
+ );
387
+ if ($optimalTransaction) {
388
+ $logHelper->log(
389
+ 'Optimal transaction: '
390
+ );
391
+ $logHelper->log(
392
+ 'transaction->cvdVerification: '
393
+ . $optimalTransaction->cvdVerification
394
+ );
395
+ $logHelper->log(
396
+ 'transaction->houseNumberVerification: '
397
+ . $optimalTransaction->houseNumberVerification
398
+ );
399
+ $logHelper->log(
400
+ 'transaction->zipVerification: '
401
+ . $optimalTransaction->zipVerification
402
+ );
403
+ } else {
404
+ $logHelper->log('Optimal gateway but no transaction found');
405
+ }
406
+ }
407
+
408
+ } catch (Exception $e) {
409
+ $logHelper->logException($e);
410
+ }
411
+
412
+ return $this;
413
+ }
414
+ }
app/code/community/Riskified/Full/Model/Observer.php CHANGED
@@ -392,7 +392,7 @@ class Riskified_Full_Model_Observer
392
  $order = $observer->getOrder();
393
 
394
  // Sanity check
395
- if (!$order || !$order->getId()) {
396
  return;
397
  }
398
 
392
  $order = $observer->getOrder();
393
 
394
  // Sanity check
395
+ if (!$order || !$order instanceof Mage_Sales_Model_Order || !$order->getId()) {
396
  return;
397
  }
398
 
app/code/community/Riskified/Full/Model/Observer/Order/Creditmemo/Save.php ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Riskified Full order creditmemo save observer.
5
+ *
6
+ * @category Riskified
7
+ * @package Riskified_Full
8
+ * @author Piotr Pierzak <piotrek.pierzak@gmail.com>
9
+ */
10
+ class Riskified_Full_Model_Observer_Order_Creditmemo_Save
11
+ {
12
+ /**
13
+ * Handle credit memo save.
14
+ *
15
+ * @param Varien_Event_Observer $observer Observer object.
16
+ *
17
+ * @return Riskified_Full_Model_Observer_Order_Creditmemo_Save
18
+ */
19
+ public function handleCreditmemoSave(
20
+ Varien_Event_Observer $observer
21
+ ) {
22
+ $creditmemo = $observer->getEvent()->getCreditmemo();
23
+
24
+ $reason = '';
25
+ $commentsCollection = $creditmemo->getCommentsCollection();
26
+ foreach ($commentsCollection as $commentModel) {
27
+ $comment = trim($commentModel->getComment());
28
+ $comment = ucfirst($comment);
29
+ if (substr($comment, -1) !== '.') {
30
+ $comment .= '.';
31
+ }
32
+
33
+ $reason .= $comment . ' ';
34
+ }
35
+ $reason = trim($reason);
36
+
37
+ $payload = array(
38
+ 'id' => (int)$creditmemo->getOrderId(),
39
+ 'refunds' => array(
40
+ array(
41
+ 'refund_id' => $creditmemo->getId(),
42
+ 'amount' => $creditmemo->getGrandTotal(),
43
+ 'refunded_at' => Mage::helper('full')->getDateTime(
44
+ $creditmemo->getCreatedAt()
45
+ ),
46
+ 'currency' => $creditmemo->getOrderCurrencyCode(),
47
+ 'reason' => $reason,
48
+ ),
49
+ ),
50
+ );
51
+
52
+ unset(
53
+ $comment,
54
+ $commentModel,
55
+ $commentsCollection,
56
+ $creditmemo,
57
+ $reason
58
+ );
59
+
60
+ $helper = Mage::helper('full/order');
61
+ $helper->postOrder(
62
+ $payload,
63
+ Riskified_Full_Helper_Order::ACTION_REFUND
64
+ );
65
+
66
+ return $this;
67
+ }
68
+ }
app/code/community/Riskified/Full/Model/Observer/Order/Payment/Failed.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Riskified Full failed order payment observer.
5
+ *
6
+ * @category Riskified
7
+ * @package Riskified_Full
8
+ * @author Piotr Pierzak <piotrek.pierzak@gmail.com>
9
+ */
10
+ class Riskified_Full_Model_Observer_Order_Payment_Failed
11
+ {
12
+ /**
13
+ * Default failed transaction handler.
14
+ *
15
+ * @param Varien_Event_Observer $observer Observer object.
16
+ *
17
+ * @return Riskified_Full_Model_Observer_Order_Payment_Failed
18
+ */
19
+ public function handleDefaultFailedTransaction(
20
+ Varien_Event_Observer $observer
21
+ ) {
22
+ $order = $observer->getEvent()->getOrder();
23
+
24
+ $orderPaymentHelper = Mage::helper('full/order_payment');
25
+ $paymentDetails = $orderPaymentHelper->getPaymentDetails($order);
26
+
27
+ $paymentDetailsArray = json_decode($paymentDetails->toJson(), true);
28
+ $payload = array(
29
+ 'id' => (int)$order->getQuoteId(),
30
+ 'payment_details' => array_merge(
31
+ $paymentDetailsArray,
32
+ array(
33
+ 'authorization_error' => array(
34
+ 'error_code' => 'magento_generic_auth_error',
35
+ 'message' => 'General processing error',
36
+ 'created_at' => Mage::helper('full')->getDateTime(),
37
+ ),
38
+ )
39
+ ),
40
+ );
41
+
42
+ unset(
43
+ $orderPaymentHelper,
44
+ $paymentDetails,
45
+ $paymentDetailsArray
46
+ );
47
+
48
+ $helper = Mage::helper('full/order');
49
+ $helper->postOrder(
50
+ $payload,
51
+ Riskified_Full_Helper_Order::ACTION_CHECKOUT_DENIED
52
+ );
53
+
54
+ return $this;
55
+ }
56
+ }
app/code/community/Riskified/Full/Model/Observer/Quote/Submit.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Riskified Full quote submit observer.
5
+ *
6
+ * @category Riskified
7
+ * @package Riskified_Full
8
+ * @author Piotr Pierzak <piotrek.pierzak@gmail.com>
9
+ */
10
+ class Riskified_Full_Model_Observer_Quote_Submit
11
+ {
12
+ /**
13
+ * Default failed transaction handler.
14
+ *
15
+ * @param Varien_Event_Observer $observer Observer object.
16
+ *
17
+ * @return Riskified_Full_Model_Observer_Quote_Submit
18
+ */
19
+ public function handleQuoteSubmit(
20
+ Varien_Event_Observer $observer
21
+ ) {
22
+ /*$quote = $observer->getEvent()->getQuote();
23
+
24
+ $payload = array(
25
+ 'id' => (int)$quote->getId(),
26
+ );
27
+
28
+ $helper = Mage::helper('full/order');
29
+ $helper->postOrder(
30
+ $payload,
31
+ Riskified_Full_Helper_Order::ACTION_CHECKOUT_CREATE
32
+ );*/
33
+
34
+ return $this;
35
+ }
36
+ }
{lib/riskified_scripts → app/code/community/Riskified/Full/Test}/.DS_Store RENAMED
Binary file
app/code/community/Riskified/Full/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Riskified_Full>
5
- <version>1.0.9.2</version>
6
  </Riskified_Full>
7
  </modules>
8
 
@@ -182,6 +182,22 @@
182
  </riskified_full_process_successful_post>
183
  </observers>
184
  </riskified_full_post_order_success>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  </events>
186
  </global>
187
 
@@ -228,6 +244,14 @@
228
  </module>
229
  </observers>
230
  </adminhtml_widget_container_html_before>
 
 
 
 
 
 
 
 
231
  </events>
232
  <layout>
233
  <updates>
2
  <config>
3
  <modules>
4
  <Riskified_Full>
5
+ <version>1.0.9.3</version>
6
  </Riskified_Full>
7
  </modules>
8
 
182
  </riskified_full_process_successful_post>
183
  </observers>
184
  </riskified_full_post_order_success>
185
+ <sales_model_service_quote_submit_failure>
186
+ <observers>
187
+ <riskified_full_handle_default_failed_transaction>
188
+ <class>full/observer_order_payment_failed</class>
189
+ <method>handleDefaultFailedTransaction</method>
190
+ </riskified_full_handle_default_failed_transaction>
191
+ </observers>
192
+ </sales_model_service_quote_submit_failure>
193
+ <sales_model_service_quote_submit_before>
194
+ <observers>
195
+ <riskified_full_handle_quote_submit>
196
+ <class>full/observer_quote_submit</class>
197
+ <method>handleQuoteSubmit</method>
198
+ </riskified_full_handle_quote_submit>
199
+ </observers>
200
+ </sales_model_service_quote_submit_before>
201
  </events>
202
  </global>
203
 
244
  </module>
245
  </observers>
246
  </adminhtml_widget_container_html_before>
247
+ <sales_order_creditmemo_save_after>
248
+ <observers>
249
+ <riskified_full_handle_creditmemo_save>
250
+ <class>full/observer_order_creditmemo_save</class>
251
+ <method>handleCreditmemoSave</method>
252
+ </riskified_full_handle_creditmemo_save>
253
+ </observers>
254
+ </sales_order_creditmemo_save_after>
255
  </events>
256
  <layout>
257
  <updates>
app/code/community/Riskified/Full/etc/system.xml CHANGED
@@ -43,7 +43,7 @@
43
  <show_in_website>0</show_in_website>
44
  <show_in_store>0</show_in_store>
45
  <comment>
46
- <![CDATA[This is the shop domain used during signup. See <a href="http://www.riskified.com/documentation/magento.html" target="_blank">documentation</a> for more details.]]></comment>
47
  </domain>
48
  <key translate="label comment">
49
  <label>Auth token</label>
43
  <show_in_website>0</show_in_website>
44
  <show_in_store>0</show_in_store>
45
  <comment>
46
+ <![CDATA[This is the shop domain used during signup. See <a href="https://www.riskified.com/documentation/magento.html" target="_blank">documentation</a> for more details.]]></comment>
47
  </domain>
48
  <key translate="label comment">
49
  <label>Auth token</label>
app/code/community/Riskified/Full/sql/riskified_full_setup/mysql4-upgrade-1.0.4-1.0.5.0.php.old ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /* @var $installer Mage_Core_Model_Resource_Setup */
4
+ $installer = $this;
5
+
6
+ $installer->startSetup();
7
+
8
+ $table = $installer->getConnection()
9
+ ->newTable($installer->getTable('full/retry'))
10
+ ->addColumn('retry_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
11
+ 'identity' => true,
12
+ 'unsigned' => true,
13
+ 'nullable' => false,
14
+ 'primary' => true,
15
+ ), 'Id')
16
+ ->addColumn('order_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
17
+ 'unsigned' => true,
18
+ 'nullable' => false,
19
+ 'default' => 0
20
+ ), 'Order Id')
21
+ ->addColumn('action', Varien_Db_Ddl_Table::TYPE_VARCHAR, null, array(
22
+ 'nullable' => false,
23
+ ), 'Action')
24
+ ->addColumn('last_error', Varien_Db_Ddl_Table::TYPE_TEXT, null, array(
25
+ 'nullable' => true,
26
+ ), 'Last Error')
27
+ ->addColumn('attempts', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
28
+ 'unsigned' => true,
29
+ 'nullable' => false,
30
+ 'default' => 0
31
+ ), 'Number of retry attempts')
32
+ ->addColumn('updated_at', Varien_Db_Ddl_Table::TYPE_DATETIME, null, array(
33
+ 'nullable' => false
34
+ ), 'Date last updated')
35
+ ;
36
+
37
+ $installer->getConnection()->createTable($table);
38
+
39
+ $installer->endSetup();
app/design/adminhtml/default/default/template/full/jsinit.phtml CHANGED
@@ -181,7 +181,7 @@ $sendingOrdersToRiskified = Mage::getStoreConfig('riskified/cron/run_historical_
181
  rhtml += ' </div>';
182
  rhtml += ' <span class="step-inner">';
183
  rhtml += ' <span class="step-action">';
184
- rhtml += ' <a class="riskified-botton" style="margin-top:13px" href="http://www.riskified.com/?platform=magento#install-section" target="_blank">Create an account</a>';
185
  rhtml += ' </span>';
186
  rhtml += ' </span>';
187
  rhtml += '</span>';
181
  rhtml += ' </div>';
182
  rhtml += ' <span class="step-inner">';
183
  rhtml += ' <span class="step-action">';
184
+ rhtml += ' <a class="riskified-botton" style="margin-top:13px" href="https://www.riskified.com/?platform=magento#install-section" target="_blank">Create an account</a>';
185
  rhtml += ' </span>';
186
  rhtml += ' </span>';
187
  rhtml += '</span>';
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Transport/CurlTransport.php CHANGED
@@ -27,6 +27,8 @@ class CurlTransport extends AbstractTransport {
27
  public $timeout = 10;
28
  public $dns_cache = true;
29
 
 
 
30
  /**
31
  * @param $order object Order to send
32
  * @param $endpoint String API endpoint to send request
@@ -49,13 +51,17 @@ class CurlTransport extends AbstractTransport {
49
  );
50
  curl_setopt_array($ch, $curl_options);
51
 
 
 
52
 
53
  $body = curl_exec($ch);
 
54
  if (curl_errno($ch)) {
55
  throw new Exception\CurlException(curl_error($ch), curl_errno($ch));
56
  }
57
 
58
  $status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
 
59
  curl_close($ch);
60
 
61
  return $this->json_response($body, $status);
27
  public $timeout = 10;
28
  public $dns_cache = true;
29
 
30
+ public $requestData;
31
+
32
  /**
33
  * @param $order object Order to send
34
  * @param $endpoint String API endpoint to send request
51
  );
52
  curl_setopt_array($ch, $curl_options);
53
 
54
+ $this->requestData['endpoint'] = $this->endpoint_prefix().$endpoint;
55
+ $this->requestData['payload'] = $json;
56
 
57
  $body = curl_exec($ch);
58
+ $this->requestData['responseBody'] = $body;
59
  if (curl_errno($ch)) {
60
  throw new Exception\CurlException(curl_error($ch), curl_errno($ch));
61
  }
62
 
63
  $status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
64
+ $this->requestData['responseStatus'] = $status;
65
  curl_close($ch);
66
 
67
  return $this->json_response($body, $status);
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>riskified_magento</name>
4
- <version>1.0.9.2</version>
5
  <stability>stable</stability>
6
  <license>OSL v3.0</license>
7
  <channel>community</channel>
@@ -9,11 +9,12 @@
9
  <summary>Riskified Magento extension</summary>
10
  <description>Riskified reviews, approves &amp; guarantees&#xD;
11
  transactions you would otherwise decline.</description>
12
- <notes>* Better handling of SQL deadlock exception</notes>
 
13
  <authors><author><name>Riskified_Mage</name><user>Riskified_Mage</user><email>support@riskified.com</email></author></authors>
14
- <date>2016-07-13</date>
15
- <time>09:20:36</time>
16
- <contents><target name="magecommunity"><dir name="Riskified"><dir name="Full"><dir><dir name="Block"><file name="Beacon.php" hash="00c6f36ab82a4805b5408cda907bdcfa"/></dir><dir name="Helper"><dir name="Customer"><file name="Order.php" hash="38278dee0939fba4a017e347ac1784ad"/></dir><file name="Data.php" hash="de74f8666de65022c11ccc7290c494be"/><file name="Debug.php" hash="b4cd9735bdd601cb624f7495242606e2"/><file name="Log.php" hash="ae614c5071160221b71fb0ed600da67e"/><dir name="Order"><file name="Invoice.php" hash="0117cd5689818c3dc9ab9b59fced6c18"/><file name="Status.php" hash="210a0c440b4070fdcb2ead2c2db4e567"/></dir><file name="Order.php" hash="2ac086bcac466a1828430db727147704"/></dir><dir name="Model"><file name="Authorizenet.php" hash="4b910a92820a8d5571a5129e51b54fd3"/><dir name="Container"><file name="Beacon.php" hash="b1c3910031983b9291c98dbe46d61f09"/></dir><file name="Cron.php" hash="123074f2f44bc1f28f55ae864d759e27"/><file name="Observer.php" hash="ce32dda2157928a76fd94311a113bb27"/><dir name="Resource"><dir name="Retry"><file name="Collection.php" hash="fd62ad4e4cdd8d372751bfa9988cc3a9"/></dir><file name="Retry.php" hash="3be3db7e54bd8bb45e0faffa1941f515"/><dir name="Sent"><file name="Collection.php" hash="8960157c9c5b16463aac33cf75116bc8"/></dir><file name="Sent.php" hash="744833cbe4ac4bb7ca69395d90229c0c"/></dir><file name="Retry.php" hash="89e7344139affa4fe0b9a252a5d1c592"/><file name="Sent.php" hash="cf2b22314d20f469f40e31ae14477032"/><dir name="System"><dir name="Config"><dir name="Source"><file name="ApprovedState.php" hash="6f4d7f7eb52922e57ff9069ec6031b63"/><file name="CanceledStateStatuses.php" hash="c274fb739314b34104e0b0085f1039c8"/><file name="CaptureCase.php" hash="6f2505f2c51df6a7caa26d5f89995b47"/><file name="DeclinedState.php" hash="d2c80dd15b3843bce5eb4d2a660b080a"/><file name="Env.php" hash="e213a59d9c438e4dc39b226134a85fab"/><file name="HoldedStateStatuses.php" hash="212f2476e5f6bed6d3456133d6e27c40"/><file name="ProcessingStateStatuses.php" hash="19af6046f86df7a5ba28693545493304"/></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="RiskifiedfullController.php" hash="c1927328b0feadc25073ae1e948cfa6b"/></dir><file name="ResponseController.php" hash="05173a743f73c1ed7b7cb9e0a580de3a"/></dir><dir name="etc"><file name="adminhtml.xml" hash="333f4002a4c677b670cd449147b9d3c8"/><file name="cache.xml" hash="3a7cd749515499cce292330c46ce5028"/><file name="config.xml" hash="f7aac272dae6a5a44b51d64de2721531"/><file name="system.xml" hash="58e468c2ef66e1b0b8ffc0dcd7e6c55e"/></dir><dir name="sql"><dir name="riskified_full_setup"><file name="mysql4-install-1.0.1.php" hash="66592f315ddacbb116e70b34094fbbef"/><file name="mysql4-upgrade-1.0.2.0-1.0.2.1.php" hash="5d12b7203027e843f6322b5a48fb3d23"/><file name="mysql4-upgrade-1.0.4-1.0.5.0.php" hash="df9bb6016ebab61444d65a5d92b0a70e"/><file name="mysql4-upgrade-1.0.5.5-1.0.6.0.php" hash="c749f3c2564fdf9310dcd22d493630d8"/><file name="mysql4-upgrade-1.0.8.0-1.0.8.1.php" hash="45ac33ab1e02f06f6850dd9876017f09"/><file name="mysql4-upgrade-1.0.9.0-1.0.9.1.php" hash="3cc6f0423a53bf1b8484b7dfe14fc328"/></dir></dir></dir><file name=".DS_Store" hash="87b64a6de9627eade2d4e9ade2a3ffc1"/></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="ae0e337973ce84f21ba956f80bf2ff4c"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="full.xml" hash="96d4fb310618a1e6fb149dc367952812"/></dir><dir name="template"><dir name="full"><file name="beacon.phtml" hash="396625d0c46c9f4dd287cef289a9bef8"/></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"/><file name="composer.json" hash="96ba594b3b4ae47223d03f4fc78dcb16"/><dir><dir name="sample"><file name="README.md" hash="d6e555fdf2501b66b52d056857b3d903"/><file name="callback.php" hash="c6fb5a90b2c527b794fcec803acb36d9"/><file name="order_full_flow.php" hash="f85e1ca28b6f7deae958271d88cbeaed"/><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="update_merchant_settings.php" hash="24499737ab057aba76cd054fd5051aad"/><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="0d1ff23815dbbf8716f2f3d349c1f8f3"/><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="743e6e5ad9562d19e6af68334079d3cb"/><file name="Attribute.php" hash="e7fa146d7c9c807494c225e6a41afcfb"/><file name="AuthorizationError.php" hash="b82229eff42d94ceba58d4d6a3a4118b"/><file name="ChargeFreePaymentDetails.php" hash="07ab9a9022cc3152404617b72230e843"/><file name="Checkout.php" hash="ede0e6d2fd8319ada669de35b4c3190f"/><file name="ClientDetails.php" hash="50b329fa6b77bcbeff4b725705b957af"/><file name="Customer.php" hash="7e68c5804c145a93c2e48f4460a63759"/><file name="Decision.php" hash="55bf62bfcfc49ab9e5b823e7ec90d6bd"/><file name="DecisionDetails.php" hash="317121548885d2b8eb75a4d5e383f9f8"/><file name="DiscountCode.php" hash="0861920950828a3ff19904b92b4cb50d"/><file name="Fulfillment.php" hash="9111db9b13ae7b2fbe6bf806a66d78f2"/><file name="FulfillmentDetails.php" hash="d3c11d4e8943862fc4a774f3f8e9d7d7"/><file name="LineItem.php" hash="28af24c031cb3e162c2b4b7a3423980b"/><file name="MerchantSettings.php" hash="62f42b50b7a25b014cbed4ea528998aa"/><file name="Order.php" hash="cdff0611ed8e2b673938a8e1d36d64c5"/><file name="OrderCancellation.php" hash="f6f2d5234bb98b56902e632fbccc07b3"/><file name="PaymentDetails.php" hash="1d0bc8094d3a02ba6fe6b52ee139f47e"/><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="1fbc1939121c9618e612316c1a4500ca"/><file name="TaxLine.php" hash="59f82a19bc9ada690aa79bc96307db5e"/></dir><dir name="Transport"><file name="AbstractTransport.php" hash="6be123376c81f478968ee420ca5b31cb"/><file name="CurlTransport.php" hash="ecfb195ac0f8f9599dd859dffc40c968"/></dir></dir><file name="autoloader.php" hash="f3471e90daf6184a096d337bbcd40bd1"/></dir></dir></dir><file name=".gitignore" hash="73f01e1298c44b6cc3e24a70cad8c56c"/></dir><dir name="riskified_scripts"><file name="riskified_historical_upload.php" hash="db28908aa4d29a78b712057fa60924fb"/><file name=".DS_Store" hash="2d4da7900011d5d8888ce53ed3dfcba7"/></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>4.4.0</min><max>6.0.0</max></php></required></dependencies>
19
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>riskified_magento</name>
4
+ <version>1.0.9.3</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 &amp; guarantees&#xD;
11
  transactions you would otherwise decline.</description>
12
+ <notes>* Support for /api/checkout_denied call.&#xD;
13
+ * Only sends session ID for orders initiated by the end customer.</notes>
14
  <authors><author><name>Riskified_Mage</name><user>Riskified_Mage</user><email>support@riskified.com</email></author></authors>
15
+ <date>2017-01-17</date>
16
+ <time>20:52:24</time>
17
+ <contents><target name="magecommunity"><dir name="Riskified"><dir name="Full"><dir><dir name="Block"><file name="Beacon.php" hash="00c6f36ab82a4805b5408cda907bdcfa"/></dir><dir name="Helper"><dir name="Customer"><file name="Order.php" hash="38278dee0939fba4a017e347ac1784ad"/></dir><file name="Data.php" hash="d96b50cf6738f7aa1f47b7d4743cc634"/><file name="Debug.php" hash="b4cd9735bdd601cb624f7495242606e2"/><file name="Log.php" hash="ae614c5071160221b71fb0ed600da67e"/><dir name="Order"><file name="Invoice.php" hash="0117cd5689818c3dc9ab9b59fced6c18"/><file name="Payment.php" hash="8622a489426113a2820f6bce045cd42d"/><file name="Status.php" hash="210a0c440b4070fdcb2ead2c2db4e567"/></dir><file name="Order.php" hash="a1708f35a4acab5a2230b2b79b3f3cad"/></dir><dir name="Model"><file name="Authorizenet.php" hash="4b910a92820a8d5571a5129e51b54fd3"/><dir name="Container"><file name="Beacon.php" hash="b1c3910031983b9291c98dbe46d61f09"/></dir><file name="Cron.php" hash="123074f2f44bc1f28f55ae864d759e27"/><dir name="Observer"><dir name="Order"><dir name="Creditmemo"><file name="Save.php" hash="8a3a35edeacdd098fb18c67340bdf931"/></dir><dir name="Payment"><file name="Failed.php" hash="a5e5020d71dce440d604cd056a4061e0"/></dir></dir><dir name="Quote"><file name="Submit.php" hash="b3f99a7b3e0541bcbd428d011de1fff2"/></dir></dir><file name="Observer.php" hash="db85966e71fdf13fd537acb09281994e"/><dir name="Resource"><dir name="Retry"><file name="Collection.php" hash="fd62ad4e4cdd8d372751bfa9988cc3a9"/></dir><file name="Retry.php" hash="3be3db7e54bd8bb45e0faffa1941f515"/><dir name="Sent"><file name="Collection.php" hash="8960157c9c5b16463aac33cf75116bc8"/></dir><file name="Sent.php" hash="744833cbe4ac4bb7ca69395d90229c0c"/></dir><file name="Retry.php" hash="89e7344139affa4fe0b9a252a5d1c592"/><file name="Sent.php" hash="cf2b22314d20f469f40e31ae14477032"/><dir name="System"><dir name="Config"><dir name="Source"><file name="ApprovedState.php" hash="6f4d7f7eb52922e57ff9069ec6031b63"/><file name="CanceledStateStatuses.php" hash="c274fb739314b34104e0b0085f1039c8"/><file name="CaptureCase.php" hash="6f2505f2c51df6a7caa26d5f89995b47"/><file name="DeclinedState.php" hash="d2c80dd15b3843bce5eb4d2a660b080a"/><file name="Env.php" hash="e213a59d9c438e4dc39b226134a85fab"/><file name="HoldedStateStatuses.php" hash="212f2476e5f6bed6d3456133d6e27c40"/><file name="ProcessingStateStatuses.php" hash="19af6046f86df7a5ba28693545493304"/></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><file name=".DS_Store" hash="3c8a9b40165ed36dee5272758bacaf05"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="RiskifiedfullController.php" hash="c1927328b0feadc25073ae1e948cfa6b"/></dir><file name="ResponseController.php" hash="05173a743f73c1ed7b7cb9e0a580de3a"/></dir><dir name="etc"><file name="adminhtml.xml" hash="333f4002a4c677b670cd449147b9d3c8"/><file name="cache.xml" hash="3a7cd749515499cce292330c46ce5028"/><file name="config.xml" hash="931afc9680daf24ab7a075e96b523cde"/><file name="system.xml" hash="6d97d40215a389de432c01c5c6d8b5d4"/></dir><dir name="sql"><dir name="riskified_full_setup"><file name="mysql4-install-1.0.1.php" hash="66592f315ddacbb116e70b34094fbbef"/><file name="mysql4-upgrade-1.0.2.0-1.0.2.1.php" hash="5d12b7203027e843f6322b5a48fb3d23"/><file name="mysql4-upgrade-1.0.4-1.0.5.0.php" hash="df9bb6016ebab61444d65a5d92b0a70e"/><file name="mysql4-upgrade-1.0.4-1.0.5.0.php.old" hash="557115e1a978d9b194b2cd1cfb8b5a95"/><file name="mysql4-upgrade-1.0.5.5-1.0.6.0.php" hash="c749f3c2564fdf9310dcd22d493630d8"/><file name="mysql4-upgrade-1.0.8.0-1.0.8.1.php" hash="45ac33ab1e02f06f6850dd9876017f09"/><file name="mysql4-upgrade-1.0.9.0-1.0.9.1.php" hash="3cc6f0423a53bf1b8484b7dfe14fc328"/></dir></dir></dir><file name=".DS_Store" hash="3d700965c172761e3d44283ed7b58325"/></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="dbf48e2d0d5a89db58cd474028bc2e7d"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="full.xml" hash="96d4fb310618a1e6fb149dc367952812"/></dir><dir name="template"><dir name="full"><file name="beacon.phtml" hash="396625d0c46c9f4dd287cef289a9bef8"/></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"/><file name="composer.json" hash="96ba594b3b4ae47223d03f4fc78dcb16"/><dir><dir name="sample"><file name="README.md" hash="d6e555fdf2501b66b52d056857b3d903"/><file name="callback.php" hash="c6fb5a90b2c527b794fcec803acb36d9"/><file name="order_full_flow.php" hash="f85e1ca28b6f7deae958271d88cbeaed"/><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="update_merchant_settings.php" hash="24499737ab057aba76cd054fd5051aad"/><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="0d1ff23815dbbf8716f2f3d349c1f8f3"/><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="743e6e5ad9562d19e6af68334079d3cb"/><file name="Attribute.php" hash="e7fa146d7c9c807494c225e6a41afcfb"/><file name="AuthorizationError.php" hash="b82229eff42d94ceba58d4d6a3a4118b"/><file name="ChargeFreePaymentDetails.php" hash="07ab9a9022cc3152404617b72230e843"/><file name="Checkout.php" hash="ede0e6d2fd8319ada669de35b4c3190f"/><file name="ClientDetails.php" hash="50b329fa6b77bcbeff4b725705b957af"/><file name="Customer.php" hash="7e68c5804c145a93c2e48f4460a63759"/><file name="Decision.php" hash="55bf62bfcfc49ab9e5b823e7ec90d6bd"/><file name="DecisionDetails.php" hash="317121548885d2b8eb75a4d5e383f9f8"/><file name="DiscountCode.php" hash="0861920950828a3ff19904b92b4cb50d"/><file name="Fulfillment.php" hash="9111db9b13ae7b2fbe6bf806a66d78f2"/><file name="FulfillmentDetails.php" hash="d3c11d4e8943862fc4a774f3f8e9d7d7"/><file name="LineItem.php" hash="28af24c031cb3e162c2b4b7a3423980b"/><file name="MerchantSettings.php" hash="62f42b50b7a25b014cbed4ea528998aa"/><file name="Order.php" hash="cdff0611ed8e2b673938a8e1d36d64c5"/><file name="OrderCancellation.php" hash="f6f2d5234bb98b56902e632fbccc07b3"/><file name="PaymentDetails.php" hash="1d0bc8094d3a02ba6fe6b52ee139f47e"/><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="1fbc1939121c9618e612316c1a4500ca"/><file name="TaxLine.php" hash="59f82a19bc9ada690aa79bc96307db5e"/></dir><dir name="Transport"><file name="AbstractTransport.php" hash="6be123376c81f478968ee420ca5b31cb"/><file name="CurlTransport.php" hash="360863ea799e1c2f9860c16bd1ea401a"/></dir></dir><file name="autoloader.php" hash="f3471e90daf6184a096d337bbcd40bd1"/></dir></dir></dir><file name=".gitignore" hash="73f01e1298c44b6cc3e24a70cad8c56c"/></dir><dir name="riskified_scripts"><file name="riskified_historical_upload.php" hash="db28908aa4d29a78b712057fa60924fb"/></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>4.4.0</min><max>6.0.0</max></php></required></dependencies>
20
  </package>