Skip to content

Commit

Permalink
20210323 deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
securesubmit-buildmaster committed Mar 23, 2021
1 parent 57994ad commit 7cd1d5c
Show file tree
Hide file tree
Showing 26 changed files with 888 additions and 45 deletions.
4 changes: 2 additions & 2 deletions src/Builders/AuthorizationBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ public function __construct($type, IPaymentMethod $paymentMethod = null)
*
* @return Transaction
*/
public function execute(string $configName = 'default')
public function execute($configName = 'default')
{
parent::execute($configName);

Expand All @@ -535,7 +535,7 @@ public function execute(string $configName = 'default')
*
* @return String
*/
public function serialize(string $configName = 'default')
public function serialize($configName = 'default')
{
$this->transactionModifier = TransactionModifier::HOSTEDREQUEST;
parent::execute();
Expand Down
2 changes: 1 addition & 1 deletion src/Builders/ManagementBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public function __isset($name)
*
* @return Transaction
*/
public function execute(string $configName = 'default')
public function execute($configName = 'default')
{
parent::execute($configName);
return ServicesContainer::instance()
Expand Down
14 changes: 7 additions & 7 deletions src/Builders/PayFacBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function __construct($type)
*
* @return mixed
*/
public function execute(string $configName = 'default')
public function execute($configName = 'default')
{
parent::execute($configName);

Expand Down Expand Up @@ -170,7 +170,7 @@ protected function setupValidations()
}

/*
* Primary Bank Account Information Optional. Used to add a bank account to which funds can be settled
* Primary Bank Account Information - Optional. Used to add a bank account to which funds can be settled
*
* var Object GlobalPayments\Api\Entities\PayFac\BankAccountData;
*/
Expand All @@ -180,7 +180,7 @@ public function withBankAccountData(BankAccountData $bankAccountData)
return $this;
}
/*
* Merchant Beneficiary Owner Information Required for all merchants validating KYC based off of personal data
* Merchant Beneficiary Owner Information - Required for all merchants validating KYC based off of personal data
*
* var Object GlobalPayments\Api\Entities\PayFac\BeneficialOwnerData;
*/
Expand All @@ -190,7 +190,7 @@ public function withBeneficialOwnerData(BeneficialOwnerData $beneficialOwnerData
return $this;
}
/*
* Business Data Required for business validated accounts. May also be required for personal validated accounts
* Business Data - Required for business validated accounts. May also be required for personal validated accounts
* by ProPay Risk Team
*
* var Object GlobalPayments\Api\Entities\PayFac\BusinessData;
Expand All @@ -201,7 +201,7 @@ public function withBusinessData(BusinessData $businessData)
return $this;
}
/*
* Significant Owner Information May be required for some partners based on ProPay Risk decision
* Significant Owner Information - May be required for some partners based on ProPay Risk decision
*
* var Object GlobalPayments\Api\Entities\PayFac\SignificantOwnerData;
*/
Expand All @@ -211,7 +211,7 @@ public function withSignificantOwnerData(SignificantOwnerData $significantOwnerD
return $this;
}
/*
* Threat Risk Assessment Information May be required based on ProPay Risk Decision
* Threat Risk Assessment Information - May be required based on ProPay Risk Decision
*
* var Object GlobalPayments\Api\Entities\PayFac\ThreatRiskData;
*/
Expand Down Expand Up @@ -268,7 +268,7 @@ public function withAccountNumber($accountNumber)
}

/*
* Temporary password which will allow a onetime login to ProPays website. Must be at least eight characters.
* Temporary password which will allow a onetime login to ProPay's website. Must be at least eight characters.
* Must not contain part or the entire first or last name. Must contain at least one capital letter,
* one lower case letter, and either one symbol or one number
*
Expand Down
2 changes: 1 addition & 1 deletion src/Builders/RecurringBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function addSearchCriteria($key, $value)
*
* @return mixed
*/
public function execute(string $configName = 'default')
public function execute($configName = 'default')
{
parent::execute($configName);

Expand Down
2 changes: 1 addition & 1 deletion src/Builders/ReportBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct($reportType)
*
* @return mixed
*/
public function execute(string $configName = 'default')
public function execute($configName = 'default')
{
parent::execute($configName);

Expand Down
54 changes: 52 additions & 2 deletions src/Entities/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace GlobalPayments\Api\Entities;

use GlobalPayments\Api\Entities\Exceptions\ArgumentException;
use GlobalPayments\Api\Utils\CountryUtils;

/**
* Represents a billing or shipping address for the consumer.
*/
Expand Down Expand Up @@ -70,14 +73,56 @@ class Address
*
* @var string
*/
public $country;
protected $country;

/**
* Consumer's country code.
*
* @var string
*/
public $countryCode;
protected $countryCode;

public function __get($property)
{
if (property_exists($this, $property)) {
return $this->{$property};
}
}

public function __set($property, $value)
{
if (in_array(
$property,
[
'countryCode',
'country',
]
)) {
$countryInfo = CountryUtils::getCountryInfo($value);
}

switch ($property)
{
case 'countryCode':
if ($this->country == null && isset($countryInfo)) {
$this->country = !empty($countryInfo['name']) ? $countryInfo['name'] : null;
}
break;
case 'country':
if ($this->countryCode == null && isset($countryInfo)) {
$this->countryCode = !empty($countryInfo['alpha2']) ? $countryInfo['alpha2'] : null;
}
break;
default:
break;
}

if (property_exists($this, $property)) {
return $this->{$property} = $value;
}

throw new ArgumentException(sprintf('Property `%s` does not exist on Address', $property));
}

/**
* Gets the consumer's province.
Expand All @@ -93,4 +138,9 @@ public function getProvince()
? $this->province
: $this->state;
}

public function isCountry($countryCode)
{
return CountryUtils::isCountry($this, $countryCode);
}
}
36 changes: 36 additions & 0 deletions src/Entities/CustomWebProxy.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php


namespace GlobalPayments\Api\Entities;


class CustomWebProxy implements IWebProxy
{
private $uri;
private $username;
private $password;

public function __construct($uri, $username = null, $password = null)
{
$this->uri = $uri;
$this->username = $username;
$this->password = $password;
}

public function __get($property)
{
if (property_exists($this, $property)) {
return $this->{$property};
}
}

public function getProxy($destination)
{
return $destination;
}

public function isBypassed($host)
{
return false;
}
}
1 change: 1 addition & 0 deletions src/Entities/Enums/FraudFilterMode.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ class FraudFilterMode extends Enum
const NONE = 'NONE';
const OFF = 'OFF';
const PASSIVE = 'PASSIVE';
const ACTIVE = 'ACTIVE ';
}
Loading

0 comments on commit 7cd1d5c

Please sign in to comment.