Skip to content

Commit

Permalink
Update payment sessions schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
armando-rodriguez-cko committed Aug 22, 2024
1 parent ac75764 commit 465eb24
Show file tree
Hide file tree
Showing 33 changed files with 433 additions and 52 deletions.
11 changes: 11 additions & 0 deletions lib/Checkout/Common/AccountChangeIndicatorType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Checkout\Common;

final class AccountChangeIndicatorType
{
public static $lessThanThirtyDays = "less_than_thirty_days";
public static $moreThanSixtyDays = "more_than_sixty_days";
public static $thirtyToSixtyDays = "thirty_to_sixty_days";
public static $thisTransaction = "this_transaction";
}
12 changes: 12 additions & 0 deletions lib/Checkout/Common/AccountPasswordChangeIndicatorType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace Checkout\Common;

final class AccountPasswordChangeIndicatorType
{
public static $lessThanThirtyDays = "less_than_thirty_days";
public static $moreThanSixtyDays = "more_than_sixty_days";
public static $noChange = "no_change";
public static $thirtyToSixtyDays = "thirty_to_sixty_days";
public static $thisTransaction = "this_transaction";
}
10 changes: 10 additions & 0 deletions lib/Checkout/Common/AccountTypeCardProductType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace Checkout\Common;

final class AccountTypeCardProductType
{
public static $credit = "credit";
public static $debit = "debit";
public static $notApplicable = "not_applicable";
}
12 changes: 12 additions & 0 deletions lib/Checkout/Common/CardholderAccountAgeIndicatorType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace Checkout\Common;

final class CardholderAccountAgeIndicatorType
{
public static $lessThanThirtyDays = "less_than_thirty_days";
public static $moreThanSixtyDays = "more_than_sixty_days";
public static $noAccount = "no_account";
public static $thirtyToSixtyDays = "thirty_to_sixty_days";
public static $thisTransaction = "this_transaction";
}
12 changes: 8 additions & 4 deletions lib/Checkout/Common/ChallengeIndicatorType.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@

namespace Checkout\Common;

class ChallengeIndicatorType
final class ChallengeIndicatorType
{
public static $no_preference = "no_preference";
public static $no_challenge_requested = "no_challenge_requested";
public static $challenge_requested = "challenge_requested";
public static $challenge_requested_mandate = "challenge_requested_mandate";

public static $data_share = "data_share";
public static $low_value = "low_value";
public static $no_challenge_requested = "no_challenge_requested";
public static $no_preference = "no_preference";
public static $transaction_risk_assessment = "transaction_risk_assessment";
public static $trusted_listing = "trusted_listing";
public static $trusted_listing_prompt = "trusted_listing_prompt";
}
16 changes: 8 additions & 8 deletions lib/Checkout/Common/Exemption.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

namespace Checkout\Common;

class Exemption
final class Exemption
{
public static $none = "none";
public static $low_risk_program = "low_risk_program";
public static $low_value = "low_value";
public static $none = "none";
public static $other = "other";
public static $out_of_sca_scope = "out_of_sca_scope";
public static $recurring_operation = "recurring_operation";
public static $transaction_risk_assessment = "transaction_risk_assessment";
public static $sca_delegation = "sca_delegation";
public static $secure_corporate_payment = "secure_corporate_payment";
public static $trusted_listing = "trusted_listing";
public static $three_ds_outage = "3ds_outage";
public static $sca_delegation = "sca_delegation";
public static $out_of_sca_scope = "out_of_sca_scope";
public static $other = "other";
public static $low_risk_program = "low_risk_program";
public static $transaction_risk_assessment = "transaction_risk_assessment";
public static $trusted_listing = "trusted_listing";
}
8 changes: 4 additions & 4 deletions lib/Checkout/Sessions/AuthenticationMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

namespace Checkout\Sessions;

class AuthenticationMethod
final class AuthenticationMethod
{
public static $no_authentication = "no_authentication";
public static $own_credentials = "own_credentials";
public static $federated_id = "federated_id";
public static $fido = "fido";
public static $issuer_credentials = "issuer_credentials";
public static $no_authentication = "no_authentication";
public static $own_credentials = "own_credentials";
public static $third_party_authentication = "third_party_authentication";
public static $fido = "fido";
}
6 changes: 3 additions & 3 deletions lib/Checkout/Sessions/AuthenticationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

final class AuthenticationType
{
public static $regular = "regular";
public static $recurring = "recurring";
public static $add_card = "add_card";
public static $installment = "installment";
public static $maintain_card = "maintain_card";
public static $add_card = "add_card";
public static $recurring = "recurring";
public static $regular = "regular";
}
69 changes: 68 additions & 1 deletion lib/Checkout/Sessions/CardholderAccountInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

namespace Checkout\Sessions;

class CardholderAccountInfo
use DateTime;
use Checkout\Common\CardholderAccountAgeIndicatorType;
use Checkout\Common\AccountChangeIndicatorType;
use Checkout\Common\AccountPasswordChangeIndicatorType;
use Checkout\Common\AccountTypeCardProductType;

final class CardholderAccountInfo
{
/**
* @var int
Expand Down Expand Up @@ -41,6 +47,67 @@ class CardholderAccountInfo

/**
* @var string value of AuthenticationMethod
* @deprecated This property will be removed in the future, and should not be used.
*/
public $authentication_method;

/**
* @var string value of CardholderAccountAgeIndicatorType
*/
public $cardholder_account_age_indicator;

/**
* @var DateTime
*/
public $account_change;

/**
* @var string value of AccountChangeIndicatorType
*/
public $account_change_indicator;

/**
* @var DateTime
*/
public $account_date;

/**
* @var string
*/
public $account_password_change;

/**
* @var string value of AccountPasswordChangeIndicatorType
*/
public $account_password_change_indicator;

/**
* @var int
*/
public $transactions_per_year;

/**
* @var DateTime
*/
public $payment_account_age;

/**
* @var DateTime
*/
public $shipping_address_usage;

/**
* @var string value of AccountTypeCardProductType
*/
public $account_type;

/**
* @var string
*/
public $account_id;

/**
* @var ThreeDsRequestorAuthenticationInfo
*/
public $three_ds_requestor_authentication_info;
}
5 changes: 2 additions & 3 deletions lib/Checkout/Sessions/Channel/AppSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

namespace Checkout\Sessions\Channel;

class AppSession extends ChannelData
final class AppSession extends ChannelData
{

public function __construct()
{
parent::__construct(ChannelType::$app);
Expand Down Expand Up @@ -46,7 +45,7 @@ public function __construct()
public $sdk_interface_type;

/**
* @var array of UIElements
* @var array of Checkout\Sessions\UIElements
*/
public $sdk_ui_elements;
}
2 changes: 1 addition & 1 deletion lib/Checkout/Sessions/Channel/BrowserSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Checkout\Sessions\Channel;

class BrowserSession extends ChannelData
final class BrowserSession extends ChannelData
{

public function __construct()
Expand Down
3 changes: 2 additions & 1 deletion lib/Checkout/Sessions/Channel/ChannelType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

final class ChannelType
{
public static $browser = "browser";
public static $app = "app";
public static $browser = "browser";
public static $merchant_initiated = "merchant_initiated";
}
16 changes: 16 additions & 0 deletions lib/Checkout/Sessions/Channel/MerchantInitiatedSession.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace Checkout\Sessions\Channel;

final class MerchantInitiatedSession extends ChannelData
{
public function __construct()
{
parent::__construct(ChannelType::$merchant_initiated);
}

/**
* @var string value of RequestType
*/
public $request_type;
}
18 changes: 18 additions & 0 deletions lib/Checkout/Sessions/Channel/RequestType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace Checkout\Sessions\Channel;

final class RequestType
{
public static $account_verification = "account_verification";
public static $add_card = "add_card";
public static $installment_transaction = "installment_transaction";
public static $mail_order = "mail_order";
public static $maintain_card_information = "maintain_card_information";
public static $other_payment = "other_payment";
public static $recurring_transaction = "recurring_transaction";
public static $split_or_delayed_shipment = "split_or_delayed_shipment";
public static $telephone_order = "telephone_order";
public static $top_up = "top_up";
public static $whitelist_status_check = "whitelist_status_check";
}
4 changes: 2 additions & 2 deletions lib/Checkout/Sessions/Channel/SdkInterfaceType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

final class SdkInterfaceType
{
public static $native = "native";
public static $html = "html";
public static $both = "both";
public static $html = "html";
public static $native = "native";
}
31 changes: 31 additions & 0 deletions lib/Checkout/Sessions/InitialTransaction.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

namespace Checkout\Sessions;

class InitialTransaction
{
/**
* @var string
*/
public $acs_transaction_id;

/**
* @var string
*/
public $authentication_method;

/**
* @var string
*/
public $authentication_timestamp;

/**
* @var string
*/
public $authentication_data;

/**
* @var string
*/
public $initial_session_id;
}
4 changes: 2 additions & 2 deletions lib/Checkout/Sessions/Installment.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ class Installment
/**
* @var int
*/
public $days_between_payments;
public $days_between_payments = 1;

/**
* @var string
*/
public $expiry;
public $expiry = "99991231";
}
32 changes: 32 additions & 0 deletions lib/Checkout/Sessions/MerchantRiskInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace Checkout\Sessions;

use DateTime;

class MerchantRiskInfo
{
/**
Expand All @@ -28,4 +30,34 @@ class MerchantRiskInfo
* @var string value of ShippingIndicator
*/
public $shipping_indicator;

/**
* @var string value of ReorderItemsIndicatorType
*/
public $reorder_items_indicator;

/**
* @var string value of PreOrderPurchaseIndicatorType
*/
public $pre_order_purchase_indicator;

/**
* @var DateTime
*/
public $pre_order_date;

/**
* @var string
*/
public $gift_card_amount;

/**
* @var string
*/
public $gift_card_currency;

/**
* @var string
*/
public $gift_card_count;
}
Loading

0 comments on commit 465eb24

Please sign in to comment.