Version Notes
* Braintree vZero gateway data extraction support
Download this release
Release Info
Developer | Riskified_Mage |
Extension | riskified_magento |
Version | 1.0.8.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.7.9 to 1.0.8.0
- app/code/community/Riskified/Full/Helper/Order.php +99 -52
- app/code/community/Riskified/Full/etc/config.xml +1 -1
- lib/riskified_php_sdk/sample/order_full_flow.php +15 -2
- lib/riskified_php_sdk/src/Riskified/Common/Riskified.php +1 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/ChargeFreePaymentDetails.php +28 -0
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/Customer.php +1 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/LineItem.php +4 -1
- lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/Order.php +5 -3
- package.xml +5 -5
app/code/community/Riskified/Full/Helper/Order.php
CHANGED
@@ -354,13 +354,27 @@ class Riskified_Full_Helper_Order extends Mage_Core_Helper_Abstract {
|
|
354 |
Mage::helper('full/log')->log("Payment info debug Logs:");
|
355 |
try {
|
356 |
$payment = $model->getPayment();
|
357 |
-
$
|
358 |
-
Mage::helper('full/log')->log("Payment Gateway: ".$
|
359 |
Mage::helper('full/log')->log("payment->getCcLast4(): ".$payment->getCcLast4());
|
360 |
Mage::helper('full/log')->log("payment->getCcType(): ".$payment->getCcType());
|
361 |
Mage::helper('full/log')->log("payment->getCcCidStatus(): ".$payment->getCcCidStatus());
|
362 |
Mage::helper('full/log')->log("payment->getCcAvsStatus(): ".$payment->getCcAvsStatus());
|
363 |
Mage::helper('full/log')->log("payment->getAdditionalInformation(): ".PHP_EOL.var_export($payment->getAdditionalInformation(), 1));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
364 |
# paypal_avs_code,paypal_cvv2_match,paypal_fraud_filters,avs_result,cvv2_check_result,address_verification,
|
365 |
# postcode_verification,payment_status,pending_reason,payer_id,payer_status,email,credit_card_cvv2,
|
366 |
# cc_avs_status,cc_approval,cc_last4,cc_owner,cc_exp_month,cc_exp_year,
|
@@ -382,7 +396,7 @@ class Riskified_Full_Helper_Order extends Mage_Core_Helper_Abstract {
|
|
382 |
Mage::helper('full/log')->log("sagepay->getBankAuthCode: ".$sage->getBankAuthCode());
|
383 |
Mage::helper('full/log')->log("sagepay->getPayerStatus: ".$sage->getPayerStatus());
|
384 |
}
|
385 |
-
if($
|
386 |
$optimalTransaction = unserialize($payment->getAdditionalInformation('transaction'));
|
387 |
if($optimalTransaction) {
|
388 |
Mage::helper('full/log')->log("Optimal transaction: ");
|
@@ -412,38 +426,38 @@ class Riskified_Full_Helper_Order extends Mage_Core_Helper_Abstract {
|
|
412 |
|
413 |
$transactionId = $payment->getTransactionId();
|
414 |
|
415 |
-
$
|
416 |
|
417 |
try {
|
418 |
-
switch ($
|
419 |
case 'authorizenet':
|
420 |
$authorize_data = $payment->getAdditionalInformation('authorize_cards');
|
421 |
if($authorize_data && is_array($authorize_data)) {
|
422 |
$cards_data = array_values($authorize_data);
|
423 |
if ($cards_data && $cards_data[0]) {
|
424 |
$card_data = $cards_data[0];
|
425 |
-
if(isset($card_data['cc_last4'])) { $
|
426 |
-
if(isset($card_data['cc_type'])) { $
|
427 |
-
if(isset($card_data['cc_avs_result_code'])) { $
|
428 |
-
if(isset($card_data['cc_response_code'])) { $
|
429 |
}
|
430 |
}
|
431 |
break;
|
432 |
case 'authnetcim':
|
433 |
-
$
|
434 |
-
$
|
435 |
#$cavv_result_code = $payment->getAdditionalInformation('cavv_response_code');
|
436 |
#$is_fraud = $payment->getAdditionalInformation('is_fraud');
|
437 |
break;
|
438 |
case 'optimal_hosted':
|
439 |
try {
|
440 |
$optimalTransaction = unserialize($payment->getAdditionalInformation('transaction'));
|
441 |
-
$
|
442 |
$houseVerification = $optimalTransaction->houseNumberVerification;
|
443 |
$zipVerification = $optimalTransaction->zipVerification;
|
444 |
-
$
|
445 |
} catch(Exception $e) {
|
446 |
-
Mage::helper('full/log')->log("optimal payment (".$
|
447 |
}
|
448 |
break;
|
449 |
case 'paypal_express':
|
@@ -466,37 +480,45 @@ class Riskified_Full_Helper_Order extends Mage_Core_Helper_Abstract {
|
|
466 |
), 'strlen'));
|
467 |
case 'paypal_direct':
|
468 |
case 'paypaluk_direct':
|
469 |
-
$
|
470 |
-
$
|
471 |
-
$
|
472 |
-
$
|
473 |
break;
|
474 |
case 'sagepaydirectpro':
|
475 |
case 'sage_pay_form':
|
476 |
case 'sagepayserver':
|
477 |
$sage = $model->getSagepayInfo();
|
478 |
if ($sage) {
|
479 |
-
$
|
480 |
-
$
|
481 |
-
$
|
482 |
-
$
|
483 |
-
//Mage::helper('full/log')->log("sagepay payment (".$
|
484 |
-
Mage::helper('full/log')->log("sagepay payment (".$
|
485 |
}
|
486 |
else {
|
487 |
-
Mage::helper('full/log')->log("sagepay payment (".$
|
488 |
}
|
489 |
break;
|
490 |
|
491 |
case 'transarmor':
|
492 |
-
$
|
493 |
-
$
|
494 |
Mage::helper('full/log')->log("transarmor payment additional info: ".PHP_EOL.var_export($payment->getAdditionalInformation(), 1));
|
495 |
break;
|
496 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
497 |
default:
|
498 |
-
Mage::helper('full/log')->log("unknown gateway:" . $
|
499 |
-
Mage::helper('full/log')->log("Gateway payment (".$
|
500 |
break;
|
501 |
}
|
502 |
} catch (Exception $e) {
|
@@ -504,52 +526,77 @@ class Riskified_Full_Helper_Order extends Mage_Core_Helper_Abstract {
|
|
504 |
Mage::getSingleton('adminhtml/session')->addError('Riskified extension: ' . $e->getMessage());
|
505 |
}
|
506 |
|
507 |
-
if (!isset($
|
508 |
-
$
|
|
|
|
|
|
|
509 |
}
|
510 |
-
if (!isset($
|
511 |
-
$
|
512 |
}
|
513 |
-
if (!isset($
|
514 |
-
$
|
515 |
}
|
516 |
-
if (!isset($
|
517 |
-
$
|
518 |
}
|
519 |
-
if (isset($
|
520 |
-
$
|
521 |
}
|
522 |
-
|
523 |
|
524 |
return new Model\PaymentDetails(array_filter(array(
|
525 |
'authorization_id' => $transactionId,
|
526 |
-
'avs_result_code' => $
|
527 |
-
'cvv_result_code' => $
|
528 |
-
'credit_card_number' => $
|
529 |
-
'credit_card_company' => $
|
530 |
-
'credit_card_bin' => $
|
531 |
),'strlen'));
|
532 |
}
|
533 |
|
534 |
private function getLineItems($model) {
|
535 |
-
$
|
536 |
foreach ($model->getAllVisibleItems() as $key => $val) {
|
537 |
-
$
|
538 |
-
|
539 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
540 |
}
|
541 |
-
$
|
542 |
'price' => $val->getPrice(),
|
543 |
'quantity' => intval($val->getQtyOrdered()),
|
544 |
'title' => $val->getName(),
|
545 |
'sku' => $val->getSku(),
|
546 |
'product_id' => $val->getItemId(),
|
547 |
'grams' => $val->getWeight(),
|
548 |
-
'product_type' => $
|
|
|
|
|
549 |
),'strlen'));
|
550 |
}
|
551 |
|
552 |
-
return $
|
553 |
}
|
554 |
|
555 |
private function getShippingLines($model) {
|
354 |
Mage::helper('full/log')->log("Payment info debug Logs:");
|
355 |
try {
|
356 |
$payment = $model->getPayment();
|
357 |
+
$gatewayName = $payment->getMethod();
|
358 |
+
Mage::helper('full/log')->log("Payment Gateway: ".$gatewayName);
|
359 |
Mage::helper('full/log')->log("payment->getCcLast4(): ".$payment->getCcLast4());
|
360 |
Mage::helper('full/log')->log("payment->getCcType(): ".$payment->getCcType());
|
361 |
Mage::helper('full/log')->log("payment->getCcCidStatus(): ".$payment->getCcCidStatus());
|
362 |
Mage::helper('full/log')->log("payment->getCcAvsStatus(): ".$payment->getCcAvsStatus());
|
363 |
Mage::helper('full/log')->log("payment->getAdditionalInformation(): ".PHP_EOL.var_export($payment->getAdditionalInformation(), 1));
|
364 |
+
|
365 |
+
|
366 |
+
Mage::helper('full/log')->log("payment->getAdyenPspReference(): ".$payment->getAdyenPspReference());
|
367 |
+
Mage::helper('full/log')->log("payment->getAdyenKlarnaNumber(): ".$payment->getAdyenKlarnaNumber());
|
368 |
+
Mage::helper('full/log')->log("payment->getAdyenAvsResult(): ".$payment->getAdyenAvsResult());
|
369 |
+
Mage::helper('full/log')->log("payment->getAdyenCvcResult(): ".$payment->getAdyenCvcResult());
|
370 |
+
Mage::helper('full/log')->log("payment->getAdyenBoletoPaidAmount(): ".$payment->getAdyenBoletoPaidAmount());
|
371 |
+
Mage::helper('full/log')->log("payment->getAdyenTotalFraudScore(): ".$payment->getAdyenTotalFraudScore());
|
372 |
+
Mage::helper('full/log')->log("payment->getAdyenRefusalReasonRaw(): ".$payment->getAdyenRefusalReasonRaw());
|
373 |
+
Mage::helper('full/log')->log("payment->getAdyenAcquirerReference(): ".$payment->getAdyenAcquirerReference());
|
374 |
+
Mage::helper('full/log')->log("payment->getAdyenAuthCode(): ".$payment->getAdyenAuthCode());
|
375 |
+
|
376 |
+
Mage::helper('full/log')->log("payment->getInfo(): ".PHP_EOL.var_export($payment->getInfo(), 1));
|
377 |
+
|
378 |
# paypal_avs_code,paypal_cvv2_match,paypal_fraud_filters,avs_result,cvv2_check_result,address_verification,
|
379 |
# postcode_verification,payment_status,pending_reason,payer_id,payer_status,email,credit_card_cvv2,
|
380 |
# cc_avs_status,cc_approval,cc_last4,cc_owner,cc_exp_month,cc_exp_year,
|
396 |
Mage::helper('full/log')->log("sagepay->getBankAuthCode: ".$sage->getBankAuthCode());
|
397 |
Mage::helper('full/log')->log("sagepay->getPayerStatus: ".$sage->getPayerStatus());
|
398 |
}
|
399 |
+
if($gatewayName == "optimal_hosted") {
|
400 |
$optimalTransaction = unserialize($payment->getAdditionalInformation('transaction'));
|
401 |
if($optimalTransaction) {
|
402 |
Mage::helper('full/log')->log("Optimal transaction: ");
|
426 |
|
427 |
$transactionId = $payment->getTransactionId();
|
428 |
|
429 |
+
$gatewayName = $payment->getMethod();
|
430 |
|
431 |
try {
|
432 |
+
switch ($gatewayName) {
|
433 |
case 'authorizenet':
|
434 |
$authorize_data = $payment->getAdditionalInformation('authorize_cards');
|
435 |
if($authorize_data && is_array($authorize_data)) {
|
436 |
$cards_data = array_values($authorize_data);
|
437 |
if ($cards_data && $cards_data[0]) {
|
438 |
$card_data = $cards_data[0];
|
439 |
+
if(isset($card_data['cc_last4'])) { $creditCardNumber = $card_data['cc_last4']; }
|
440 |
+
if(isset($card_data['cc_type'])) { $creditCardCompany = $card_data['cc_type']; }
|
441 |
+
if(isset($card_data['cc_avs_result_code'])) { $avsResultCode = $card_data['cc_avs_result_code']; }// getAvsResultCode
|
442 |
+
if(isset($card_data['cc_response_code'])) { $cvvResultCode = $card_data['cc_response_code']; } // getCardCodeResponseCode
|
443 |
}
|
444 |
}
|
445 |
break;
|
446 |
case 'authnetcim':
|
447 |
+
$avsResultCode = $payment->getAdditionalInformation('avs_result_code');
|
448 |
+
$cvvResultCode = $payment->getAdditionalInformation('card_code_response_code');
|
449 |
#$cavv_result_code = $payment->getAdditionalInformation('cavv_response_code');
|
450 |
#$is_fraud = $payment->getAdditionalInformation('is_fraud');
|
451 |
break;
|
452 |
case 'optimal_hosted':
|
453 |
try {
|
454 |
$optimalTransaction = unserialize($payment->getAdditionalInformation('transaction'));
|
455 |
+
$cvvResultCode = $optimalTransaction->cvdVerification;
|
456 |
$houseVerification = $optimalTransaction->houseNumberVerification;
|
457 |
$zipVerification = $optimalTransaction->zipVerification;
|
458 |
+
$avsResultCode = $houseVerification . ',' . $zipVerification;
|
459 |
} catch(Exception $e) {
|
460 |
+
Mage::helper('full/log')->log("optimal payment (".$gatewayName.") additional payment info failed to parse:".$e->getMessage());
|
461 |
}
|
462 |
break;
|
463 |
case 'paypal_express':
|
480 |
), 'strlen'));
|
481 |
case 'paypal_direct':
|
482 |
case 'paypaluk_direct':
|
483 |
+
$avsResultCode = $payment->getAdditionalInformation('paypal_avs_code');
|
484 |
+
$cvvResultCode = $payment->getAdditionalInformation('paypal_cvv2_match');
|
485 |
+
$creditCardNumber = $payment->getCcLast4();
|
486 |
+
$creditCardCompany = $payment->getCcType();
|
487 |
break;
|
488 |
case 'sagepaydirectpro':
|
489 |
case 'sage_pay_form':
|
490 |
case 'sagepayserver':
|
491 |
$sage = $model->getSagepayInfo();
|
492 |
if ($sage) {
|
493 |
+
$avsResultCode = $sage->getData('address_result');
|
494 |
+
$cvvResultCode = $sage->getData('cv2result');
|
495 |
+
$creditCardNumber = $sage->getData('last_four_digits');
|
496 |
+
$creditCardCompany = $sage->getData('card_type');
|
497 |
+
//Mage::helper('full/log')->log("sagepay payment (".$gatewayName.") additional info: ".PHP_EOL.var_export($sage->getAdditionalInformation(), 1));
|
498 |
+
Mage::helper('full/log')->log("sagepay payment (".$gatewayName.") additional info: ".PHP_EOL.var_export($payment->getAdditionalInformation(), 1));
|
499 |
}
|
500 |
else {
|
501 |
+
Mage::helper('full/log')->log("sagepay payment (".$gatewayName.") - getSagepayInfo returned null object");
|
502 |
}
|
503 |
break;
|
504 |
|
505 |
case 'transarmor':
|
506 |
+
$avsResultCode = $payment->getAdditionalInformation('avs_response');
|
507 |
+
$cvvResultCode = $payment->getAdditionalInformation('cvv2_response');
|
508 |
Mage::helper('full/log')->log("transarmor payment additional info: ".PHP_EOL.var_export($payment->getAdditionalInformation(), 1));
|
509 |
break;
|
510 |
|
511 |
+
case 'braintreevzero':
|
512 |
+
$cvvResultCode = $payment->getAdditionalInformation('cvvResponseCode');
|
513 |
+
$creditCardBin = $payment->getAdditionalInformation('bin');
|
514 |
+
$houseVerification = $payment->getAdditionalInformation('avsStreetAddressResponseCode');
|
515 |
+
$zipVerification = $payment->getAdditionalInformation('avsPostalCodeResponseCode');
|
516 |
+
$avsResultCode = $houseVerification . ',' . $zipVerification;
|
517 |
+
break;
|
518 |
+
|
519 |
default:
|
520 |
+
Mage::helper('full/log')->log("unknown gateway:" . $gatewayName);
|
521 |
+
Mage::helper('full/log')->log("Gateway payment (".$gatewayName.") additional info: ".PHP_EOL.var_export($payment->getAdditionalInformation(), 1));
|
522 |
break;
|
523 |
}
|
524 |
} catch (Exception $e) {
|
526 |
Mage::getSingleton('adminhtml/session')->addError('Riskified extension: ' . $e->getMessage());
|
527 |
}
|
528 |
|
529 |
+
if (!isset($cvvResultCode)) {
|
530 |
+
$cvvResultCode = $payment->getCcCidStatus();
|
531 |
+
}
|
532 |
+
if (!isset($creditCardNumber)) {
|
533 |
+
$creditCardNumber = $payment->getCcLast4();
|
534 |
}
|
535 |
+
if (!isset($creditCardCompany)) {
|
536 |
+
$creditCardCompany = $payment->getCcType();
|
537 |
}
|
538 |
+
if (!isset($avsResultCode)) {
|
539 |
+
$avsResultCode = $payment->getCcAvsStatus();
|
540 |
}
|
541 |
+
if (!isset($creditCardBin)) {
|
542 |
+
$creditCardBin = $payment->getAdditionalInformation('riskified_cc_bin');
|
543 |
}
|
544 |
+
if (isset($creditCardNumber)) {
|
545 |
+
$creditCardNumber = "XXXX-XXXX-XXXX-" . $creditCardNumber;
|
546 |
}
|
547 |
+
|
548 |
|
549 |
return new Model\PaymentDetails(array_filter(array(
|
550 |
'authorization_id' => $transactionId,
|
551 |
+
'avs_result_code' => $avsResultCode,
|
552 |
+
'cvv_result_code' => $cvvResultCode,
|
553 |
+
'credit_card_number' => $creditCardNumber,
|
554 |
+
'credit_card_company' => $creditCardCompany,
|
555 |
+
'credit_card_bin' => $creditCardBin
|
556 |
),'strlen'));
|
557 |
}
|
558 |
|
559 |
private function getLineItems($model) {
|
560 |
+
$lineItems = array();
|
561 |
foreach ($model->getAllVisibleItems() as $key => $val) {
|
562 |
+
$prodType = null;
|
563 |
+
$category = null;
|
564 |
+
$subCategories = null;
|
565 |
+
$product = $val->getProduct();
|
566 |
+
if($product) {
|
567 |
+
$prodType = $val->getProduct()->getTypeId();
|
568 |
+
$categoryIds = $product->getCategoryIds();
|
569 |
+
foreach ($categoryIds as $categoryId) {
|
570 |
+
$cat = Mage::getModel('catalog/category')->load($categoryId);
|
571 |
+
$catName = $cat->getName();
|
572 |
+
if (!empty($catName)) {
|
573 |
+
if(empty($category)) {
|
574 |
+
$category = $catName;
|
575 |
+
}
|
576 |
+
else if(empty($subCategories)) {
|
577 |
+
$subCategories = $catName;
|
578 |
+
}
|
579 |
+
else {
|
580 |
+
$subCategories = $subCategories . '|' . $catName;
|
581 |
+
}
|
582 |
+
|
583 |
+
}
|
584 |
+
}
|
585 |
}
|
586 |
+
$lineItems[] = new Model\LineItem(array_filter(array(
|
587 |
'price' => $val->getPrice(),
|
588 |
'quantity' => intval($val->getQtyOrdered()),
|
589 |
'title' => $val->getName(),
|
590 |
'sku' => $val->getSku(),
|
591 |
'product_id' => $val->getItemId(),
|
592 |
'grams' => $val->getWeight(),
|
593 |
+
'product_type' => $prodType,
|
594 |
+
'category' => $category,
|
595 |
+
//'sub_category' => $subCategories
|
596 |
),'strlen'));
|
597 |
}
|
598 |
|
599 |
+
return $lineItems;
|
600 |
}
|
601 |
|
602 |
private function getShippingLines($model) {
|
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 |
</Riskified_Full>
|
7 |
</modules>
|
8 |
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Riskified_Full>
|
5 |
+
<version>1.0.8.0</version>
|
6 |
</Riskified_Full>
|
7 |
</modules>
|
8 |
|
lib/riskified_php_sdk/sample/order_full_flow.php
CHANGED
@@ -46,7 +46,7 @@ $order_details = array(
|
|
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(
|
@@ -57,13 +57,22 @@ $order_details = array(
|
|
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 |
-
'category' => 'ACME Spring Category'
|
|
|
67 |
))
|
68 |
),
|
69 |
'discount_codes' => new Model\DiscountCode(array(
|
@@ -119,6 +128,10 @@ $order_details = array(
|
|
119 |
'province' => 'New York',
|
120 |
'province_code' => 'NY',
|
121 |
'zip' => '64155'
|
|
|
|
|
|
|
|
|
122 |
))
|
123 |
);
|
124 |
|
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', 'third!2@email.rr.com'),
|
50 |
'note' => 'Shipped to my hotel.',
|
51 |
'referring_site' => 'google.com',
|
52 |
'line_items' => array(
|
57 |
'product_id' => '101',
|
58 |
'sku' => 'ABCD'
|
59 |
)),
|
60 |
+
// Digital Goods product example using "requires_shipping":false
|
61 |
+
new Model\LineItem(array(
|
62 |
+
'title' => 'Giftcard',
|
63 |
+
'price' => 100,
|
64 |
+
'quantity' => 1,
|
65 |
+
'requires_shipping' => false,
|
66 |
+
'delivered_at' => '2017-03-10T11:00:00-05:00',
|
67 |
+
)),
|
68 |
new Model\LineItem(array(
|
69 |
'price' => 200,
|
70 |
'quantity' => 4,
|
71 |
'title' => 'ACME Spring',
|
72 |
'product_id' => '202',
|
73 |
'sku' => 'EFGH',
|
74 |
+
'category' => 'ACME Spring Category',
|
75 |
+
'sub_category' => 'ACME Spring Sub Category'
|
76 |
))
|
77 |
),
|
78 |
'discount_codes' => new Model\DiscountCode(array(
|
128 |
'province' => 'New York',
|
129 |
'province_code' => 'NY',
|
130 |
'zip' => '64155'
|
131 |
+
)),
|
132 |
+
'charge_free_payment_details' => new Model\ChargeFreePaymentDetails(array(
|
133 |
+
'gateway' => 'giftcard',
|
134 |
+
'amount' => '50',
|
135 |
))
|
136 |
);
|
137 |
|
lib/riskified_php_sdk/src/Riskified/Common/Riskified.php
CHANGED
@@ -20,7 +20,7 @@
|
|
20 |
* @package Riskified\Common
|
21 |
*/
|
22 |
class Riskified {
|
23 |
-
const VERSION = '1.
|
24 |
const API_VERSION = '2';
|
25 |
|
26 |
/**
|
20 |
* @package Riskified\Common
|
21 |
*/
|
22 |
class Riskified {
|
23 |
+
const VERSION = '1.6.1';
|
24 |
const API_VERSION = '2';
|
25 |
|
26 |
/**
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/ChargeFreePaymentDetails.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 NonCֹhargeablePaymentDetails
|
19 |
+
* data model of payment details that are not going to be charged by Riskified (e.g. eWallet / giftcard)
|
20 |
+
* @package Riskified\OrderWebhook\Model
|
21 |
+
*/
|
22 |
+
class ChargeFreePaymentDetails extends AbstractModel {
|
23 |
+
|
24 |
+
protected $_fields = array(
|
25 |
+
'gateway' => 'string',
|
26 |
+
'amount' => 'string'
|
27 |
+
);
|
28 |
+
}
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/Customer.php
CHANGED
@@ -22,7 +22,7 @@
|
|
22 |
class Customer extends AbstractModel {
|
23 |
|
24 |
protected $_fields = array(
|
25 |
-
'email' => 'string /^[A-Z0-9._
|
26 |
'first_name' => 'string',
|
27 |
'last_name' => 'string',
|
28 |
|
22 |
class Customer extends AbstractModel {
|
23 |
|
24 |
protected $_fields = array(
|
25 |
+
'email' => 'string /^[A-Z0-9._%+\-!]+@[A-Z0-9.-]+\.[A-Z]{2,20}$/i',
|
26 |
'first_name' => 'string',
|
27 |
'last_name' => 'string',
|
28 |
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/LineItem.php
CHANGED
@@ -44,11 +44,14 @@ class LineItem extends AbstractModel {
|
|
44 |
'product_type' => 'string optional',
|
45 |
'brand' => 'string optional',
|
46 |
|
|
|
|
|
|
|
47 |
/* adding product's category to php sdk */
|
48 |
'category' => 'string optional',
|
|
|
49 |
|
50 |
/* fields for ticket industry */
|
51 |
-
'event_sub_category_name' => 'string optional',
|
52 |
'event_name' => 'string optional',
|
53 |
'event_section_name' => 'string optional',
|
54 |
'event_date' => 'date optional',
|
44 |
'product_type' => 'string optional',
|
45 |
'brand' => 'string optional',
|
46 |
|
47 |
+
/* add this field when the (digital) goods are to be delivered in future date */
|
48 |
+
'delivered_at' => 'date optional',
|
49 |
+
|
50 |
/* adding product's category to php sdk */
|
51 |
'category' => 'string optional',
|
52 |
+
'sub_category' => 'string optional',
|
53 |
|
54 |
/* fields for ticket industry */
|
|
|
55 |
'event_name' => 'string optional',
|
56 |
'event_section_name' => 'string optional',
|
57 |
'event_date' => 'date optional',
|
lib/riskified_php_sdk/src/Riskified/OrderWebhook/Model/Order.php
CHANGED
@@ -23,7 +23,7 @@ class Order extends AbstractModel {
|
|
23 |
|
24 |
protected $_fields = array(
|
25 |
'id' => 'string',
|
26 |
-
'email' => 'string /^[A-Z0-9._
|
27 |
'created_at' => 'date',
|
28 |
'updated_at' => 'date',
|
29 |
'currency' => 'string /^[A-Z]{3}$/i',
|
@@ -35,7 +35,7 @@ class Order extends AbstractModel {
|
|
35 |
'line_items' => 'array object \LineItem',
|
36 |
|
37 |
'name' => 'string optional',
|
38 |
-
'additional_emails' => 'array string /^[A-Z0-9._
|
39 |
'note' => 'string optional',
|
40 |
'number' => 'number optional',
|
41 |
'order_number' => 'number optional',
|
@@ -83,6 +83,8 @@ class Order extends AbstractModel {
|
|
83 |
'authorization_error' => 'object \AuthorizationError optional',
|
84 |
'nocharge_amount' => 'object \RefundDetails optional',
|
85 |
|
86 |
-
'decision' => 'object \DecisionDetails optional'
|
|
|
|
|
87 |
);
|
88 |
}
|
23 |
|
24 |
protected $_fields = array(
|
25 |
'id' => 'string',
|
26 |
+
'email' => 'string /^[A-Z0-9._%+\-!]+@[A-Z0-9.-]+\.[A-Z]{2,20}$/i',
|
27 |
'created_at' => 'date',
|
28 |
'updated_at' => 'date',
|
29 |
'currency' => 'string /^[A-Z]{3}$/i',
|
35 |
'line_items' => 'array object \LineItem',
|
36 |
|
37 |
'name' => 'string optional',
|
38 |
+
'additional_emails' => 'array string /^[A-Z0-9._%+\-!]+@[A-Z0-9.-]+\.[A-Z]{2,20}$/i optional',
|
39 |
'note' => 'string optional',
|
40 |
'number' => 'number optional',
|
41 |
'order_number' => 'number optional',
|
83 |
'authorization_error' => 'object \AuthorizationError optional',
|
84 |
'nocharge_amount' => 'object \RefundDetails optional',
|
85 |
|
86 |
+
'decision' => 'object \DecisionDetails optional',
|
87 |
+
|
88 |
+
'charge_free_payment_details' => 'object\ChargeFreePaymentDetails optional'
|
89 |
);
|
90 |
}
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>riskified_magento</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -9,11 +9,11 @@
|
|
9 |
<summary>Riskified Magento extension</summary>
|
10 |
<description>Riskified reviews, approves & guarantees
|
11 |
transactions you would otherwise decline.</description>
|
12 |
-
<notes>*
|
13 |
<authors><author><name>Riskified_Mage</name><user>Riskified_Mage</user><email>support@riskified.com</email></author></authors>
|
14 |
-
<date>2015-
|
15 |
-
<time>
|
16 |
-
<contents><target name="magecommunity"><dir name="Riskified"><dir name="Full"><dir><dir name="Helper"><file name="Data.php" hash="6b312d0bb7f613b22d41dda5f361e709"/><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="67d0f4989d771824108a8ff4fc870301"/></dir><file name="Order.php" hash="
|
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.8.0</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>* Braintree vZero gateway data extraction support</notes>
|
13 |
<authors><author><name>Riskified_Mage</name><user>Riskified_Mage</user><email>support@riskified.com</email></author></authors>
|
14 |
+
<date>2015-12-31</date>
|
15 |
+
<time>13:50:34</time>
|
16 |
+
<contents><target name="magecommunity"><dir name="Riskified"><dir name="Full"><dir><dir name="Helper"><file name="Data.php" hash="6b312d0bb7f613b22d41dda5f361e709"/><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="67d0f4989d771824108a8ff4fc870301"/></dir><file name="Order.php" hash="41e6e7f53b9d7dbb70062b472453ea60"/></dir><dir name="Model"><file name="Authorizenet.php" hash="bd42f62d06a036b9da7709d2e40fc8f1"/><file name="Cron.php" hash="187b86ebe9238ff132ed0337f05a8ae9"/><file name="Observer.php" hash="e6e9414a92fbf714b95bd142dfdb3945"/><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="CanceledStateStatuses.php" hash="fc45423c3889466d22ad0019a1c0049a"/><file name="CaptureCase.php" hash="daafa6f53c65fa6e6e7ffbb067dbbbba"/><file name="DeclinedState.php" hash="a00907072c06ade079483e3db03bb94f"/><file name="Env.php" hash="4d923355b3e56fac95c2a9b3c353ab76"/><file name="HoldedStateStatuses.php" hash="f120fbe5472906fb4d2757edfbcd6c60"/><file name="ProcessingStateStatuses.php" hash="e4db8c3ee18de3384d9a67c11ad91081"/></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="9f11fee0e096adc0ad5c554606e9bda4"/></dir><file name="ResponseController.php" hash="77f124bfe0e2603bb45a51193a0a87fe"/></dir><dir name="etc"><file name="config.xml" hash="1563d4503f639ff8b336d017bda705e0"/><file name="system.xml" hash="3f49dba20b0b7f83437cfb5f5a8ce12d"/></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><file name=".DS_Store" hash="af9575107ec7e509e8f187f6c21faa5f"/></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="a88b28f46d8dcdf51633802c367bcc41"/></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="2f9ee71abb1188685d8adb18dca97321"/><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="c3adcd9835e919c85507636b22665fcc"/><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="afcbe96d54dd0c03b01eb057662cdcf9"/><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="43baa39c861eb653834066b595b55407"/><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="f01c65e7ad1195bb994d77d869e301d7"/><file name="MerchantSettings.php" hash="62f42b50b7a25b014cbed4ea528998aa"/><file name="Order.php" hash="e5264565f54800012294d8aecf0619cf"/><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="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"/></dir></target></contents>
|
17 |
<compatible/>
|
18 |
<dependencies><required><php><min>4.4.0</min><max>6.0.0</max></php></required></dependencies>
|
19 |
</package>
|