Skip to content

Commit

Permalink
add new phone object, has_been_authorized card flag, gateway configur…
Browse files Browse the repository at this point in the history
…ation metadata, invoice nativeAPM and unsupported_feature_bypass, nativeAPM objects, ravelin external fraud tool key, PSP external_details, SFTP settings API, gateway error codes API, payout API, refund API (#15)

Co-authored-by: ProcessOut Fountain <[email protected]>
  • Loading branch information
mateusz-walesiak-cko and processout-machine authored Jan 11, 2024
1 parent 30b6305 commit f185e3d
Show file tree
Hide file tree
Showing 28 changed files with 3,091 additions and 15 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,3 @@ Temporary Items
/vendor

deploy.sh

.github
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The package's installation is done using composer. Simply add these lines to you
```json
{
"require": {
"processout/processout-php": "^6.27.0"
"processout/processout-php": "^6.28.0"
}
}
```
Expand Down
15 changes: 15 additions & 0 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,23 @@
include_once(dirname(__FILE__) . "/src/CardInformation.php");
include_once(dirname(__FILE__) . "/src/Coupon.php");
include_once(dirname(__FILE__) . "/src/Customer.php");
include_once(dirname(__FILE__) . "/src/CustomerPhone.php");
include_once(dirname(__FILE__) . "/src/Token.php");
include_once(dirname(__FILE__) . "/src/Discount.php");
include_once(dirname(__FILE__) . "/src/Event.php");
include_once(dirname(__FILE__) . "/src/Gateway.php");
include_once(dirname(__FILE__) . "/src/GatewayConfiguration.php");
include_once(dirname(__FILE__) . "/src/Invoice.php");
include_once(dirname(__FILE__) . "/src/NativeAPMRequest.php");
include_once(dirname(__FILE__) . "/src/NativeAPMParameterValue.php");
include_once(dirname(__FILE__) . "/src/InvoiceTax.php");
include_once(dirname(__FILE__) . "/src/InvoiceExternalFraudTools.php");
include_once(dirname(__FILE__) . "/src/InvoiceRisk.php");
include_once(dirname(__FILE__) . "/src/InvoiceDevice.php");
include_once(dirname(__FILE__) . "/src/InvoiceShipping.php");
include_once(dirname(__FILE__) . "/src/InvoiceShippingPhone.php");
include_once(dirname(__FILE__) . "/src/InvoiceBilling.php");
include_once(dirname(__FILE__) . "/src/UnsupportedFeatureBypass.php");
include_once(dirname(__FILE__) . "/src/InvoiceDetail.php");
include_once(dirname(__FILE__) . "/src/CustomerAction.php");
include_once(dirname(__FILE__) . "/src/DunningAction.php");
Expand All @@ -44,15 +49,25 @@
include_once(dirname(__FILE__) . "/src/Plan.php");
include_once(dirname(__FILE__) . "/src/Product.php");
include_once(dirname(__FILE__) . "/src/Project.php");
include_once(dirname(__FILE__) . "/src/ProjectSFTPSettings.php");
include_once(dirname(__FILE__) . "/src/Refund.php");
include_once(dirname(__FILE__) . "/src/Subscription.php");
include_once(dirname(__FILE__) . "/src/Transaction.php");
include_once(dirname(__FILE__) . "/src/NativeAPMResponse.php");
include_once(dirname(__FILE__) . "/src/NativeAPMParameterDefinition.php");
include_once(dirname(__FILE__) . "/src/NativeAPMParameterValueDefinition.php");
include_once(dirname(__FILE__) . "/src/ThreeDS.php");
include_once(dirname(__FILE__) . "/src/PaymentDataThreeDSRequest.php");
include_once(dirname(__FILE__) . "/src/PaymentDataNetworkAuthentication.php");
include_once(dirname(__FILE__) . "/src/PaymentDataThreeDSAuthentication.php");
include_once(dirname(__FILE__) . "/src/TransactionOperation.php");
include_once(dirname(__FILE__) . "/src/Webhook.php");
include_once(dirname(__FILE__) . "/src/WebhookEndpoint.php");
include_once(dirname(__FILE__) . "/src/ErrorCodes.php");
include_once(dirname(__FILE__) . "/src/CategoryErrorCodes.php");
include_once(dirname(__FILE__) . "/src/NativeAPMTransactionDetailsGateway.php");
include_once(dirname(__FILE__) . "/src/NativeAPMTransactionDetailsInvoice.php");
include_once(dirname(__FILE__) . "/src/NativeAPMTransactionDetails.php");
include_once(dirname(__FILE__) . "/src/InvoicesProcessNativePaymentResponse.php");

include_once(dirname(__FILE__) . "/src/GatewayRequest.php");
64 changes: 64 additions & 0 deletions src/Card.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,18 @@ class Card implements \JsonSerializable
*/
protected $tokenType;

/**
* Contains true if the card was used to create a customer token or a direct transaction, false otherwise
* @var boolean
*/
protected $used;

/**
* Contains true if the card was successfully authorized, false otherwise
* @var boolean
*/
protected $hasBeenAuthorized;

/**
* Metadata related to the card, in the form of a dictionary (key-value pair)
* @var dictionary
Expand Down Expand Up @@ -823,6 +835,50 @@ public function setTokenType($value)
return $this;
}

/**
* Get Used
* Contains true if the card was used to create a customer token or a direct transaction, false otherwise
* @return bool
*/
public function getUsed()
{
return $this->used;
}

/**
* Set Used
* Contains true if the card was used to create a customer token or a direct transaction, false otherwise
* @param bool $value
* @return $this
*/
public function setUsed($value)
{
$this->used = $value;
return $this;
}

/**
* Get HasBeenAuthorized
* Contains true if the card was successfully authorized, false otherwise
* @return bool
*/
public function getHasBeenAuthorized()
{
return $this->hasBeenAuthorized;
}

/**
* Set HasBeenAuthorized
* Contains true if the card was successfully authorized, false otherwise
* @param bool $value
* @return $this
*/
public function setHasBeenAuthorized($value)
{
$this->hasBeenAuthorized = $value;
return $this;
}

/**
* Get Metadata
* Metadata related to the card, in the form of a dictionary (key-value pair)
Expand Down Expand Up @@ -1000,6 +1056,12 @@ public function fillWithData($data)
if(! empty($data['token_type']))
$this->setTokenType($data['token_type']);

if(! empty($data['used']))
$this->setUsed($data['used']);

if(! empty($data['has_been_authorized']))
$this->setHasBeenAuthorized($data['has_been_authorized']);

if(! empty($data['metadata']))
$this->setMetadata($data['metadata']);

Expand Down Expand Up @@ -1048,6 +1110,8 @@ public function jsonSerialize() {
"ip_address" => $this->getIpAddress(),
"fingerprint" => $this->getFingerprint(),
"token_type" => $this->getTokenType(),
"used" => $this->getUsed(),
"has_been_authorized" => $this->getHasBeenAuthorized(),
"metadata" => $this->getMetadata(),
"expires_soon" => $this->getExpiresSoon(),
"sandbox" => $this->getSandbox(),
Expand Down
Loading

0 comments on commit f185e3d

Please sign in to comment.