diff --git a/README.md b/README.md index db00306..ae8d16a 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ The package's installation is done using composer. Simply add these lines to you ```json { "require": { - "processout/processout-php": "^6.28.0" + "processout/processout-php": "^6.29.0" } } ``` diff --git a/src/InvoiceRisk.php b/src/InvoiceRisk.php index 5e459cf..fc02c03 100755 --- a/src/InvoiceRisk.php +++ b/src/InvoiceRisk.php @@ -28,6 +28,12 @@ class InvoiceRisk implements \JsonSerializable */ protected $isLegit; + /** + * Skip payment gateway fraud engine rules (on compatible gateways only.) + * @var boolean + */ + protected $skipGatewayRules; + /** * InvoiceRisk constructor * @param ProcessOut\ProcessOut $client @@ -85,6 +91,28 @@ public function setIsLegit($value) return $this; } + /** + * Get SkipGatewayRules + * Skip payment gateway fraud engine rules (on compatible gateways only.) + * @return bool + */ + public function getSkipGatewayRules() + { + return $this->skipGatewayRules; + } + + /** + * Set SkipGatewayRules + * Skip payment gateway fraud engine rules (on compatible gateways only.) + * @param bool $value + * @return $this + */ + public function setSkipGatewayRules($value) + { + $this->skipGatewayRules = $value; + return $this; + } + /** * Fills the current object with the new values pulled from the data @@ -99,6 +127,9 @@ public function fillWithData($data) if(! empty($data['is_legit'])) $this->setIsLegit($data['is_legit']); + if(! empty($data['skip_gateway_rules'])) + $this->setSkipGatewayRules($data['skip_gateway_rules']); + return $this; } @@ -110,6 +141,7 @@ public function jsonSerialize() { return array( "score" => $this->getScore(), "is_legit" => $this->getIsLegit(), + "skip_gateway_rules" => $this->getSkipGatewayRules(), ); } diff --git a/src/Networking/Request.php b/src/Networking/Request.php index 42b8f9d..1de4456 100644 --- a/src/Networking/Request.php +++ b/src/Networking/Request.php @@ -31,7 +31,7 @@ protected function prepare($options, $len = null) $headers = array( 'API-Version: 1.4.0.0', 'Content-Type: application/json', - 'User-Agent: ProcessOut PHP-Bindings/6.28.0' + 'User-Agent: ProcessOut PHP-Bindings/6.29.0' ); if (! empty($options['idempotencyKey'])) $headers[] = 'Idempotency-Key: ' . $options['idempotencyKey']; diff --git a/src/Transaction.php b/src/Transaction.php index 9b631ba..cc5fd3e 100755 --- a/src/Transaction.php +++ b/src/Transaction.php @@ -382,6 +382,12 @@ class Transaction implements \JsonSerializable */ protected $paymentType; + /** + * The Electronic Commerce Indicator + * @var string + */ + protected $eci; + /** * Native APM response data * @var object @@ -1836,6 +1842,28 @@ public function setPaymentType($value) return $this; } + /** + * Get Eci + * The Electronic Commerce Indicator + * @return string + */ + public function getEci() + { + return $this->eci; + } + + /** + * Set Eci + * The Electronic Commerce Indicator + * @param string $value + * @return $this + */ + public function setEci($value) + { + $this->eci = $value; + return $this; + } + /** * Get NativeApm * Native APM response data @@ -2078,6 +2106,9 @@ public function fillWithData($data) if(! empty($data['payment_type'])) $this->setPaymentType($data['payment_type']); + if(! empty($data['eci'])) + $this->setEci($data['eci']); + if(! empty($data['native_apm'])) $this->setNativeApm($data['native_apm']); @@ -2154,6 +2185,7 @@ public function jsonSerialize() { "initial_scheme_transaction_id" => $this->getInitialSchemeTransactionId(), "scheme_id" => $this->getSchemeId(), "payment_type" => $this->getPaymentType(), + "eci" => $this->getEci(), "native_apm" => $this->getNativeApm(), "external_details" => $this->getExternalDetails(), );