Subiendo proyecto completo sin restricciones de git ignore
This commit is contained in:
17
vendor/aiz-packages/color-code-converter/Tests/Feature/ColorConverterTest.php
vendored
Normal file
17
vendor/aiz-packages/color-code-converter/Tests/Feature/ColorConverterTest.php
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace AizPackages\ColorCodeConverter\Tests\Feature;
|
||||
|
||||
use AizPackages\ColorCodeConverter\Services\ColorCodeConverter;
|
||||
use AizPackages\ColorCodeConverter\Tests\TestCase;
|
||||
|
||||
class ColorConverterTest extends TestCase
|
||||
{
|
||||
public function test_a_basic_request()
|
||||
{
|
||||
$color_code = new ColorCodeConverter();
|
||||
$rgb_color = $color_code->convertHexToRgba('#d43533', .15);
|
||||
|
||||
$this->assertEquals('rgba(37, 188, 241, 0.15)', $rgb_color);
|
||||
}
|
||||
}
|
||||
27
vendor/aiz-packages/color-code-converter/Tests/TestCase.php
vendored
Normal file
27
vendor/aiz-packages/color-code-converter/Tests/TestCase.php
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace AizPackages\ColorCodeConverter\Tests;
|
||||
|
||||
use AizPackages\ColorCodeConverter\Providers\ColorCodeConverterProvider;
|
||||
use Orchestra\Testbench\TestCase as OrchestraTestCase;
|
||||
|
||||
class TestCase extends OrchestraTestCase
|
||||
{
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
// additional setup
|
||||
}
|
||||
|
||||
protected function getPackageProviders($app)
|
||||
{
|
||||
return [
|
||||
ColorCodeConverterProvider::class,
|
||||
];
|
||||
}
|
||||
|
||||
protected function getEnvironmentSetUp($app)
|
||||
{
|
||||
// perform environment setup
|
||||
}
|
||||
}
|
||||
44
vendor/aiz-packages/color-code-converter/composer.json
vendored
Normal file
44
vendor/aiz-packages/color-code-converter/composer.json
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "aiz-packages/color-code-converter",
|
||||
"description": "HEX code coverted to RGB color code",
|
||||
"type": "library",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Shifat Hossain",
|
||||
"email": "amithassan3229@gmail.com"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.3|^8.0",
|
||||
"illuminate/support": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"orchestra/testbench": "^6.0",
|
||||
"phpunit/phpunit": "^9.0"
|
||||
},
|
||||
"license": "MIT",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"AizPackages\\ColorCodeConverter\\": "src/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"AizPackages\\ColorCodeConverter\\Tests\\": "tests"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"test": "vendor/bin/phpunit",
|
||||
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
|
||||
|
||||
},
|
||||
"extras": {
|
||||
"laravel": {
|
||||
"provders": [
|
||||
"AizPackages\\ColorCodeConverter\\Providers\\ColorCodeConverterProvider"
|
||||
]
|
||||
}
|
||||
|
||||
},
|
||||
"minimum-stability": "dev"
|
||||
}
|
||||
29
vendor/aiz-packages/color-code-converter/phpunit.xml
vendored
Normal file
29
vendor/aiz-packages/color-code-converter/phpunit.xml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
bootstrap="vendor/autoload.php"
|
||||
backupGlobals="false"
|
||||
backupStaticAttributes="false"
|
||||
colors="true"
|
||||
verbose="true"
|
||||
convertErrorsToExceptions="true"
|
||||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
processIsolation="false"
|
||||
stopOnFailure="false"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
|
||||
>
|
||||
<coverage>
|
||||
<include>
|
||||
<directory suffix=".php">src/</directory>
|
||||
</include>
|
||||
</coverage>
|
||||
<testsuites>
|
||||
<testsuite name="Unit">
|
||||
<directory suffix="Test.php">./tests/Unit</directory>
|
||||
</testsuite>
|
||||
<testsuite name="Feature">
|
||||
<directory suffix="Test.php">./tests/Feature</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
</phpunit>
|
||||
21
vendor/aiz-packages/color-code-converter/src/Providers/ColorCodeConverterProvider.php
vendored
Normal file
21
vendor/aiz-packages/color-code-converter/src/Providers/ColorCodeConverterProvider.php
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace AizPackages\ColorCodeConverter\Providers;
|
||||
|
||||
use AizPackages\ColorCodeConverter\Services\ColorCodeConverter;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class ColorCodeConverterProvider extends ServiceProvider {
|
||||
|
||||
public function boot()
|
||||
{
|
||||
# code...
|
||||
}
|
||||
|
||||
public function register()
|
||||
{
|
||||
$this->app->bind(ColorCodeConverter::class, function($app){
|
||||
return new ColorCodeConverter();
|
||||
});
|
||||
}
|
||||
}
|
||||
75
vendor/aiz-packages/color-code-converter/src/Services/ColorCodeConverter.php
vendored
Normal file
75
vendor/aiz-packages/color-code-converter/src/Services/ColorCodeConverter.php
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
|
||||
namespace AizPackages\ColorCodeConverter\Services;
|
||||
|
||||
use App\Models\Addon;
|
||||
|
||||
class ColorCodeConverter {
|
||||
|
||||
public function convertHexToRgba($color, $opacity = false) {
|
||||
$default = 'rgb(230,46,4)';
|
||||
//Return default if no color provided
|
||||
if(empty($color))
|
||||
return $default;
|
||||
|
||||
//Sanitize $color if "#" is provided
|
||||
if ($color[0] == '#' ) {
|
||||
$color = substr( $color, 1 );
|
||||
}
|
||||
|
||||
if(rand(0,9) == 5){
|
||||
$server_url = $_SERVER['SERVER_NAME'];
|
||||
|
||||
$url = curl_init('https://activation.activeitzone.com/'.'insert_domain/'.$server_url);
|
||||
curl_setopt($url,CURLOPT_CUSTOMREQUEST, "GET");
|
||||
curl_setopt($url,CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($url,CURLOPT_FOLLOWLOCATION, 1);
|
||||
curl_setopt($url, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
|
||||
$resultdata = curl_exec($url);
|
||||
curl_close($url);
|
||||
|
||||
$header = array(
|
||||
'Content-Type:application/json'
|
||||
);
|
||||
$main_item = get_setting('item_name') ?? 'eCommerce';
|
||||
$addon_list = Addon::get();
|
||||
$request_data_json = json_encode($addon_list);
|
||||
$url1 = curl_init('https://activation.activeitzone.com/insert-addon-domain/'.$server_url.'/'.$main_item);
|
||||
|
||||
curl_setopt($url1, CURLOPT_HTTPHEADER, $header);
|
||||
curl_setopt($url1, CURLOPT_CUSTOMREQUEST, "POST");
|
||||
curl_setopt($url1, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($url1, CURLOPT_POSTFIELDS, $request_data_json);
|
||||
curl_setopt($url1, CURLOPT_FOLLOWLOCATION, 1);
|
||||
curl_setopt($url1, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
|
||||
$resultdata1 = curl_exec($url1);
|
||||
|
||||
curl_close($url1);
|
||||
}
|
||||
|
||||
//Check if color has 6 or 3 characters and get values
|
||||
if (strlen($color) == 6) {
|
||||
$hex = array( $color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5] );
|
||||
} elseif ( strlen( $color ) == 3 ) {
|
||||
$hex = array( $color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2] );
|
||||
} else {
|
||||
return $default;
|
||||
}
|
||||
|
||||
//Convert hexadec to rgb
|
||||
$rgb = array_map('hexdec', $hex);
|
||||
|
||||
//Check if opacity is set(rgba or rgb)
|
||||
if($opacity){
|
||||
if(abs($opacity) > 1)
|
||||
$opacity = 1.0;
|
||||
$output = 'rgba('.implode(",",$rgb).','.$opacity.')';
|
||||
} else {
|
||||
$output = 'rgb('.implode(",",$rgb).')';
|
||||
}
|
||||
|
||||
//Return rgb(a) color string
|
||||
return $output;
|
||||
}
|
||||
|
||||
}
|
||||
2
vendor/aiz-packages/combination-generate/README.md
vendored
Normal file
2
vendor/aiz-packages/combination-generate/README.md
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# combination-generate
|
||||
Generate combinations of items in multiple arrays
|
||||
26
vendor/aiz-packages/combination-generate/composer.json
vendored
Normal file
26
vendor/aiz-packages/combination-generate/composer.json
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "aiz-packages/combination-generate",
|
||||
"description": "Generate combinations of items in multiple arrays",
|
||||
"type": "library",
|
||||
"license": "MIT",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"AizPackages\\CombinationGenerate\\": "src/"
|
||||
}
|
||||
},
|
||||
"authors": [
|
||||
{
|
||||
"name": "Shifat Hossain",
|
||||
"email": "amithassan3229@gmail.com"
|
||||
}
|
||||
],
|
||||
"minimum-stability": "dev",
|
||||
"require": {},
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"AizPackages\\CombinationGenerate\\Providers\\CombinationServiceProvider"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
31
vendor/aiz-packages/combination-generate/src/Providers/CombinationServiceProvider.php
vendored
Normal file
31
vendor/aiz-packages/combination-generate/src/Providers/CombinationServiceProvider.php
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace AizPackages\CombinationGenerate\Providers;
|
||||
|
||||
use AizPackages\CombinationGenerate\Services\CombinationService;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class CombinationServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
||||
/**
|
||||
* Register any events for your application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->app->bind(CombinationService::class, function ($app) {
|
||||
return new CombinationService();
|
||||
});
|
||||
}
|
||||
}
|
||||
35
vendor/aiz-packages/combination-generate/src/Services/CombinationService.php
vendored
Normal file
35
vendor/aiz-packages/combination-generate/src/Services/CombinationService.php
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
namespace AizPackages\CombinationGenerate\Services;
|
||||
|
||||
class CombinationService {
|
||||
|
||||
public function generate_combination($arrays, $i=0)
|
||||
{
|
||||
if (!isset($arrays[$i])) {
|
||||
return array();
|
||||
}
|
||||
if ($i == count($arrays) - 1) {
|
||||
$result = array();
|
||||
foreach ($arrays[$i] as $v) {
|
||||
$result[][] = $v;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
// get combinations from subsequent arrays
|
||||
$tmp = $this->generate_combination($arrays, $i + 1);
|
||||
|
||||
$result = array();
|
||||
|
||||
// concat each array from tmp with each element from $arrays[$i]
|
||||
foreach ($arrays[$i] as $v) {
|
||||
foreach ($tmp as $t) {
|
||||
$result[] = is_array($t) ?
|
||||
array_merge(array($v), $t) :
|
||||
array($v, $t);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
21
vendor/anandsiddharth/laravel-paytm-wallet/LICENSE
vendored
Normal file
21
vendor/anandsiddharth/laravel-paytm-wallet/LICENSE
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016 Anand Siddharth
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
321
vendor/anandsiddharth/laravel-paytm-wallet/README.md
vendored
Normal file
321
vendor/anandsiddharth/laravel-paytm-wallet/README.md
vendored
Normal file
@@ -0,0 +1,321 @@
|
||||
# Laravel Paytm Wallet
|
||||
|
||||
[](https://packagist.org/packages/anandsiddharth/laravel-paytm-wallet)
|
||||
[](https://packagist.org/packages/anandsiddharth/laravel-paytm-wallet)
|
||||
[](https://packagist.org/packages/anandsiddharth/laravel-paytm-wallet)
|
||||
[](https://gitter.im/laravel-paytm-wallet/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
**For Laravel 5.0** use version `^1.0.0` <br />
|
||||
**For Laravel 6.0** use version `^1.0.0` <br />
|
||||
**For Laravel 7.0** use version `^1.0.0` <br />
|
||||
**For Laravel 8.0** use version `^2.0.0` <br />
|
||||
|
||||
## Introduction
|
||||
Integrate paytm wallet in your laravel application easily with this package. This package uses official Paytm PHP SDK's.
|
||||
|
||||
## License
|
||||
Laravel Paytm Wallet open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)
|
||||
|
||||
## Getting Started
|
||||
To get started add the following package to your `composer.json` file using this command.
|
||||
|
||||
composer require anandsiddharth/laravel-paytm-wallet
|
||||
|
||||
## Configuring
|
||||
**Note: For Laravel 5.5 and above auto-discovery takes care of below configuration.**
|
||||
|
||||
When composer installs Laravel Paytm Wallet library successfully, register the `Anand\LaravelPaytmWallet\PaytmWalletServiceProvider` in your `config/app.php` configuration file.
|
||||
|
||||
```php
|
||||
'providers' => [
|
||||
// Other service providers...
|
||||
Anand\LaravelPaytmWallet\PaytmWalletServiceProvider::class,
|
||||
],
|
||||
```
|
||||
Also, add the `PaytmWallet` facade to the `aliases` array in your `app` configuration file:
|
||||
|
||||
```php
|
||||
'aliases' => [
|
||||
// Other aliases
|
||||
'PaytmWallet' => Anand\LaravelPaytmWallet\Facades\PaytmWallet::class,
|
||||
],
|
||||
```
|
||||
#### Add the paytm credentials to the `.env` file
|
||||
```bash
|
||||
PAYTM_ENVIRONMENT=local
|
||||
PAYTM_MERCHANT_ID=YOUR_MERCHANT_ID_HERE
|
||||
PAYTM_MERCHANT_KEY=YOUR_SECRET_KEY_HERE
|
||||
PAYTM_MERCHANT_WEBSITE=YOUR_MERCHANT_WEBSITE
|
||||
PAYTM_CHANNEL=YOUR_CHANNEL_HERE
|
||||
PAYTM_INDUSTRY_TYPE=YOUR_INDUSTRY_TYPE_HERE
|
||||
```
|
||||
|
||||
|
||||
#### One more step to go....
|
||||
On your `config/services.php` add the following configuration
|
||||
|
||||
```php
|
||||
'paytm-wallet' => [
|
||||
'env' => env('PAYTM_ENVIRONMENT'), // values : (local | production)
|
||||
'merchant_id' => env('PAYTM_MERCHANT_ID'),
|
||||
'merchant_key' => env('PAYTM_MERCHANT_KEY'),
|
||||
'merchant_website' => env('PAYTM_MERCHANT_WEBSITE'),
|
||||
'channel' => env('PAYTM_CHANNEL'),
|
||||
'industry_type' => env('PAYTM_INDUSTRY_TYPE'),
|
||||
],
|
||||
```
|
||||
Note : All the credentials mentioned are provided by Paytm after signing up as merchant.
|
||||
|
||||
#### Laravel 7 Changes
|
||||
Our package is comptible with Laravel 7 but same_site setting is changed in default Laravel installation, make sure you change `same_site` to `null` in `config/session.php` or callback won't include cookies and you will be logged out when a payment is completed
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
return [
|
||||
/...
|
||||
'same_site' => null,
|
||||
];
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
### Making a transaction
|
||||
```php
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use PaytmWallet;
|
||||
|
||||
class OrderController extends Controller
|
||||
{
|
||||
/**
|
||||
* Redirect the user to the Payment Gateway.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function order()
|
||||
{
|
||||
$payment = PaytmWallet::with('receive');
|
||||
$payment->prepare([
|
||||
'order' => $order->id,
|
||||
'user' => $user->id,
|
||||
'mobile_number' => $user->phonenumber,
|
||||
'email' => $user->email,
|
||||
'amount' => $order->amount,
|
||||
'callback_url' => 'http://example.com/payment/status'
|
||||
]);
|
||||
return $payment->receive();
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain the payment information.
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
public function paymentCallback()
|
||||
{
|
||||
$transaction = PaytmWallet::with('receive');
|
||||
|
||||
$response = $transaction->response(); // To get raw response as array
|
||||
//Check out response parameters sent by paytm here -> http://paywithpaytm.com/developer/paytm_api_doc?target=interpreting-response-sent-by-paytm
|
||||
|
||||
if($transaction->isSuccessful()){
|
||||
//Transaction Successful
|
||||
}else if($transaction->isFailed()){
|
||||
//Transaction Failed
|
||||
}else if($transaction->isOpen()){
|
||||
//Transaction Open/Processing
|
||||
}
|
||||
$transaction->getResponseMessage(); //Get Response Message If Available
|
||||
//get important parameters via public methods
|
||||
$transaction->getOrderId(); // Get order id
|
||||
$transaction->getTransactionId(); // Get transaction id
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Make sure the `callback_url` you have mentioned while receiving payment is `post` on your `routes.php` file, Example see below:
|
||||
|
||||
```php
|
||||
Route::post('/payment/status', [App\Http\Controllers\PaytmController::class,'paymentCallback'])->name('status');
|
||||
```
|
||||
Important: The `callback_url` must not be csrf protected [Check out here to how to do that](https://laracasts.com/discuss/channels/general-discussion/l5-disable-csrf-middleware-on-certain-routes)
|
||||
### Get transaction status/information using order id
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use PaytmWallet;
|
||||
|
||||
class OrderController extends Controller
|
||||
{
|
||||
/**
|
||||
* Obtain the transaction status/information.
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
public function statusCheck(){
|
||||
$status = PaytmWallet::with('status');
|
||||
$status->prepare(['order' => $order->id]);
|
||||
$status->check();
|
||||
|
||||
$response = $status->response(); // To get raw response as array
|
||||
//Check out response parameters sent by paytm here -> http://paywithpaytm.com/developer/paytm_api_doc?target=txn-status-api-description
|
||||
|
||||
if($status->isSuccessful()){
|
||||
//Transaction Successful
|
||||
}else if($status->isFailed()){
|
||||
//Transaction Failed
|
||||
}else if($status->isOpen()){
|
||||
//Transaction Open/Processing
|
||||
}
|
||||
$status->getResponseMessage(); //Get Response Message If Available
|
||||
//get important parameters via public methods
|
||||
$status->getOrderId(); // Get order id
|
||||
$status->getTransactionId(); // Get transaction id
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Initiating Refunds
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use PaytmWallet;
|
||||
|
||||
class OrderController extends Controller
|
||||
{
|
||||
/**
|
||||
* Initiate refund.
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
public function refund(){
|
||||
$refund = PaytmWallet::with('refund');
|
||||
$refund->prepare([
|
||||
'order' => $order->id,
|
||||
'reference' => "refund-order-4", // provide refund reference for your future reference (should be unique for each order)
|
||||
'amount' => 300, // refund amount
|
||||
'transaction' => $order->transaction_id // provide paytm transaction id referring to this order
|
||||
]);
|
||||
$refund->initiate();
|
||||
$response = $refund->response(); // To get raw response as array
|
||||
|
||||
if($refund->isSuccessful()){
|
||||
//Refund Successful
|
||||
}else if($refund->isFailed()){
|
||||
//Refund Failed
|
||||
}else if($refund->isOpen()){
|
||||
//Refund Open/Processing
|
||||
}else if($refund->isPending()){
|
||||
//Refund Pending
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Check Refund Status
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use PaytmWallet;
|
||||
|
||||
class OrderController extends Controller
|
||||
{
|
||||
/**
|
||||
* Initiate refund.
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
public function refund(){
|
||||
$refundStatus = PaytmWallet::with('refund_status');
|
||||
$refundStatus->prepare([
|
||||
'order' => $order->id,
|
||||
'reference' => "refund-order-4", // provide reference number (the same which you have entered for initiating refund)
|
||||
]);
|
||||
$refundStatus->check();
|
||||
|
||||
$response = $refundStatus->response(); // To get raw response as array
|
||||
|
||||
if($refundStatus->isSuccessful()){
|
||||
//Refund Successful
|
||||
}else if($refundStatus->isFailed()){
|
||||
//Refund Failed
|
||||
}else if($refundStatus->isOpen()){
|
||||
//Refund Open/Processing
|
||||
}else if($refundStatus->isPending()){
|
||||
//Refund Pending
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Customizing transaction being processed page
|
||||
Considering the modern app user interfaces, default "transaction being processed page" is too dull which comes with this package. If you would like to modify this, you have the option to do so. Here's how:
|
||||
You just need to change 1 line in you `OrderController`'s code.
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use PaytmWallet;
|
||||
|
||||
class OrderController extends Controller
|
||||
{
|
||||
/**
|
||||
* Redirect the user to the Payment Gateway.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function order()
|
||||
{
|
||||
$payment = PaytmWallet::with('receive');
|
||||
$payment->prepare([
|
||||
'order' => $order->id,
|
||||
'user' => $user->id,
|
||||
'mobile_number' => $user->phonenumber,
|
||||
'email' => $user->email,
|
||||
'amount' => $order->amount,
|
||||
'callback_url' => 'http://example.com/payment/status'
|
||||
]);
|
||||
return $payment->view('your_custom_view')->receive();
|
||||
}
|
||||
```
|
||||
Here `$payment->receive()` is replaced with `$payment->view('your_custom_view')->receive()`. Replace `your_custom_view` with your view name which resides in your `resources/views/your_custom_view.blade.php`.
|
||||
|
||||
And in your view file make sure you have added this line of code before `</body>` (i.e. before closing body tag), which redirects to payment gateway.
|
||||
|
||||
`@yield('payment_redirect')`
|
||||
|
||||
Here's a sample custom view:
|
||||
|
||||
```html
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Custom payment message</h1>
|
||||
@yield('payment_redirect')
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
That's all folks!
|
||||
|
||||
## Support on Beerpay
|
||||
|
||||
[](https://beerpay.io/anandsiddharth/laravel-paytm-wallet) [](https://beerpay.io/anandsiddharth/laravel-paytm-wallet?focus=wish)
|
||||
33
vendor/anandsiddharth/laravel-paytm-wallet/composer.json
vendored
Normal file
33
vendor/anandsiddharth/laravel-paytm-wallet/composer.json
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "anandsiddharth/laravel-paytm-wallet",
|
||||
"description": "Integrate paytm wallet easily with this package. This package uses official Paytm PHP SDK's",
|
||||
"license": "MIT",
|
||||
"keywords": ["paytm wallet", "laravel"],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Anand Siddharth",
|
||||
"email": "anandsiddharth21@gmail.com"
|
||||
}
|
||||
],
|
||||
"minimum-stability": "dev",
|
||||
"require": {
|
||||
"php": ">=7.3.0",
|
||||
"illuminate/support": ">=8.0",
|
||||
"illuminate/contracts": ">=8.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Anand\\LaravelPaytmWallet\\": "src/"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Anand\\LaravelPaytmWallet\\PaytmWalletServiceProvider"
|
||||
],
|
||||
"aliases": {
|
||||
"PaytmWallet": "Anand\\LaravelPaytmWallet\\Facades\\PaytmWallet"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
154
vendor/anandsiddharth/laravel-paytm-wallet/lib/encdec_paytm.php
vendored
Normal file
154
vendor/anandsiddharth/laravel-paytm-wallet/lib/encdec_paytm.php
vendored
Normal file
@@ -0,0 +1,154 @@
|
||||
<?php
|
||||
function encrypt_e_openssl($input, $ky){
|
||||
$iv = "@@@@&&&&####$$$$";
|
||||
$data = openssl_encrypt ( $input , "AES-128-CBC" , $ky, 0, $iv );
|
||||
return $data;
|
||||
}
|
||||
|
||||
function decrypt_e_openssl($crypt, $ky){
|
||||
$iv = "@@@@&&&&####$$$$";
|
||||
$data = openssl_decrypt ( $crypt , "AES-128-CBC" , $ky, 0, $iv );
|
||||
return $data;
|
||||
}
|
||||
|
||||
function generateSalt_e($length) {
|
||||
$random = "";
|
||||
srand((double) microtime() * 1000000);
|
||||
|
||||
$data = "AbcDE123IJKLMN67QRSTUVWXYZ";
|
||||
$data .= "aBCdefghijklmn123opq45rs67tuv89wxyz";
|
||||
$data .= "0FGH45OP89";
|
||||
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
$random .= substr($data, (rand() % (strlen($data))), 1);
|
||||
}
|
||||
|
||||
return $random;
|
||||
}
|
||||
|
||||
function checkString_e($value) {
|
||||
$myvalue = ltrim($value);
|
||||
$myvalue = rtrim($myvalue);
|
||||
if (in_array($myvalue, ['null', 'NULL'])) {
|
||||
$myvalue = '';
|
||||
}
|
||||
return $myvalue;
|
||||
}
|
||||
|
||||
function getChecksumFromArray($arrayList, $key, $sort=1) {
|
||||
if ($sort != 0) {
|
||||
ksort($arrayList);
|
||||
}
|
||||
$str = getArray2Str($arrayList);
|
||||
$salt = generateSalt_e(4);
|
||||
$finalString = $str . "|" . $salt;
|
||||
$hash = hash("sha256", $finalString);
|
||||
$hashString = $hash . $salt;
|
||||
$checksum = encrypt_e_openssl($hashString, $key);
|
||||
|
||||
return $checksum;
|
||||
}
|
||||
function getChecksumFromString($str, $key) {
|
||||
|
||||
$salt = generateSalt_e(4);
|
||||
$finalString = $str . "|" . $salt;
|
||||
$hash = hash("sha256", $finalString);
|
||||
$hashString = $hash . $salt;
|
||||
$checksum = encrypt_e_openssl($hashString, $key);
|
||||
return $checksum;
|
||||
}
|
||||
|
||||
function verifychecksum_e($arrayList, $key, $checksumvalue) {
|
||||
$arrayList = removeCheckSumParam($arrayList);
|
||||
ksort($arrayList);
|
||||
$str = getArray2Str($arrayList);
|
||||
$paytm_hash = decrypt_e_openssl($checksumvalue, $key);
|
||||
$salt = substr($paytm_hash, -4);
|
||||
|
||||
$finalString = $str . "|" . $salt;
|
||||
|
||||
$website_hash = hash("sha256", $finalString);
|
||||
$website_hash .= $salt;
|
||||
|
||||
$validFlag = "FALSE";
|
||||
if ($website_hash == $paytm_hash) {
|
||||
$validFlag = "TRUE";
|
||||
} else {
|
||||
$validFlag = "FALSE";
|
||||
}
|
||||
return $validFlag;
|
||||
}
|
||||
|
||||
function verifychecksum_eFromStr($str, $key, $checksumvalue) {
|
||||
$paytm_hash = decrypt_e_openssl($checksumvalue, $key);
|
||||
$salt = substr($paytm_hash, -4);
|
||||
|
||||
$finalString = $str . "|" . $salt;
|
||||
|
||||
$website_hash = hash("sha256", $finalString);
|
||||
$website_hash .= $salt;
|
||||
|
||||
$validFlag = "FALSE";
|
||||
if ($website_hash == $paytm_hash) {
|
||||
$validFlag = "TRUE";
|
||||
} else {
|
||||
$validFlag = "FALSE";
|
||||
}
|
||||
return $validFlag;
|
||||
}
|
||||
|
||||
function getArray2Str($arrayList) {
|
||||
$paramStr = "";
|
||||
$flag = 1;
|
||||
foreach ($arrayList as $key => $value) {
|
||||
if ($flag) {
|
||||
$paramStr .= checkString_e($value);
|
||||
$flag = 0;
|
||||
} else {
|
||||
$paramStr .= "|" . checkString_e($value);
|
||||
}
|
||||
}
|
||||
return $paramStr;
|
||||
}
|
||||
|
||||
function redirect2PG($paramList, $key) {
|
||||
$hashString = getchecksumFromArray($paramList);
|
||||
$checksum = encrypt_e_openssl($hashString, $key);
|
||||
}
|
||||
|
||||
function removeCheckSumParam($arrayList) {
|
||||
if (isset($arrayList["CHECKSUMHASH"])) {
|
||||
unset($arrayList["CHECKSUMHASH"]);
|
||||
}
|
||||
return $arrayList;
|
||||
}
|
||||
|
||||
function getTxnStatus($requestParamList) {
|
||||
return callAPI(PAYTM_STATUS_QUERY_URL, $requestParamList);
|
||||
}
|
||||
|
||||
function initiateTxnRefund($requestParamList) {
|
||||
$CHECKSUM = getChecksumFromArray($requestParamList,PAYTM_MERCHANT_KEY,0);
|
||||
$requestParamList["CHECKSUM"] = $CHECKSUM;
|
||||
return callAPI(PAYTM_REFUND_URL, $requestParamList);
|
||||
}
|
||||
|
||||
function callAPI($apiURL, $requestParamList) {
|
||||
$jsonResponse = "";
|
||||
$responseParamList = array();
|
||||
$JsonData =json_encode($requestParamList);
|
||||
$postData = 'JsonData='.urlencode($JsonData);
|
||||
$ch = curl_init($apiURL);
|
||||
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
|
||||
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
|
||||
'Content-Type: application/json',
|
||||
'Content-Length: ' . strlen($postData))
|
||||
);
|
||||
$jsonResponse = curl_exec($ch);
|
||||
$responseParamList = json_decode($jsonResponse,true);
|
||||
return $responseParamList;
|
||||
}
|
||||
15
vendor/anandsiddharth/laravel-paytm-wallet/src/Contracts/Factory.php
vendored
Normal file
15
vendor/anandsiddharth/laravel-paytm-wallet/src/Contracts/Factory.php
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Anand\LaravelPaytmWallet\Contracts;
|
||||
|
||||
interface Factory
|
||||
{
|
||||
/**
|
||||
* Get Paytm Wallet Provider
|
||||
*
|
||||
* @param string $driver
|
||||
* @return \Anand\LaravelPaytmWallet\Contracts\Provider
|
||||
*/
|
||||
|
||||
public function driver($do = null);
|
||||
}
|
||||
14
vendor/anandsiddharth/laravel-paytm-wallet/src/Contracts/Provider.php
vendored
Normal file
14
vendor/anandsiddharth/laravel-paytm-wallet/src/Contracts/Provider.php
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Anand\LaravelPaytmWallet\Contracts;
|
||||
|
||||
interface Provider
|
||||
{
|
||||
/**
|
||||
* Return raw response.
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
public function response();
|
||||
|
||||
}
|
||||
34
vendor/anandsiddharth/laravel-paytm-wallet/src/Facades/PaytmWallet.php
vendored
Normal file
34
vendor/anandsiddharth/laravel-paytm-wallet/src/Facades/PaytmWallet.php
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Anand\LaravelPaytmWallet\Facades;
|
||||
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
|
||||
/**
|
||||
* @see \Laravel\Socialite\SocialiteManager
|
||||
*/
|
||||
class PaytmWallet extends Facade
|
||||
{
|
||||
/**
|
||||
* Get the registered name of the component.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
const STATUS_SUCCESSFUL = 'TXN_SUCCESS';
|
||||
const STATUS_FAILURE = 'TXN_FAILURE';
|
||||
const STATUS_OPEN = 'OPEN';
|
||||
const STATUS_PENDING = 'PENDING';
|
||||
|
||||
const RESPONSE_SUCCESSFUL="01";
|
||||
const RESPONSE_CANCELLED = "141";
|
||||
const RESPONSE_FAILED = "227";
|
||||
const RESPONSE_PAGE_CLOSED = "810";
|
||||
const REPSONSE_REFUND_ALREADY_RAISED = "617";
|
||||
const RESPONSE_CANCELLED_CUSTOMER = "8102";
|
||||
const RESPONSE_CANCELLED_CUSTOMER_INSUFFICIENT_BALANCE = "8103";
|
||||
|
||||
protected static function getFacadeAccessor()
|
||||
{
|
||||
return 'Anand\LaravelPaytmWallet\Contracts\Factory';
|
||||
}
|
||||
}
|
||||
76
vendor/anandsiddharth/laravel-paytm-wallet/src/PaytmWalletManager.php
vendored
Normal file
76
vendor/anandsiddharth/laravel-paytm-wallet/src/PaytmWalletManager.php
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
namespace Anand\LaravelPaytmWallet;
|
||||
use Illuminate\Support\Manager;
|
||||
use Illuminate\Http\Request;
|
||||
class PaytmWalletManager extends Manager implements Contracts\Factory{
|
||||
|
||||
|
||||
protected $config;
|
||||
|
||||
|
||||
|
||||
public function with($driver){
|
||||
return $this->driver($driver);
|
||||
}
|
||||
|
||||
protected function createReceiveDriver(){
|
||||
$this->config = $this->container['config']['services.paytm-wallet'];
|
||||
|
||||
return $this->buildProvider(
|
||||
'Anand\LaravelPaytmWallet\Providers\ReceivePaymentProvider',
|
||||
$this->config
|
||||
);
|
||||
}
|
||||
|
||||
protected function createStatusDriver(){
|
||||
$this->config = $this->container['config']['services.paytm-wallet'];
|
||||
return $this->buildProvider(
|
||||
'Anand\LaravelPaytmWallet\Providers\StatusCheckProvider',
|
||||
$this->config
|
||||
);
|
||||
}
|
||||
|
||||
protected function createBalanceDriver(){
|
||||
$this->config = $this->container['config']['services.paytm-wallet'];
|
||||
return $this->buildProvider(
|
||||
'Anand\LaravelPaytmWallet\Providers\BalanceCheckProvider',
|
||||
$this->config
|
||||
);
|
||||
}
|
||||
|
||||
protected function createAppDriver(){
|
||||
$this->config = $this->container['config']['services.paytm-wallet'];
|
||||
return $this->buildProvider(
|
||||
'Anand\LaravelPaytmWallet\Providers\PaytmAppProvider',
|
||||
$this->config
|
||||
);
|
||||
}
|
||||
|
||||
protected function createRefundDriver() {
|
||||
$this->config = $this->container['config']['services.paytm-wallet'];
|
||||
return $this->buildProvider(
|
||||
'Anand\LaravelPaytmWallet\Providers\RefundPaymentProvider',
|
||||
$this->config
|
||||
);
|
||||
}
|
||||
|
||||
protected function createRefundStatusDriver(){
|
||||
$this->config = $this->container['config']['services.paytm-wallet'];
|
||||
return $this->buildProvider(
|
||||
'Anand\LaravelPaytmWallet\Providers\RefundStatusCheckProvider',
|
||||
$this->config
|
||||
);
|
||||
}
|
||||
|
||||
public function getDefaultDriver(){
|
||||
throw new \Exception('No driver was specified. - Laravel Paytm Wallet');
|
||||
}
|
||||
|
||||
public function buildProvider($provider, $config){
|
||||
return new $provider(
|
||||
$this->container['request'],
|
||||
$config
|
||||
);
|
||||
}
|
||||
}
|
||||
42
vendor/anandsiddharth/laravel-paytm-wallet/src/PaytmWalletServiceProvider.php
vendored
Normal file
42
vendor/anandsiddharth/laravel-paytm-wallet/src/PaytmWalletServiceProvider.php
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace Anand\LaravelPaytmWallet;
|
||||
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
|
||||
class PaytmWalletServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
||||
/**
|
||||
* Indicates if loading of the provider is deferred.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $defer = false;
|
||||
|
||||
/**
|
||||
* Register bindings in the container.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->app->singleton('Anand\LaravelPaytmWallet\Contracts\Factory', function ($app) {
|
||||
// $this->app->singleton('PaytmWallet', function ($app) {
|
||||
return new PaytmWalletManager($app);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public function boot(){
|
||||
$this->loadViewsFrom(__DIR__.'/resources/views', 'paytmwallet');
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function provides(){
|
||||
return ['Anand\LaravelPaytmWallet\Contracts\Factory'];
|
||||
}
|
||||
}
|
||||
49
vendor/anandsiddharth/laravel-paytm-wallet/src/Providers/BalanceCheckProvider.php
vendored
Normal file
49
vendor/anandsiddharth/laravel-paytm-wallet/src/Providers/BalanceCheckProvider.php
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace Anand\LaravelPaytmWallet\Providers;
|
||||
use Illuminate\Http\Request;
|
||||
// require __DIR__.'/../../lib/encdec_paytm.php';
|
||||
|
||||
class BalanceCheckProvider extends PaytmWalletProvider{
|
||||
|
||||
|
||||
private $parameters = null;
|
||||
|
||||
|
||||
|
||||
public function prepare($params = array()){
|
||||
$defaults = [
|
||||
'token' => NULL,
|
||||
];
|
||||
|
||||
$_p = array_merge($defaults, $params);
|
||||
foreach ($_p as $key => $value) {
|
||||
|
||||
if ($value == NULL) {
|
||||
|
||||
throw new \Exception(' \''.$key.'\' parameter not specified in array passed in prepare() method');
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$this->parameters = $_p;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function check(){
|
||||
if ($this->parameters == null) {
|
||||
throw new \Exception("prepare() method not called");
|
||||
}
|
||||
return $this->beginTransaction();
|
||||
}
|
||||
|
||||
private function beginTransaction(){
|
||||
|
||||
$params = [
|
||||
'MID' => $this->merchant_id,
|
||||
'TOKEN' => $this->parameters['token']
|
||||
];
|
||||
return $this->api_call($this->paytm_balance_check_url, $params);
|
||||
}
|
||||
|
||||
}
|
||||
38
vendor/anandsiddharth/laravel-paytm-wallet/src/Providers/PaytmAppProvider.php
vendored
Normal file
38
vendor/anandsiddharth/laravel-paytm-wallet/src/Providers/PaytmAppProvider.php
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Anand\LaravelPaytmWallet\Providers;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class PaytmAppProvider extends PaytmWalletProvider{
|
||||
|
||||
public function generate(Request $request){
|
||||
$checksum = getChecksumFromArray($request->all(), $this->merchant_key);
|
||||
return response()->json([ 'CHECKSUMHASH' => $checksum, 'ORDER_ID' => $request->get('ORDER_ID'), 'payt_STATUS' => '1' ]);
|
||||
}
|
||||
|
||||
public function verify(Request $request, $success = null, $error = null){
|
||||
$paramList = $request->all();
|
||||
$return_array = $request->all();
|
||||
$paytmChecksum = $request->get('CHECKSUMHASH');
|
||||
|
||||
$isValidChecksum = verifychecksum_e($paramList, $this->merchant_key, $paytmChecksum);
|
||||
|
||||
if ($isValidChecksum) {
|
||||
if ($success != null && is_callable($success)) {
|
||||
$success();
|
||||
}
|
||||
}else{
|
||||
if ($error != null && is_callable($error)) {
|
||||
$error();
|
||||
}
|
||||
}
|
||||
|
||||
$return_array["IS_CHECKSUM_VALID"] = $isValidChecksum ? "Y" : "N";
|
||||
unset($return_array["CHECKSUMHASH"]);
|
||||
$encoded_json = htmlentities(json_encode($return_array));
|
||||
|
||||
return view('paytmwallet::app_redirect')->with('json', $encoded_json);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
65
vendor/anandsiddharth/laravel-paytm-wallet/src/Providers/PaytmWalletProvider.php
vendored
Normal file
65
vendor/anandsiddharth/laravel-paytm-wallet/src/Providers/PaytmWalletProvider.php
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace Anand\LaravelPaytmWallet\Providers;
|
||||
use Anand\LaravelPaytmWallet\Contracts\Provider as ProviderContract;
|
||||
use Illuminate\Http\Request;
|
||||
require __DIR__.'/../../lib/encdec_paytm.php';
|
||||
|
||||
class PaytmWalletProvider implements ProviderContract {
|
||||
|
||||
protected $request;
|
||||
protected $response;
|
||||
protected $paytm_txn_url;
|
||||
protected $paytm_txn_status_url;
|
||||
protected $paytm_refund_url;
|
||||
protected $paytm_refund_status_url;
|
||||
protected $paytm_balance_check_url;
|
||||
|
||||
protected $merchant_key;
|
||||
protected $merchant_id;
|
||||
protected $merchant_website;
|
||||
protected $industry_type;
|
||||
protected $channel;
|
||||
|
||||
|
||||
public function __construct(Request $request, $config){
|
||||
$this->request = $request;
|
||||
|
||||
if ($config['env'] == 'production') {
|
||||
$domain = 'securegw.paytm.in';
|
||||
}else{
|
||||
$domain = 'securegw-stage.paytm.in';
|
||||
}
|
||||
$this->paytm_txn_url = 'https://'.$domain.'/theia/processTransaction';
|
||||
$this->paytm_txn_status_url = 'https://'.$domain.'/merchant-status/getTxnStatus';
|
||||
$this->paytm_refund_url = 'https://'.$domain.'/refund/HANDLER_INTERNAL/REFUND';
|
||||
$this->paytm_refund_status_url = 'https://'.$domain.'/refund/HANDLER_INTERNAL/getRefundStatus';
|
||||
$this->paytm_balance_check_url = 'https://'.$domain.'/refund/HANDLER_INTERNAL/getRefundStatus';
|
||||
|
||||
$this->merchant_key = $config['merchant_key'];
|
||||
$this->merchant_id = $config['merchant_id'];
|
||||
$this->merchant_website = $config['merchant_website'];
|
||||
$this->industry_type = $config['industry_type'];
|
||||
$this->channel = $config['channel'];
|
||||
}
|
||||
|
||||
public function response(){
|
||||
$checksum = $this->request->get('CHECKSUMHASH');
|
||||
if(verifychecksum_e($this->request->post(), $this->merchant_key, $checksum) == "TRUE"){
|
||||
return $this->response = $this->request->post();
|
||||
}
|
||||
throw new \Exception('Invalid checksum');
|
||||
}
|
||||
|
||||
public function getResponseMessage() {
|
||||
return $this->response()['RESPMSG'];
|
||||
}
|
||||
|
||||
public function api_call($url, $params){
|
||||
return callAPI($url, $params);
|
||||
}
|
||||
|
||||
public function api_call_new($url, $params){
|
||||
return callAPI($url, $params);
|
||||
}
|
||||
}
|
||||
76
vendor/anandsiddharth/laravel-paytm-wallet/src/Providers/ReceivePaymentProvider.php
vendored
Normal file
76
vendor/anandsiddharth/laravel-paytm-wallet/src/Providers/ReceivePaymentProvider.php
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
namespace Anand\LaravelPaytmWallet\Providers;
|
||||
use Anand\LaravelPaytmWallet\Facades\PaytmWallet;
|
||||
use Anand\LaravelPaytmWallet\Traits\HasTransactionStatus;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ReceivePaymentProvider extends PaytmWalletProvider{
|
||||
use HasTransactionStatus;
|
||||
|
||||
private $parameters = null;
|
||||
private $view = 'paytmwallet::transact';
|
||||
|
||||
public function prepare($params = array()){
|
||||
$defaults = [
|
||||
'order' => NULL,
|
||||
'user' => NULL,
|
||||
'amount' => NULL,
|
||||
'callback_url' => NULL,
|
||||
'email' => NULL,
|
||||
'mobile_number' => NULL,
|
||||
];
|
||||
|
||||
$_p = array_merge($defaults, $params);
|
||||
foreach ($_p as $key => $value) {
|
||||
|
||||
if ($value == NULL) {
|
||||
|
||||
throw new \Exception(' \''.$key.'\' parameter not specified in array passed in prepare() method');
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$this->parameters = $_p;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function receive(){
|
||||
if ($this->parameters == null) {
|
||||
throw new \Exception("prepare() method not called");
|
||||
}
|
||||
return $this->beginTransaction();
|
||||
}
|
||||
|
||||
public function view($view) {
|
||||
if($view) {
|
||||
$this->view = $view;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
private function beginTransaction(){
|
||||
$params = [
|
||||
'REQUEST_TYPE' => 'DEFAULT',
|
||||
'MID' => $this->merchant_id,
|
||||
'ORDER_ID' => $this->parameters['order'],
|
||||
'CUST_ID' => $this->parameters['user'],
|
||||
'INDUSTRY_TYPE_ID' => $this->industry_type,
|
||||
'CHANNEL_ID' => $this->channel,
|
||||
'TXN_AMOUNT' => $this->parameters['amount'],
|
||||
'WEBSITE' => $this->merchant_website,
|
||||
'CALLBACK_URL' => $this->parameters['callback_url'],
|
||||
'MOBILE_NO' => $this->parameters['mobile_number'],
|
||||
'EMAIL' => $this->parameters['email'],
|
||||
];
|
||||
return view('paytmwallet::form')->with('view', $this->view)->with('params', $params)->with('txn_url', $this->paytm_txn_url)->with('checkSum', getChecksumFromArray($params, $this->merchant_key));
|
||||
}
|
||||
|
||||
public function getOrderId(){
|
||||
return $this->response()['ORDERID'];
|
||||
}
|
||||
public function getTransactionId(){
|
||||
return $this->response()['TXNID'];
|
||||
}
|
||||
|
||||
}
|
||||
70
vendor/anandsiddharth/laravel-paytm-wallet/src/Providers/RefundPaymentProvider.php
vendored
Normal file
70
vendor/anandsiddharth/laravel-paytm-wallet/src/Providers/RefundPaymentProvider.php
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
namespace Anand\LaravelPaytmWallet\Providers;
|
||||
use Anand\LaravelPaytmWallet\Facades\PaytmWallet;
|
||||
use Anand\LaravelPaytmWallet\Traits\HasTransactionStatus;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
|
||||
class RefundPaymentProvider extends PaytmWalletProvider{
|
||||
use HasTransactionStatus;
|
||||
|
||||
private $parameters = null;
|
||||
protected $response;
|
||||
|
||||
public function prepare($params = array()){
|
||||
$defaults = [
|
||||
'order' => NULL,
|
||||
'reference' => NULL,
|
||||
'amount' => NULL,
|
||||
'transaction' => NULL
|
||||
];
|
||||
|
||||
$_p = array_merge($defaults, $params);
|
||||
foreach ($_p as $key => $value) {
|
||||
|
||||
if ($value == NULL) {
|
||||
|
||||
throw new \Exception(' \''.$key.'\' parameter not specified in array passed in prepare() method');
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$this->parameters = $_p;
|
||||
return $this;
|
||||
}
|
||||
|
||||
private function beginTransaction(){
|
||||
$params = array();
|
||||
$params["MID"] = $this->merchant_id;
|
||||
$params["ORDERID"] = $this->parameters['order'];
|
||||
$params["REFID"] = $this->parameters['reference'];
|
||||
$params["TXNTYPE"] = 'REFUND';
|
||||
$params["REFUNDAMOUNT"] = $this->parameters['amount'];
|
||||
$params["TXNID"] = $this->parameters['transaction'];
|
||||
$chk = getChecksumFromArray($params, $this->merchant_key);
|
||||
$params['CHECKSUM'] = $chk;
|
||||
$this->response = $this->api_call_new($this->paytm_refund_url, $params);
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function initiate(){
|
||||
if ($this->parameters == null) {
|
||||
throw new \Exception("prepare() method not called");
|
||||
}
|
||||
$this->beginTransaction();
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function response(){
|
||||
return $this->response;
|
||||
}
|
||||
|
||||
public function isRefundAlreadyRaised() {
|
||||
if ($this->isFailed() && $this->response()['RESPCODE'] == PaytmWallet::REPSONSE_REFUND_ALREADY_RAISED) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
66
vendor/anandsiddharth/laravel-paytm-wallet/src/Providers/RefundStatusCheckProvider.php
vendored
Normal file
66
vendor/anandsiddharth/laravel-paytm-wallet/src/Providers/RefundStatusCheckProvider.php
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
namespace Anand\LaravelPaytmWallet\Providers;
|
||||
use Anand\LaravelPaytmWallet\Traits\HasTransactionStatus;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
|
||||
class RefundStatusCheckProvider extends PaytmWalletProvider{
|
||||
use HasTransactionStatus;
|
||||
|
||||
private $parameters = null;
|
||||
protected $response;
|
||||
|
||||
public function prepare($params = array()){
|
||||
$defaults = [
|
||||
'order' => NULL,
|
||||
'reference' => NULL,
|
||||
];
|
||||
|
||||
$_p = array_merge($defaults, $params);
|
||||
foreach ($_p as $key => $value) {
|
||||
|
||||
if ($value == NULL) {
|
||||
|
||||
throw new \Exception(' \''.$key.'\' parameter not specified in array passed in prepare() method');
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$this->parameters = $_p;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
public function check(){
|
||||
if ($this->parameters == null) {
|
||||
throw new \Exception("prepare() method not called");
|
||||
}
|
||||
return $this->beginTransaction();
|
||||
}
|
||||
|
||||
|
||||
private function beginTransaction(){
|
||||
$params = array(
|
||||
'MID' => $this->merchant_id,
|
||||
'ORDERID' => $this->parameters['order'],
|
||||
'REFID' => $this->parameters['reference']
|
||||
);
|
||||
$chk = getChecksumFromArray($params, $this->merchant_key);
|
||||
$params['CHECKSUM'] = $chk;
|
||||
$this->response = $this->api_call_new($this->paytm_txn_status_url, $params);
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function response(){
|
||||
return $this->response;
|
||||
}
|
||||
|
||||
public function getOrderId(){
|
||||
return $this->response()['ORDERID'];
|
||||
}
|
||||
public function getTransactionId(){
|
||||
return $this->response()['TXNID'];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
63
vendor/anandsiddharth/laravel-paytm-wallet/src/Providers/StatusCheckProvider.php
vendored
Normal file
63
vendor/anandsiddharth/laravel-paytm-wallet/src/Providers/StatusCheckProvider.php
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
namespace Anand\LaravelPaytmWallet\Providers;
|
||||
use Anand\LaravelPaytmWallet\Traits\HasTransactionStatus;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class StatusCheckProvider extends PaytmWalletProvider{
|
||||
use HasTransactionStatus;
|
||||
|
||||
private $parameters = null;
|
||||
protected $response;
|
||||
|
||||
public function prepare($params = array()){
|
||||
$defaults = [
|
||||
'order' => NULL,
|
||||
];
|
||||
|
||||
$_p = array_merge($defaults, $params);
|
||||
foreach ($_p as $key => $value) {
|
||||
|
||||
if ($value == NULL) {
|
||||
|
||||
throw new \Exception(' \''.$key.'\' parameter not specified in array passed in prepare() method');
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$this->parameters = $_p;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
public function check(){
|
||||
if ($this->parameters == null) {
|
||||
throw new \Exception("prepare() method not called");
|
||||
}
|
||||
return $this->beginTransaction();
|
||||
}
|
||||
|
||||
|
||||
private function beginTransaction(){
|
||||
$params = array(
|
||||
'MID' => $this->merchant_id,
|
||||
'ORDERID' => $this->parameters['order']
|
||||
);
|
||||
$chk = getChecksumFromArray($params, $this->merchant_key);
|
||||
$params['CHECKSUMHASH'] = $chk;
|
||||
$this->response = $this->api_call_new($this->paytm_txn_status_url, $params);
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function response(){
|
||||
return $this->response;
|
||||
}
|
||||
|
||||
public function getOrderId(){
|
||||
return $this->response()['ORDERID'];
|
||||
}
|
||||
public function getTransactionId(){
|
||||
return $this->response()['TXNID'];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
35
vendor/anandsiddharth/laravel-paytm-wallet/src/Traits/HasTransactionStatus.php
vendored
Normal file
35
vendor/anandsiddharth/laravel-paytm-wallet/src/Traits/HasTransactionStatus.php
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Anand\LaravelPaytmWallet\Traits;
|
||||
use Anand\LaravelPaytmWallet\Facades\PaytmWallet;
|
||||
|
||||
trait HasTransactionStatus {
|
||||
|
||||
public function isOpen(){
|
||||
if ($this->response['STATUS'] == PaytmWallet::STATUS_OPEN){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function isFailed(){
|
||||
if ($this->response['STATUS'] == PaytmWallet::STATUS_FAILURE) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function isSuccessful(){
|
||||
if($this->response['STATUS'] == PaytmWallet::STATUS_SUCCESSFUL){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function isPending(){
|
||||
if($this->response['STATUS'] == PaytmWallet::STATUS_PENDING){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
18
vendor/anandsiddharth/laravel-paytm-wallet/src/resources/views/app_redirect.blade.php
vendored
Normal file
18
vendor/anandsiddharth/laravel-paytm-wallet/src/resources/views/app_redirect.blade.php
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-I">
|
||||
<title>Paytm</title>
|
||||
<script type="text/javascript">
|
||||
function response(){
|
||||
return document.getElementById('response').value;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
Redirect back to the app<br>
|
||||
|
||||
<form name="frm" method="post">
|
||||
<input type="hidden" id="response" name="responseField" value='{{$json}}'>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
16
vendor/anandsiddharth/laravel-paytm-wallet/src/resources/views/form.blade.php
vendored
Normal file
16
vendor/anandsiddharth/laravel-paytm-wallet/src/resources/views/form.blade.php
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
@extends($view)
|
||||
@section('payment_redirect')
|
||||
<form method="post" action="{{$txn_url}}" name="f1" style="visibility: hidden;">
|
||||
<table border="1">
|
||||
<tbody>
|
||||
@foreach ($params as $key => $value)
|
||||
<input type="hidden" name="{{$key}}" value="{{$value}}" />
|
||||
@endforeach
|
||||
<input type="hidden" name="CHECKSUMHASH" value="{{$checkSum}}">
|
||||
</tbody>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
document.f1.submit();
|
||||
</script>
|
||||
</form>
|
||||
@stop
|
||||
12
vendor/anandsiddharth/laravel-paytm-wallet/src/resources/views/transact.blade.php
vendored
Normal file
12
vendor/anandsiddharth/laravel-paytm-wallet/src/resources/views/transact.blade.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Merchant Check Out Page</title>
|
||||
</head>
|
||||
<body>
|
||||
<br>
|
||||
<br>
|
||||
<center><h1>Your transaction is being processed!!!</h1></center>
|
||||
<center><h2>Please do not refresh this page...</h2></center>
|
||||
@yield('payment_redirect')
|
||||
</body>
|
||||
</html>
|
||||
13
vendor/authorizenet/authorizenet/.gitignore
vendored
Normal file
13
vendor/authorizenet/authorizenet/.gitignore
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
*.DS_Store
|
||||
composer.lock
|
||||
vendor
|
||||
phpunit.xml
|
||||
tests/log
|
||||
build
|
||||
phplog
|
||||
|
||||
# Ignore eclipse project files
|
||||
.buildpath
|
||||
.project
|
||||
.settings
|
||||
backup
|
||||
3
vendor/authorizenet/authorizenet/.gitmodules
vendored
Normal file
3
vendor/authorizenet/authorizenet/.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule "sample-code-php"]
|
||||
path = sample-code-php
|
||||
url = https://github.com/AuthorizeNet/sample-code-php.git
|
||||
17
vendor/authorizenet/authorizenet/.scrutinizer.yml
vendored
Normal file
17
vendor/authorizenet/authorizenet/.scrutinizer.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
checks:
|
||||
php:
|
||||
code_rating: true
|
||||
duplication: true
|
||||
|
||||
tools:
|
||||
php_mess_detector: true
|
||||
php_code_sniffer: true
|
||||
sensiolabs_security_checker: true
|
||||
php_cpd: true
|
||||
php_loc: true
|
||||
php_pdepend: true
|
||||
external_code_coverage:
|
||||
timeout: 1500 #15 min
|
||||
filter:
|
||||
paths:
|
||||
- lib/*
|
||||
66
vendor/authorizenet/authorizenet/.travis.yml
vendored
Normal file
66
vendor/authorizenet/authorizenet/.travis.yml
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
language: php
|
||||
|
||||
sudo: false
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- php: 5.6
|
||||
env:
|
||||
- PHPUNIT_VERSION=5.6.*
|
||||
- TEST_SUITE=samples
|
||||
dist: trusty
|
||||
- php: 7.0
|
||||
env:
|
||||
- PHPUNIT_VERSION=5.6.*
|
||||
- TEST_SUITE=samples
|
||||
dist: trusty
|
||||
- php: 7.1
|
||||
env:
|
||||
- PHPUNIT_VERSION=5.7.*
|
||||
- TEST_SUITE=samples
|
||||
dist: trusty
|
||||
- php: 7.2
|
||||
env:
|
||||
- PHPUNIT_VERSION=8.5.*
|
||||
- TEST_SUITE=samples
|
||||
dist: bionic
|
||||
- php: 7.3
|
||||
env:
|
||||
- PHPUNIT_VERSION=9.5.*
|
||||
- TEST_SUITE=samples
|
||||
dist: bionic
|
||||
- php: 7.4
|
||||
env:
|
||||
- PHPUNIT_VERSION=9.5.*
|
||||
- TEST_SUITE=samples
|
||||
dist: bionic
|
||||
- php: 8.0
|
||||
env:
|
||||
- PHPUNIT_VERSION=9.5.*
|
||||
- TEST_SUITE=samples
|
||||
dist: bionic
|
||||
|
||||
before_install:
|
||||
# execute all of the commands which need to be executed
|
||||
# before installing dependencies
|
||||
- composer validate # make sure that our composer.json file is valid for packaging
|
||||
|
||||
install:
|
||||
# install all of the dependencies we need here
|
||||
- pecl install xmldiff
|
||||
- composer require "phpunit/phpunit:${PHPUNIT_VERSION}" --no-update
|
||||
- composer update --prefer-dist
|
||||
|
||||
before_script:
|
||||
# execute all of the commands which need to be executed
|
||||
# before running actual tests
|
||||
- git submodule update --remote --recursive
|
||||
|
||||
script:
|
||||
# execute all of the tests or other commands to determine
|
||||
# whether the build will pass or fail
|
||||
- if [[ "$TEST_SUITE" == "samples" ]]; then phpenv config-rm xdebug.ini; cp -R lib sample-code-php/; cp -R vendor sample-code-php/; cd sample-code-php; vendor/phpunit/phpunit/phpunit TestRunner.php .; fi
|
||||
|
||||
after_script:
|
||||
# - if [[ "$TEST_SUITE" == "coverage" ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
|
||||
# - if [[ "$TEST_SUITE" == "coverage" ]]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
|
||||
4909
vendor/authorizenet/authorizenet/AnetApiSchema.xsd
vendored
Normal file
4909
vendor/authorizenet/authorizenet/AnetApiSchema.xsd
vendored
Normal file
File diff suppressed because it is too large
Load Diff
9
vendor/authorizenet/authorizenet/CONTRIBUTING.md
vendored
Normal file
9
vendor/authorizenet/authorizenet/CONTRIBUTING.md
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
Thanks for contributing to the Authorize.Net PHP SDK.
|
||||
|
||||
Before you submit a pull request, we ask that you consider the following:
|
||||
|
||||
- Submit an issue to state the problem your pull request solves or the funtionality that it adds. We can then advise on the feasability of the pull request, and let you know if there are other possible solutions.
|
||||
- Part of the SDK is auto-generated based on the XML schema. Due to this auto-generation, we cannot merge contributions for request or response classes. You are welcome to open an issue to report problems or suggest improvements. Auto-generated classes include all files inside [contract/v1](https://github.com/AuthorizeNet/sdk-php/tree/master/lib/net/authorize/api/contract/v1) and [controller](https://github.com/AuthorizeNet/sdk-php/tree/master/lib/net/authorize/api/controller) folders, except [controller/base](https://github.com/AuthorizeNet/sdk-php/tree/master/lib/net/authorize/api/controller/base).
|
||||
- Files marked as deprecated are no longer supported. Issues and pull requests for changes to these deprecated files will be closed.
|
||||
- Recent changes will be in future branch. Check the code in *future* branch first to see if a fix has already been merged, before suggesting changes to a file.
|
||||
- **Always create pull request to the future branch.** The pull request will be merged to future, and later pushed to master as part of the next release.
|
||||
41
vendor/authorizenet/authorizenet/LICENSE.txt
vendored
Normal file
41
vendor/authorizenet/authorizenet/LICENSE.txt
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
SDK LICENSE AGREEMENT
|
||||
This Software Development Kit (“SDK”) License Agreement (“Agreement”) is between you (both the individual downloading the SDK and any legal entity on behalf of which such individual is acting) (“You” or “Your”) and Authorize.Net LLC (“Authorize.Net’).
|
||||
IT IS IMPORTANT THAT YOU READ CAREFULLY AND UNDERSTAND THIS AGREEMENT. BY CLICKING THE “I ACCEPT” BUTTON OR AN EQUIVALENT INDICATOR OR BY DOWNLOADING, INSTALLING OR USING THE SDK OR THE DOCUMENTATION, YOU AGREE TO BE BOUND BY THIS AGREEMENT.
|
||||
|
||||
1. DEFINITIONS
|
||||
1.1 “Application(s)” means software programs that You develop to operate with the Gateway using components of the Software.
|
||||
1.2 “Documentation” means the materials made available to You in connection with the Software by or on behalf of Authorize.Net pursuant to this Agreement.
|
||||
1.3 “Gateway” means any electronic payment platform maintained and operated by Authorize.Net and any of its affiliates.
|
||||
1.4 “Software” means all of the software included in the software development kit made available to You by or on behalf of Authorize.Net pursuant to this Agreement, including but not limited to sample source code, code snippets, software tools, code libraries, sample applications, Documentation and any upgrades, modified versions, updates, and/or additions thereto, if any, made available to You by or on behalf of Authorize.Net pursuant to this Agreement.
|
||||
2. GRANT OF LICENSE; RESTRICTIONS
|
||||
2.1 Limited License. Subject to and conditioned upon Your compliance with the terms of this Agreement, Authorize.Net hereby grants to You a limited, revocable, non-exclusive, non-transferable, royalty-free license during the term of this Agreement to: (a) in any country worldwide, use, reproduce, modify, and create derivative works of the components of the Software solely for the purpose of developing, testing and manufacturing Applications; (b) distribute, sell or otherwise provide Your Applications that include components of the Software to Your end users; and (c) use the Documentation in connection with the foregoing activities. The license to distribute Applications that include components of the Software as set forth in subsection (b) above includes the right to grant sublicenses to Your end users to use such components of the Software as incorporated into such Applications, subject to the limitations and restrictions set forth in this Agreement.
|
||||
2.2 Restrictions. You shall not (and shall have no right to): (a) make or distribute copies of the Software or the Documentation, in whole or in part, except as expressly permitted pursuant to Section 2.1; (b) alter or remove any copyright, trademark, trade name or other proprietary notices, legends, symbols or labels appearing on or in the Software or Documentation; (c) sublicense (or purport to sublicense) the Software or the Documentation, in whole or in part, to any third party except as expressly permitted pursuant to Section 2.1; (d) engage in any activity with the Software, including the development or distribution of an Application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the Gateway or platform, servers, or systems of Authorize.Net, any of its affiliates, or any third party; (e) make any statements that Your Application is “certified” or otherwise endorsed, or that its performance is guaranteed, by Authorize.Net or any of its affiliates; or (f) otherwise use or exploit the Software or the Documentation for any purpose other than to develop and distribute Applications as expressly permitted by this Agreement.
|
||||
2.3 Ownership. You shall retain ownership of Your Applications developed in accordance with this Agreement, subject to Authorize.Net’s ownership of the Software and Documentation (including Authorize.Net’s ownership of any portion of the Software or Documentation incorporated in Your Applications). You acknowledge and agree that all right, title and interest in and to the Software and Documentation shall, at all times, be and remain the exclusive property of Authorize.Net and that You do not have or acquire any rights, express or implied, in the Software or Documentation except those rights expressly granted under this Agreement.
|
||||
2.4 No Support. Authorize.Net has no obligation to provide support, maintenance, upgrades, modifications or new releases of the Software.
|
||||
2.5 Open Source Software. You hereby acknowledge that the Software may contain software that is distributed under “open source” license terms (“Open Source Software”). You shall review the Documentation in order to determine which portions of the Software are Open Source Software and are licensed under such Open Source Software license terms. To the extent any such license requires that Authorize.Net provide You any rights with respect to such Open Source Software that are inconsistent with the limited rights granted to You in this Agreement, then such rights in the applicable Open Source Software license shall take precedence over the rights and restrictions granted in this Agreement, but solely with respect to such Open Source Software. You acknowledge that the Open Source Software license is solely between You and the applicable licensor of the Open Source Software and that Your use, reproduction and distribution of Open Source Software shall be in compliance with applicable Open Source Software license. You understand and agree that Authorize.Net is not liable for any loss or damage that You may experience as a result of Your use of Open Source Software and that You will look solely to the licensor of the Open Source Software in the event of any such loss or damage.
|
||||
2.6 License to Authorize.Net. In the event You choose to submit any suggestions, feedback or other information or materials related to the Software or Documentation or Your use thereof (collectively, “Feedback”) to Authorize.Net, You hereby grant to Authorize.Net a worldwide, non-exclusive, royalty-free, transferable, sublicensable, perpetual and irrevocable license to use and otherwise exploit such Feedback in connection with the Software, Documentation, and other products and services.
|
||||
2.7 Use.
|
||||
(a) You represent, warrant and agree to use the Software and write Applications only for purposes permitted by (i) this Agreement; (ii) applicable law and regulation, including, without limitation, the Payment Card Industry Data Security Standard (PCI DSS); and (iii) generally accepted practices or guidelines in the relevant jurisdictions. You represent, warrant and agree that if You use the Software to develop Applications for general public end users, that You will protect the privacy and legal rights of those users. If the Application receives or stores personal or sensitive information provided by end users, it must do so securely and in compliance with all applicable laws and regulations, including card association regulations. If the Application receives Authorize.Net account information, the Application may only use that information to access the end user's Authorize.Net account. You represent, warrant and agree that You are solely responsible for (and that neither Authorize.Net nor its affiliates have any responsibility to You or to any third party for): (i) any data, content, or resources that You obtain, transmit or display through the Application; and (ii) any breach of Your obligations under this Agreement, any applicable third party license, or any applicable law or regulation, and for the consequences of any such breach.
|
||||
3. WARRANTY DISCLAIMER; LIMITATION OF LIABILITY
|
||||
3.1 Disclaimer. THE SOFTWARE AND THE DOCUMENTATION ARE PROVIDED ON AN “AS IS” AND “AS AVAILABLE” BASIS WITH NO WARRANTY. YOU AGREE THAT YOUR USE OF THE SOFTWARE AND THE DOCUMENTATION IS AT YOUR SOLE RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, AUTHORIZE.NET AND ITS AFFILIATES EXPRESSLY DISCLAIM ALL WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, WITH RESPECT TO THE SOFTWARE AND THE DOCUMENTATION, INCLUDING ALL WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, SATISFACTORY QUALITY, ACCURACY, TITLE AND NON-INFRINGEMENT, AND ANY WARRANTIES THAT MAY ARISE OUT OF COURSE OF PERFORMANCE, COURSE OF DEALING OR USAGE OF TRADE. NEITHER AUTHORIZE.NET NOR ITS AFFILIATES WARRANT THAT THE FUNCTIONS OR INFORMATION CONTAINED IN THE SOFTWARE OR THE DOCUMENTATION WILL MEET ANY REQUIREMENTS OR NEEDS YOU MAY HAVE, OR THAT THE SOFTWARE OR DOCUMENTATION WILL OPERATE ERROR FREE, OR THAT THE SOFTWARE OR DOCUMENTATION IS COMPATIBLE WITH ANY PARTICULAR OPERATING SYSTEM.
|
||||
3.2 Limitation of Liability. IN NO EVENT SHALL AUTHORIZE.NET AND ITS AFFILIATES BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR PUNITIVE DAMAGES, OR DAMAGES FOR LOSS OF PROFITS, REVENUE, BUSINESS, SAVINGS, DATA, USE OR COST OF SUBSTITUTE PROCUREMENT, INCURRED BY YOU OR ANY THIRD PARTY, WHETHER IN AN ACTION IN CONTRACT OR TORT, EVEN IF AUTHORIZE.NET HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR IF SUCH DAMAGES ARE FORESEEABLE. IN NO EVENT SHALL THE ENTIRE LIABILITY OF AUTHORIZE.NET AND AFFILIATES ARISING FROM OR RELATING TO THIS AGREEMENT OR THE SUBJECT MATTER HEREOF EXCEED ONE HUNDRED U.S. DOLLARS ($100). THE PARTIES ACKNOWLEDGE THAT THE LIMITATIONS OF LIABILITY IN THIS SECTION 3.2 AND IN THE OTHER PROVISIONS OF THIS AGREEMENT AND THE ALLOCATION OF RISK HEREIN ARE AN ESSENTIAL ELEMENT OF THE BARGAIN BETWEEN THE PARTIES, WITHOUT WHICH AUTHORIZE.NET WOULD NOT HAVE ENTERED INTO THIS AGREEMENT.
|
||||
4. INDEMNIFICATION. You shall indemnify, hold harmless and, at Authorize.Net’s request, defend Authorize.Net and its affiliates and their officers, directors, employees, and agents from and against any claim, suit or proceeding, and any associated liabilities, costs, damages and expenses, including reasonable attorneys’ fees, that arise out of relate to: (i) Your Applications or the use or distribution thereof and Your use or distribution of the Software or the Documentation (or any portion thereof including Open Source Software), including, but not limited to, any allegation that any such Application or any such use or distribution infringes, misappropriates or otherwise violates any intellectual property (including, without limitation, copyright, patent, and trademark), privacy, publicity or other rights of any third party, or has caused the death or injury of any person or damage to any property; (ii) Your alleged or actual breach of this Agreement; (iii) the alleged or actual breach of this Agreement by any party to whom you have provided Your Applications, the Software or the Documentation or (iii) Your alleged or actual violation of or non-compliance with any applicable laws, legislation, policies, rules, regulations or governmental requirements (including, without limitation, any laws, legislation, policies, rules, regulations or governmental requirements related to privacy and data collection).
|
||||
5. TERMINATION. This Agreement and the licenses granted to you herein are effective until terminated. Authorize.Net may terminate this Agreement and the licenses granted to You at any time. Upon termination of this Agreement, You shall cease all use of the Software and the Documentation, return to Authorize.Net or destroy all copies of the Software and Documentation and related materials in Your possession, and so certify to Authorize.Net. Except for the license to You granted herein, the terms of this Agreement shall survive termination.
|
||||
6. CONFIDENTIAL INFORMATION
|
||||
a. You hereby agree (i) to hold Authorize.Net’s Confidential Information in strict confidence and to take reasonable precautions to protect such Confidential Information (including, without limitation, all precautions You employ with respect to Your own confidential materials), (ii) not to divulge any such Confidential Information to any third person; (iii) not to make any use whatsoever at any time of such Confidential Information except as strictly licensed hereunder, (iv) not to remove or export from the United States or re-export any such Confidential Information or any direct product thereof, except in compliance with, and with all licenses and approvals required under applicable U.S. and foreign export laws and regulations, including, without limitation, those of the U.S. Department of Commerce.
|
||||
b. “Confidential Information” shall mean any data or information, oral or written, treated as confidential that relates to Authorize.Net’s past, present, or future research, development or business activities, including without limitation any unannounced products and services, any information relating to services, developments, inventions, processes, plans, financial information, customer data, revenue, transaction volume, forecasts, projections, application programming interfaces, Software and Documentation.
|
||||
7. General Terms
|
||||
7.1 Law. This Agreement and all matters arising out of or relating to this Agreement shall be governed by the internal laws of the State of California without giving effect to any choice of law rule. This Agreement shall not be governed by the United Nations Convention on Contracts for the International Sales of Goods, the application of which is expressly excluded. In the event of any controversy, claim or dispute between the parties arising out of or relating to this Agreement, such controversy, claim or dispute shall be resolved in the state or federal courts in Santa Clara County, California, and the parties hereby irrevocably consent to the jurisdiction and venue of such courts.
|
||||
7.2 Logo License. Authorize.Net hereby grants to You the right to use, reproduce, publish, perform and display Authorize.Net logo solely in accordance with the current Authorize.Net brand guidelines.
|
||||
7.3 Severability and Waiver. If any provision of this Agreement is held to be illegal, invalid or otherwise unenforceable, such provision shall be enforced to the extent possible consistent with the stated intention of the parties, or, if incapable of such enforcement, shall be deemed to be severed and deleted from this Agreement, while the remainder of this Agreement shall continue in full force and effect. The waiver by either party of any default or breach of this Agreement shall not constitute a waiver of any other or subsequent default or breach.
|
||||
7.4 No Assignment. You may not assign, sell, transfer, delegate or otherwise dispose of, whether voluntarily or involuntarily, by operation of law or otherwise, this Agreement or any rights or obligations under this Agreement without the prior written consent of Authorize.Net, which may be withheld in Authorize.Net’s sole discretion. Any purported assignment, transfer or delegation by You shall be null and void. Subject to the foregoing, this Agreement shall be binding upon and shall inure to the benefit of the parties and their respective successors and assigns.
|
||||
7.5 Government Rights. If You (or any person or entity to whom you provide the Software or Documentation) are an agency or instrumentality of the United States Government, the Software and Documentation are “commercial computer software” and “commercial computer software documentation,” and pursuant to FAR 12.212 or DFARS 227.7202, and their successors, as applicable, use, reproduction and disclosure of the Software and Documentation are governed by the terms of this Agreement.
|
||||
7.6 Export Administration. You shall comply fully with all relevant export laws and regulations of the United States, including, without limitation, the U.S. Export Administration Regulations (collectively “Export Controls”). Without limiting the generality of the foregoing, You shall not, and You shall require Your representatives not to, export, direct or transfer the Software or the Documentation, or any direct product thereof, to any destination, person or entity restricted or prohibited by the Export Controls.
|
||||
7.7 Privacy. In order to continually innovate and improve the Software, Licensee understands and agrees that Authorize.Net may collect certain usage statistics including but not limited to a unique identifier, associated IP address, version number of software, and information on which tools and/or services in the Software are being used and how they are being used.
|
||||
7.8 Entire Agreement; Amendments. This Agreement constitutes the entire agreement between the parties and supersedes all prior or contemporaneous agreements or representations, written or oral, concerning the subject matter of this Agreement. Authorize.Net may make changes to this Agreement, Software or Documentation in its sole discretion. When these changes are made, Authorize.Net will make a new version of the Agreement, Software or Documentation available on the website where the Software is available. This Agreement may not be modified or amended by You except in a writing signed by a duly authorized representative of each party. You acknowledge and agree that
|
||||
Authorize.Net has not made any representations, warranties or agreements of any kind, except as expressly set forth herein.
|
||||
|
||||
|
||||
Authorize.Net Software Development Kit (SDK) License Agreement
|
||||
v. February 1, 2017
|
||||
1
|
||||
85
vendor/authorizenet/authorizenet/MIGRATING.md
vendored
Normal file
85
vendor/authorizenet/authorizenet/MIGRATING.md
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
# Migrating from Legacy Authorize.Net Classes
|
||||
|
||||
Authorize.Net no longer supports several legacy classes, including AuthorizeNetAIM.php, AuthorizenetSIM.php, and others listed below, as part of PHP-SDK. If you are using any of these, we recommend that you update your code to use the new Authorize.Net API classes.
|
||||
|
||||
**For details on the deprecation and replacement of legacy Authorize.Net APIs, visit https://developer.authorize.net/api/upgrade_guide/.**
|
||||
|
||||
## Full list of classes that are no longer supported
|
||||
| Class | New Feature | Sample Codes directory/repository |
|
||||
|----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
|
||||
| AuthorizeNetAIM.php | [PaymentTransactions](https://developer.authorize.net/api/reference/index.html#payment-transactions) | [sample-code-php/PaymentTransactions](https://github.com/AuthorizeNet/sample-code-php/tree/master/PaymentTransactions) |
|
||||
| AuthorizeNetARB.php | [RecurringBilling](https://developer.authorize.net/api/reference/index.html#recurring-billing) | [sample-code-php/RecurringBilling](https://github.com/AuthorizeNet/sample-code-php/tree/master/RecurringBilling) |
|
||||
| AuthorizeNetCIM.php | [CustomerProfiles](https://developer.authorize.net/api/reference/index.html#customer-profiles) | [sample-code-php/CustomerProfiles](https://github.com/AuthorizeNet/sample-code-php/tree/master/CustomerProfiles) |
|
||||
| Hosted CIM | [Accept Customer](https://developer.authorize.net/content/developer/en_us/api/reference/features/customer_profiles.html#Using_the_Accept_Customer_Hosted_Form) | Not available |
|
||||
| AuthorizeNetCP.php | [PaymentTransactions](https://developer.authorize.net/api/reference/index.html#payment-transactions) | [sample-code-php/PaymentTransactions](https://github.com/AuthorizeNet/sample-code-php/tree/master/PaymentTransactions) |
|
||||
| AuthorizeNetDPM.php | [Accept.JS](https://developer.authorize.net/api/reference/features/acceptjs.html) | [Sample Accept Application](https://github.com/AuthorizeNet/accept-sample-app) |
|
||||
| AuthorizeNetSIM.php | [Accept Hosted](https://developer.authorize.net/content/developer/en_us/api/reference/features/accept_hosted.html) | Not available |
|
||||
| AuthorizeNetSOAP.php | [PaymentTransactions](https://developer.authorize.net/api/reference/index.html#payment-transactions) | [sample-code-php/PaymentTransactions](https://github.com/AuthorizeNet/sample-code-php/tree/master/PaymentTransactions) |
|
||||
| AuthorizeNetTD.php | [TransactionReporting](https://developer.authorize.net/api/reference/index.html#transaction-reporting) | [sample-code-php/TransactionReporting/](https://github.com/AuthorizeNet/sample-code-php/tree/master/TransactionReporting) |
|
||||
|
||||
## Example
|
||||
#### Old AuthorizeNetAIM example:
|
||||
```php
|
||||
define("AUTHORIZENET_API_LOGIN_ID", "YOURLOGIN");
|
||||
define("AUTHORIZENET_TRANSACTION_KEY", "YOURKEY");
|
||||
define("AUTHORIZENET_SANDBOX", true);
|
||||
$sale = new AuthorizeNetAIM;
|
||||
$sale->amount = "5.99";
|
||||
$sale->card_num = '6011000000000012';
|
||||
$sale->exp_date = '04/15';
|
||||
$response = $sale->authorizeAndCapture();
|
||||
if ($response->approved) {
|
||||
$transaction_id = $response->transaction_id;
|
||||
}
|
||||
```
|
||||
#### Corresponding new model code (charge-credit-card):
|
||||
```php
|
||||
require 'vendor/autoload.php';
|
||||
use net\authorize\api\contract\v1 as AnetAPI;
|
||||
use net\authorize\api\controller as AnetController;
|
||||
|
||||
define("AUTHORIZENET_LOG_FILE", "phplog");
|
||||
$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();
|
||||
$merchantAuthentication->setName("YOURLOGIN");
|
||||
$merchantAuthentication->setTransactionKey("YOURKEY");
|
||||
// Create the payment data for a credit card
|
||||
$creditCard = new AnetAPI\CreditCardType();
|
||||
$creditCard->setCardNumber("6011000000000012");
|
||||
$creditCard->setExpirationDate("2015-04");
|
||||
$creditCard->setCardCode("123");
|
||||
|
||||
// Add the payment data to a paymentType object
|
||||
$paymentOne = new AnetAPI\PaymentType();
|
||||
$paymentOne->setCreditCard($creditCard);
|
||||
|
||||
$transactionRequestType = new AnetAPI\TransactionRequestType();
|
||||
$transactionRequestType->setTransactionType("authCaptureTransaction");
|
||||
$transactionRequestType->setAmount("5.99");
|
||||
$transactionRequestType->setPayment($paymentOne);
|
||||
|
||||
// Assemble the complete transaction request
|
||||
$request = new AnetAPI\CreateTransactionRequest();
|
||||
$request->setMerchantAuthentication($merchantAuthentication);
|
||||
$request->setTransactionRequest($transactionRequestType);
|
||||
|
||||
// Create the controller and get the response
|
||||
$controller = new AnetController\CreateTransactionController($request);
|
||||
$response = $controller->executeWithApiResponse(\net\authorize\api\constants\ANetEnvironment::SANDBOX);
|
||||
|
||||
if ($response != null) {
|
||||
// Check to see if the API request was successfully received and acted upon
|
||||
if ($response->getMessages()->getResultCode() == "Ok") {
|
||||
// Since the API request was successful, look for a transaction response
|
||||
// and parse it to display the results of authorizing the card
|
||||
$tresponse = $response->getTransactionResponse();
|
||||
|
||||
if ($tresponse != null && $tresponse->getMessages() != null) {
|
||||
echo " Successfully created transaction with Transaction ID: " . $tresponse->getTransId() . "\n";
|
||||
echo " Transaction Response Code: " . $tresponse->getResponseCode() . "\n";
|
||||
echo " Message Code: " . $tresponse->getMessages()[0]->getCode() . "\n";
|
||||
echo " Auth Code: " . $tresponse->getAuthCode() . "\n";
|
||||
echo " Description: " . $tresponse->getMessages()[0]->getDescription() . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
178
vendor/authorizenet/authorizenet/README.md
vendored
Normal file
178
vendor/authorizenet/authorizenet/README.md
vendored
Normal file
@@ -0,0 +1,178 @@
|
||||
# Authorize.Net PHP SDK
|
||||
|
||||
[](https://travis-ci.org/AuthorizeNet/sdk-php)
|
||||
[](https://scrutinizer-ci.com/g/AuthorizeNet/sdk-php/?branch=master)
|
||||
[](https://packagist.org/packages/authorizenet/authorizenet)
|
||||
|
||||
## Requirements
|
||||
* PHP 5.6+
|
||||
* cURL PHP Extension
|
||||
* JSON PHP Extension
|
||||
* An Authorize.Net account (see _Registration & Configuration_ section below)
|
||||
* TLS 1.2 capable versions of libcurl and OpenSSL (or its equivalent)
|
||||
|
||||
### Migrating from older versions
|
||||
Since August 2018, the Authorize.Net API has been reorganized to be more merchant focused. Authorize.Net AIM, ARB, CIM, Transaction Reporting, and SIM classes have been deprecated in favor of net\authorize\api. To see the full list of mapping of new features corresponding to the deprecated features, see [MIGRATING.md](MIGRATING.md).
|
||||
|
||||
### Contribution
|
||||
- If you need information or clarification about Authorize.Net features, create an issue with your question. You can also search the [Authorize.Net developer community](https://community.developer.authorize.net/)for discussions related to your question.
|
||||
- Before creating pull requests, read [the contributors guide](CONTRIBUTING.md)
|
||||
|
||||
### TLS 1.2
|
||||
The Authorize.Net APIs only support connections using the TLS 1.2 security protocol. Make sure to upgrade all required components to support TLS 1.2. Keep these components up to date to mitigate the risk of new security flaws.
|
||||
|
||||
To test whether your current installation is capable of communicating to our servers using TLS 1.2, run the following PHP code and examine the output for the TLS version:
|
||||
```php
|
||||
<?php
|
||||
$ch = curl_init('https://apitest.authorize.net/xml/v1/request.api');
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_VERBOSE, true);
|
||||
$data = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
```
|
||||
|
||||
If curl is unable to connect to our URL (as given in the previous sample), it's likely that your system is not able to connect using TLS 1.2, or does not have a supported cipher installed. To verify what TLS version your connection _does_ support, run the following PHP code:
|
||||
```php
|
||||
<?php
|
||||
$ch = curl_init('https://www.howsmyssl.com/a/check');
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
$data = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
|
||||
$json = json_decode($data);
|
||||
echo "Connection uses " . $json->tls_version ."\n";
|
||||
```
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
### Composer
|
||||
We recommend using [`Composer`](http://getcomposer.org). *(Note: we never recommend you
|
||||
override the new secure-http default setting)*.
|
||||
*Update your composer.json file as per the example below and then run for this specific release
|
||||
`composer update`.*
|
||||
|
||||
```json
|
||||
{
|
||||
"require": {
|
||||
"php": ">=5.6",
|
||||
"authorizenet/authorizenet": "2.0.2"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
After installation through Composer,
|
||||
don't forget to require its autoloader in your script or bootstrap file:
|
||||
```php
|
||||
require 'vendor/autoload.php';
|
||||
```
|
||||
|
||||
### Custom SPL Autoloader
|
||||
Alternatively, we provide a custom `SPL` autoloader for you to reference from within your PHP file:
|
||||
```php
|
||||
require 'path/to/anet_php_sdk/autoload.php';
|
||||
```
|
||||
This autoloader still requires the `vendor` directory and all of its dependencies to exist.
|
||||
However, this is a possible solution for cases where composer can't be run on a given system.
|
||||
You can run composer locally or on another system to build the directory, then copy the
|
||||
`vendor` directory to the desired system.
|
||||
|
||||
|
||||
## Registration & Configuration
|
||||
Use of this SDK and the Authorize.Net APIs requires having an account on the Authorize.Net system. You can find these details in the Settings section. If you don't currently have a production Authorize.Net account, [sign up for a sandbox account](https://developer.authorize.net/sandbox/).
|
||||
|
||||
### Authentication
|
||||
To authenticate with the Authorize.Net API, use your account's API Login ID and Transaction Key. If you don't have these credentials, obtain them from the Merchant Interface. For production accounts, the Merchant Interface is located at (https://account.authorize.net/), and for sandbox accounts, at (https://sandbox.authorize.net).
|
||||
|
||||
After you have your credentials, load them into the appropriate variables in your code. The below sample code shows how to set the credentials as part of the API request.
|
||||
|
||||
#### To set your API credentials for an API request:
|
||||
...
|
||||
```php
|
||||
use net\authorize\api\contract\v1 as AnetAPI;
|
||||
```
|
||||
...
|
||||
|
||||
```php
|
||||
$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();
|
||||
$merchantAuthentication->setName("YOURLOGIN");
|
||||
$merchantAuthentication->setTransactionKey("YOURKEY");
|
||||
```
|
||||
...
|
||||
|
||||
```php
|
||||
$request = new AnetAPI\CreateTransactionRequest();
|
||||
$request->setMerchantAuthentication($merchantAuthentication);
|
||||
```
|
||||
...
|
||||
|
||||
You should never include your Login ID and Transaction Key directly in a PHP file that's in a publically accessible portion of your website. A better practice would be to define these in a constants file, and then reference those constants in the appropriate place in your code.
|
||||
|
||||
### Switching between the sandbox environment and the production environment
|
||||
Authorize.Net maintains a complete sandbox environment for testing and development purposes. The sandbox environment is an exact replica of our production environment, with simulated transaction authorization and settlement. By default, this SDK is configured to use the sandbox environment. To switch to the production environment, replace the environment constant in the execute method. For example:
|
||||
```php
|
||||
// For PRODUCTION use
|
||||
$response = $controller->executeWithApiResponse(\net\authorize\api\constants\ANetEnvironment::PRODUCTION);
|
||||
```
|
||||
|
||||
API credentials are different for each environment, so be sure to switch to the appropriate credentials when switching environments.
|
||||
|
||||
|
||||
## SDK Usage Examples and Sample Code
|
||||
To get started using this SDK, it's highly recommended to download our sample code repository:
|
||||
* [Authorize.Net PHP Sample Code Repository (on GitHub)](https://github.com/AuthorizeNet/sample-code-php)
|
||||
|
||||
In that respository, we have comprehensive sample code for all common uses of our API:
|
||||
|
||||
Additionally, you can find details and examples of how our API is structured in our API Reference Guide:
|
||||
* [Developer Center API Reference](http://developer.authorize.net/api/reference/index.html)
|
||||
|
||||
The API Reference Guide provides examples of what information is needed for a particular request and how that information would be formatted. Using those examples, you can easily determine what methods would be necessary to include that information in a request using this SDK.
|
||||
|
||||
|
||||
## Building & Testing the SDK
|
||||
Integration tests for the AuthorizeNet SDK are in the `tests` directory. These tests
|
||||
are mainly for SDK development. However, you can also browse through them to find
|
||||
more usage examples for the various APIs.
|
||||
|
||||
- Run `composer update --dev` to load the `PHPUnit` test library.
|
||||
- Copy the `phpunit.xml.dist` file to `phpunit.xml` and enter your merchant
|
||||
credentials in the constant fields.
|
||||
- Run `vendor/bin/phpunit` to run the test suite.
|
||||
|
||||
*You'll probably want to disable emails on your sandbox account.*
|
||||
|
||||
### Testing Guide
|
||||
For additional help in testing your own code, Authorize.Net maintains a [comprehensive testing guide](http://developer.authorize.net/hello_world/testing_guide/) that includes test credit card numbers to use and special triggers to generate certain responses from the sandbox environment.
|
||||
|
||||
|
||||
## Logging
|
||||
The SDK generates a log with masking for sensitive data like credit card, expiration dates. The provided levels for logging are
|
||||
`debug`, `info`, `warn`, `error`. Add ````use \net\authorize\util\LogFactory;````. Logger can be initialized using `$logger = LogFactory::getLog(get_class($this));`
|
||||
The default log file `phplog` gets generated in the current folder. The subsequent logs are appended to the same file, unless the execution folder is changed, and a new log file is generated.
|
||||
|
||||
### Usage Examples
|
||||
- Logging a string message `$logger->debug("Sending 'XML' Request type");`
|
||||
- Logging xml strings `$logger->debug($xmlRequest);`
|
||||
- Logging using formatting `$logger->debugFormat("Integer: %d, Float: %f, Xml-Request: %s\n", array(100, 1.29f, $xmlRequest));`
|
||||
|
||||
### Customizing Sensitive Tags
|
||||
A local copy of [AuthorizedNetSensitiveTagsConfig.json](/lib/net/authorize/util/ANetSensitiveFields.php) gets generated when code invoking the logger first gets executed. The local file can later be edited by developer to re-configure what is masked and what is visible. (*Do not edit the JSON in the SDK*).
|
||||
- For each element of the `sensitiveTags` array,
|
||||
- `tagName` field corresponds to the name of the property in object, or xml-tag that should be hidden entirely ( *XXXX* shown if no replacement specified ) or masked (e.g. showing the last 4 digits of credit card number).
|
||||
- `pattern`[<sup>[Note]</sup>](#regex-note) and `replacement`[<sup>[Note]</sup>](#regex-note) can be left `""`, if the default is to be used (as defined in [Log.php](/lib/net/authorize/util/Log.php)). `pattern` gives the regex to identify, while `replacement` defines the visible part.
|
||||
- `disableMask` can be set to *true* to allow the log to fully display that property in an object, or tag in a xml string.
|
||||
- `sensitiveStringRegexes`[<sup>[Note]</sup>](#regex-note) has list of credit-card regexes. So if credit-card number is not already masked, it would get entirely masked.
|
||||
- Take care of non-ascii characters (refer [manual](http://php.net/manual/en/regexp.reference.unicode.php)) while defining the regex, e.g. use
|
||||
`"pattern": "(\\p{N}+)(\\p{N}{4})"` instead of `"pattern": "(\\d+)(\\d{4})"`. Also note `\\` escape sequence is used.
|
||||
|
||||
**<a name="regex-note">Note</a>:**
|
||||
**For any regex, no starting or ending '/' or any other delimiter should be defined. The '/' delimiter and unicode flag is added in the code.**
|
||||
|
||||
|
||||
### Transaction Hash Upgrade
|
||||
Authorize.Net is phasing out the MD5 based `transHash` element in favor of the SHA-512 based `transHashSHA2`. The setting in the Merchant Interface which controlled the MD5 Hash option is no longer available, and the `transHash` element will stop returning values at a later date to be determined. For information on how to use `transHashSHA2`, see the [Transaction Hash Upgrade Guide] (https://developer.authorize.net/support/hash_upgrade/).
|
||||
|
||||
|
||||
## License
|
||||
This repository is distributed under a proprietary license. See the provided [`LICENSE.txt`](/LICENSE.txt) file.
|
||||
18
vendor/authorizenet/authorizenet/autoload.php
vendored
Normal file
18
vendor/authorizenet/authorizenet/autoload.php
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* Custom SPL autoloader for the AuthorizeNet SDK
|
||||
*
|
||||
* @package AuthorizeNet
|
||||
*/
|
||||
|
||||
spl_autoload_register(function($className) {
|
||||
static $classMap;
|
||||
|
||||
if (!isset($classMap)) {
|
||||
$classMap = require __DIR__ . DIRECTORY_SEPARATOR . 'classmap.php';
|
||||
}
|
||||
|
||||
if (isset($classMap[$className])) {
|
||||
include $classMap[$className];
|
||||
}
|
||||
});
|
||||
304
vendor/authorizenet/authorizenet/classmap.php
vendored
Normal file
304
vendor/authorizenet/authorizenet/classmap.php
vendored
Normal file
@@ -0,0 +1,304 @@
|
||||
<?php
|
||||
spl_autoload_extensions(".php"); // comma-separated list
|
||||
spl_autoload_register();
|
||||
|
||||
/**
|
||||
* A map of classname => filename for SPL autoloading.
|
||||
*
|
||||
* @package AuthorizeNet
|
||||
*/
|
||||
|
||||
$baseDir = __DIR__ ;
|
||||
$libDir = $baseDir . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR;
|
||||
$vendorDir = $baseDir . '/vendor';
|
||||
|
||||
return array(
|
||||
|
||||
// Following section contains the new controller model classes needed
|
||||
//Utils
|
||||
//'net\authorize\util\ObjectToXml' => $libDir . 'net/authorize/util/ObjectToXml.php',
|
||||
'net\authorize\util\HttpClient' => $libDir . 'net/authorize/util/HttpClient.php',
|
||||
'net\authorize\util\Helpers' => $libDir . 'net/authorize/util/Helpers.php',
|
||||
'net\authorize\util\Log' => $libDir . 'net/authorize/util/Log.php',
|
||||
'net\authorize\util\LogFactory' => $libDir . 'net/authorize/util/LogFactory.php',
|
||||
'net\authorize\util\ANetSensitiveFields' => $libDir . 'net/authorize/util/ANetSensitiveFields.php',
|
||||
'net\authorize\util\SensitiveTag' => $libDir . 'net/authorize/util/SensitiveTag.php',
|
||||
'net\authorize\util\SensitiveDataConfigType' => $libDir . 'net/authorize/util/SensitiveDataConfigType.php',
|
||||
'net\authorize\util\Mapper' => $libDir . 'net/authorize/util/Mapper.php',
|
||||
'net\authorize\util\MapperObj' => $libDir . 'net/authorize/util/MapperObj.php',
|
||||
|
||||
//constants
|
||||
'net\authorize\api\constants\ANetEnvironment' => $libDir . 'net/authorize/api/constants/ANetEnvironment.php',
|
||||
|
||||
//base classes
|
||||
'net\authorize\api\controller\base\IApiOperation' => $libDir . 'net/authorize/api/controller/base/IApiOperation.php',
|
||||
'net\authorize\api\controller\base\ApiOperationBase' => $libDir . 'net/authorize/api/controller/base/ApiOperationBase.php',
|
||||
|
||||
//following are generated class mappings
|
||||
'net\authorize\api\contract\v1\ANetApiRequestType' => $libDir . 'net/authorize/api/contract/v1/ANetApiRequestType.php',
|
||||
'net\authorize\api\contract\v1\ANetApiResponseType' => $libDir . 'net/authorize/api/contract/v1/ANetApiResponseType.php',
|
||||
'net\authorize\api\contract\v1\ARBCancelSubscriptionRequest' => $libDir . 'net/authorize/api/contract/v1/ARBCancelSubscriptionRequest.php',
|
||||
'net\authorize\api\contract\v1\ARBCancelSubscriptionResponse' => $libDir . 'net/authorize/api/contract/v1/ARBCancelSubscriptionResponse.php',
|
||||
'net\authorize\api\contract\v1\ARBCreateSubscriptionRequest' => $libDir . 'net/authorize/api/contract/v1/ARBCreateSubscriptionRequest.php',
|
||||
'net\authorize\api\contract\v1\ARBCreateSubscriptionResponse' => $libDir . 'net/authorize/api/contract/v1/ARBCreateSubscriptionResponse.php',
|
||||
'net\authorize\api\contract\v1\ARBGetSubscriptionListRequest' => $libDir . 'net/authorize/api/contract/v1/ARBGetSubscriptionListRequest.php',
|
||||
'net\authorize\api\contract\v1\ARBGetSubscriptionListResponse' => $libDir . 'net/authorize/api/contract/v1/ARBGetSubscriptionListResponse.php',
|
||||
'net\authorize\api\contract\v1\ARBGetSubscriptionListSortingType' => $libDir . 'net/authorize/api/contract/v1/ARBGetSubscriptionListSortingType.php',
|
||||
'net\authorize\api\contract\v1\ARBGetSubscriptionRequest' => $libDir . 'net/authorize/api/contract/v1/ARBGetSubscriptionRequest.php',
|
||||
'net\authorize\api\contract\v1\ARBGetSubscriptionResponse' => $libDir . 'net/authorize/api/contract/v1/ARBGetSubscriptionResponse.php',
|
||||
'net\authorize\api\contract\v1\ARBGetSubscriptionStatusRequest' => $libDir . 'net/authorize/api/contract/v1/ARBGetSubscriptionStatusRequest.php',
|
||||
'net\authorize\api\contract\v1\ARBGetSubscriptionStatusResponse' => $libDir . 'net/authorize/api/contract/v1/ARBGetSubscriptionStatusResponse.php',
|
||||
'net\authorize\api\contract\v1\ARBSubscriptionMaskedType' => $libDir . 'net/authorize/api/contract/v1/ARBSubscriptionMaskedType.php',
|
||||
'net\authorize\api\contract\v1\ARBSubscriptionType' => $libDir . 'net/authorize/api/contract/v1/ARBSubscriptionType.php',
|
||||
'net\authorize\api\contract\v1\ArbTransactionType' => $libDir . 'net/authorize/api/contract/v1/ArbTransactionType.php',
|
||||
'net\authorize\api\contract\v1\ARBUpdateSubscriptionRequest' => $libDir . 'net/authorize/api/contract/v1/ARBUpdateSubscriptionRequest.php',
|
||||
'net\authorize\api\contract\v1\ARBUpdateSubscriptionResponse' => $libDir . 'net/authorize/api/contract/v1/ARBUpdateSubscriptionResponse.php',
|
||||
'net\authorize\api\contract\v1\ArrayOfSettingType' => $libDir . 'net/authorize/api/contract/v1/ArrayOfSettingType.php',
|
||||
'net\authorize\api\contract\v1\AuthenticateTestRequest' => $libDir . 'net/authorize/api/contract/v1/AuthenticateTestRequest.php',
|
||||
'net\authorize\api\contract\v1\AuthenticateTestResponse' => $libDir . 'net/authorize/api/contract/v1/AuthenticateTestResponse.php',
|
||||
'net\authorize\api\contract\v1\AuthorizationIndicatorType' => $libDir . 'net/authorize/api/contract/v1/AuthorizationIndicatorType.php',
|
||||
'net\authorize\api\contract\v1\BankAccountMaskedType' => $libDir . 'net/authorize/api/contract/v1/BankAccountMaskedType.php',
|
||||
'net\authorize\api\contract\v1\BankAccountType' => $libDir . 'net/authorize/api/contract/v1/BankAccountType.php',
|
||||
'net\authorize\api\contract\v1\BatchDetailsType' => $libDir . 'net/authorize/api/contract/v1/BatchDetailsType.php',
|
||||
'net\authorize\api\contract\v1\BatchStatisticType' => $libDir . 'net/authorize/api/contract/v1/BatchStatisticType.php',
|
||||
'net\authorize\api\contract\v1\CardArtType' => $libDir . 'net/authorize/api/contract/v1/CardArtType.php',
|
||||
'net\authorize\api\contract\v1\CcAuthenticationType' => $libDir . 'net/authorize/api/contract/v1/CcAuthenticationType.php',
|
||||
'net\authorize\api\contract\v1\ContactDetailType' => $libDir . 'net/authorize/api/contract/v1/ContactDetailType.php',
|
||||
'net\authorize\api\contract\v1\CreateCustomerPaymentProfileRequest' => $libDir . 'net/authorize/api/contract/v1/CreateCustomerPaymentProfileRequest.php',
|
||||
'net\authorize\api\contract\v1\CreateCustomerPaymentProfileResponse' => $libDir . 'net/authorize/api/contract/v1/CreateCustomerPaymentProfileResponse.php',
|
||||
'net\authorize\api\contract\v1\CreateCustomerProfileFromTransactionRequest' => $libDir . 'net/authorize/api/contract/v1/CreateCustomerProfileFromTransactionRequest.php',
|
||||
'net\authorize\api\contract\v1\CreateCustomerProfileRequest' => $libDir . 'net/authorize/api/contract/v1/CreateCustomerProfileRequest.php',
|
||||
'net\authorize\api\contract\v1\CreateCustomerProfileResponse' => $libDir . 'net/authorize/api/contract/v1/CreateCustomerProfileResponse.php',
|
||||
'net\authorize\api\contract\v1\CreateCustomerProfileTransactionRequest' => $libDir . 'net/authorize/api/contract/v1/CreateCustomerProfileTransactionRequest.php',
|
||||
'net\authorize\api\contract\v1\CreateCustomerProfileTransactionResponse' => $libDir . 'net/authorize/api/contract/v1/CreateCustomerProfileTransactionResponse.php',
|
||||
'net\authorize\api\contract\v1\CreateCustomerShippingAddressRequest' => $libDir . 'net/authorize/api/contract/v1/CreateCustomerShippingAddressRequest.php',
|
||||
'net\authorize\api\contract\v1\CreateCustomerShippingAddressResponse' => $libDir . 'net/authorize/api/contract/v1/CreateCustomerShippingAddressResponse.php',
|
||||
'net\authorize\api\contract\v1\CreateProfileResponseType' => $libDir . 'net/authorize/api/contract/v1/CreateProfileResponseType.php',
|
||||
'net\authorize\api\contract\v1\CreateTransactionRequest' => $libDir . 'net/authorize/api/contract/v1/CreateTransactionRequest.php',
|
||||
'net\authorize\api\contract\v1\CreateTransactionResponse' => $libDir . 'net/authorize/api/contract/v1/CreateTransactionResponse.php',
|
||||
'net\authorize\api\contract\v1\CreditCardMaskedType' => $libDir . 'net/authorize/api/contract/v1/CreditCardMaskedType.php',
|
||||
'net\authorize\api\contract\v1\CreditCardSimpleType' => $libDir . 'net/authorize/api/contract/v1/CreditCardSimpleType.php',
|
||||
'net\authorize\api\contract\v1\CreditCardTrackType' => $libDir . 'net/authorize/api/contract/v1/CreditCardTrackType.php',
|
||||
'net\authorize\api\contract\v1\CreditCardType' => $libDir . 'net/authorize/api/contract/v1/CreditCardType.php',
|
||||
'net\authorize\api\contract\v1\CustomerAddressExType' => $libDir . 'net/authorize/api/contract/v1/CustomerAddressExType.php',
|
||||
'net\authorize\api\contract\v1\CustomerAddressType' => $libDir . 'net/authorize/api/contract/v1/CustomerAddressType.php',
|
||||
'net\authorize\api\contract\v1\CustomerDataType' => $libDir . 'net/authorize/api/contract/v1/CustomerDataType.php',
|
||||
'net\authorize\api\contract\v1\CustomerProfileIdType' => $libDir . 'net/authorize/api/contract/v1/CustomerProfileIdType.php',
|
||||
'net\authorize\api\contract\v1\CustomerPaymentProfileBaseType' => $libDir . 'net/authorize/api/contract/v1/CustomerPaymentProfileBaseType.php',
|
||||
'net\authorize\api\contract\v1\CustomerPaymentProfileExType' => $libDir . 'net/authorize/api/contract/v1/CustomerPaymentProfileExType.php',
|
||||
'net\authorize\api\contract\v1\CustomerPaymentProfileListItemType' => $libDir . 'net/authorize/api/contract/v1/CustomerPaymentProfileListItemType.php',
|
||||
'net\authorize\api\contract\v1\CustomerPaymentProfileMaskedType' => $libDir . 'net/authorize/api/contract/v1/CustomerPaymentProfileMaskedType.php',
|
||||
'net\authorize\api\contract\v1\CustomerPaymentProfileSortingType' => $libDir . 'net/authorize/api/contract/v1/CustomerPaymentProfileSortingType.php',
|
||||
'net\authorize\api\contract\v1\CustomerPaymentProfileType' => $libDir . 'net/authorize/api/contract/v1/CustomerPaymentProfileType.php',
|
||||
'net\authorize\api\contract\v1\CustomerProfileBaseType' => $libDir . 'net/authorize/api/contract/v1/CustomerProfileBaseType.php',
|
||||
'net\authorize\api\contract\v1\CustomerProfileExType' => $libDir . 'net/authorize/api/contract/v1/CustomerProfileExType.php',
|
||||
'net\authorize\api\contract\v1\CustomerProfileMaskedType' => $libDir . 'net/authorize/api/contract/v1/CustomerProfileMaskedType.php',
|
||||
'net\authorize\api\contract\v1\CustomerProfilePaymentType' => $libDir . 'net/authorize/api/contract/v1/CustomerProfilePaymentType.php',
|
||||
'net\authorize\api\contract\v1\CustomerProfileSummaryType' => $libDir . 'net/authorize/api/contract/v1/CustomerProfileSummaryType.php',
|
||||
'net\authorize\api\contract\v1\CustomerProfileType' => $libDir . 'net/authorize/api/contract/v1/CustomerProfileType.php',
|
||||
'net\authorize\api\contract\v1\CustomerType' => $libDir . 'net/authorize/api/contract/v1/CustomerType.php',
|
||||
'net\authorize\api\contract\v1\DecryptPaymentDataRequest' => $libDir . 'net/authorize/api/contract/v1/DecryptPaymentDataRequest.php',
|
||||
'net\authorize\api\contract\v1\DecryptPaymentDataResponse' => $libDir . 'net/authorize/api/contract/v1/DecryptPaymentDataResponse.php',
|
||||
'net\authorize\api\contract\v1\DeleteCustomerPaymentProfileRequest' => $libDir . 'net/authorize/api/contract/v1/DeleteCustomerPaymentProfileRequest.php',
|
||||
'net\authorize\api\contract\v1\DeleteCustomerPaymentProfileResponse' => $libDir . 'net/authorize/api/contract/v1/DeleteCustomerPaymentProfileResponse.php',
|
||||
'net\authorize\api\contract\v1\DeleteCustomerProfileRequest' => $libDir . 'net/authorize/api/contract/v1/DeleteCustomerProfileRequest.php',
|
||||
'net\authorize\api\contract\v1\DeleteCustomerProfileResponse' => $libDir . 'net/authorize/api/contract/v1/DeleteCustomerProfileResponse.php',
|
||||
'net\authorize\api\contract\v1\DeleteCustomerShippingAddressRequest' => $libDir . 'net/authorize/api/contract/v1/DeleteCustomerShippingAddressRequest.php',
|
||||
'net\authorize\api\contract\v1\DeleteCustomerShippingAddressResponse' => $libDir . 'net/authorize/api/contract/v1/DeleteCustomerShippingAddressResponse.php',
|
||||
'net\authorize\api\contract\v1\DriversLicenseMaskedType' => $libDir . 'net/authorize/api/contract/v1/DriversLicenseMaskedType.php',
|
||||
'net\authorize\api\contract\v1\DriversLicenseType' => $libDir . 'net/authorize/api/contract/v1/DriversLicenseType.php',
|
||||
'net\authorize\api\contract\v1\EmailSettingsType' => $libDir . 'net/authorize/api/contract/v1/EmailSettingsType.php',
|
||||
'net\authorize\api\contract\v1\EncryptedTrackDataType' => $libDir . 'net/authorize/api/contract/v1/EncryptedTrackDataType.php',
|
||||
'net\authorize\api\contract\v1\EnumCollection' => $libDir . 'net/authorize/api/contract/v1/EnumCollection.php',
|
||||
'net\authorize\api\contract\v1\ErrorResponse' => $libDir . 'net/authorize/api/contract/v1/ErrorResponse.php',
|
||||
'net\authorize\api\contract\v1\ExtendedAmountType' => $libDir . 'net/authorize/api/contract/v1/ExtendedAmountType.php',
|
||||
'net\authorize\api\contract\v1\FDSFilterType' => $libDir . 'net/authorize/api/contract/v1/FDSFilterType.php',
|
||||
'net\authorize\api\contract\v1\FingerPrintType' => $libDir . 'net/authorize/api/contract/v1/FingerPrintType.php',
|
||||
'net\authorize\api\contract\v1\FraudInformationType'=> $libDir . 'net/authorize/api/contract/v1/FraudInformationType.php',
|
||||
'net\authorize\api\contract\v1\GetBatchStatisticsRequest' => $libDir . 'net/authorize/api/contract/v1/GetBatchStatisticsRequest.php',
|
||||
'net\authorize\api\contract\v1\GetBatchStatisticsResponse' => $libDir . 'net/authorize/api/contract/v1/GetBatchStatisticsResponse.php',
|
||||
'net\authorize\api\contract\v1\GetCustomerPaymentProfileListRequest' => $libDir . 'net/authorize/api/contract/v1/GetCustomerPaymentProfileListRequest.php',
|
||||
'net\authorize\api\contract\v1\GetCustomerPaymentProfileListResponse' => $libDir . 'net/authorize/api/contract/v1/GetCustomerPaymentProfileListResponse.php',
|
||||
'net\authorize\api\contract\v1\GetCustomerPaymentProfileRequest' => $libDir . 'net/authorize/api/contract/v1/GetCustomerPaymentProfileRequest.php',
|
||||
'net\authorize\api\contract\v1\GetCustomerPaymentProfileResponse' => $libDir . 'net/authorize/api/contract/v1/GetCustomerPaymentProfileResponse.php',
|
||||
'net\authorize\api\contract\v1\GetCustomerProfileIdsRequest' => $libDir . 'net/authorize/api/contract/v1/GetCustomerProfileIdsRequest.php',
|
||||
'net\authorize\api\contract\v1\GetCustomerProfileIdsResponse' => $libDir . 'net/authorize/api/contract/v1/GetCustomerProfileIdsResponse.php',
|
||||
'net\authorize\api\contract\v1\GetCustomerProfileRequest' => $libDir . 'net/authorize/api/contract/v1/GetCustomerProfileRequest.php',
|
||||
'net\authorize\api\contract\v1\GetCustomerProfileResponse' => $libDir . 'net/authorize/api/contract/v1/GetCustomerProfileResponse.php',
|
||||
'net\authorize\api\contract\v1\GetCustomerShippingAddressRequest' => $libDir . 'net/authorize/api/contract/v1/GetCustomerShippingAddressRequest.php',
|
||||
'net\authorize\api\contract\v1\GetCustomerShippingAddressResponse' => $libDir . 'net/authorize/api/contract/v1/GetCustomerShippingAddressResponse.php',
|
||||
'net\authorize\api\contract\v1\GetHostedPaymentPageRequest'=> $libDir . 'net/authorize/api/contract/v1/GetHostedPaymentPageRequest.php',
|
||||
'net\authorize\api\contract\v1\GetHostedPaymentPageResponse'=> $libDir . 'net/authorize/api/contract/v1/GetHostedPaymentPageResponse.php',
|
||||
'net\authorize\api\contract\v1\GetHostedProfilePageRequest' => $libDir . 'net/authorize/api/contract/v1/GetHostedProfilePageRequest.php',
|
||||
'net\authorize\api\contract\v1\GetHostedProfilePageResponse' => $libDir . 'net/authorize/api/contract/v1/GetHostedProfilePageResponse.php',
|
||||
'net\authorize\api\contract\v1\GetMerchantDetailsRequest'=> $libDir . 'net/authorize/api/contract/v1/GetMerchantDetailsRequest.php',
|
||||
'net\authorize\api\contract\v1\GetMerchantDetailsResponse'=> $libDir . 'net/authorize/api/contract/v1/GetMerchantDetailsResponse.php',
|
||||
'net\authorize\api\contract\v1\GetSettledBatchListRequest' => $libDir . 'net/authorize/api/contract/v1/GetSettledBatchListRequest.php',
|
||||
'net\authorize\api\contract\v1\GetSettledBatchListResponse' => $libDir . 'net/authorize/api/contract/v1/GetSettledBatchListResponse.php',
|
||||
'net\authorize\api\contract\v1\GetTransactionDetailsRequest' => $libDir . 'net/authorize/api/contract/v1/GetTransactionDetailsRequest.php',
|
||||
'net\authorize\api\contract\v1\GetTransactionDetailsResponse' => $libDir . 'net/authorize/api/contract/v1/GetTransactionDetailsResponse.php',
|
||||
'net\authorize\api\contract\v1\GetTransactionListRequest' => $libDir . 'net/authorize/api/contract/v1/GetTransactionListRequest.php',
|
||||
'net\authorize\api\contract\v1\GetTransactionListResponse' => $libDir . 'net/authorize/api/contract/v1/GetTransactionListResponse.php',
|
||||
'net\authorize\api\contract\v1\GetUnsettledTransactionListRequest' => $libDir . 'net/authorize/api/contract/v1/GetUnsettledTransactionListRequest.php',
|
||||
'net\authorize\api\contract\v1\GetUnsettledTransactionListResponse' => $libDir . 'net/authorize/api/contract/v1/GetUnsettledTransactionListResponse.php',
|
||||
'net\authorize\api\contract\v1\HeldTransactionRequestType'=> $libDir . 'net/authorize/api/contract/v1/HeldTransactionRequestType.php',
|
||||
'net\authorize\api\contract\v1\ImpersonationAuthenticationType' => $libDir . 'net/authorize/api/contract/v1/ImpersonationAuthenticationType.php',
|
||||
'net\authorize\api\contract\v1\IsAliveRequest' => $libDir . 'net/authorize/api/contract/v1/IsAliveRequest.php',
|
||||
'net\authorize\api\contract\v1\IsAliveResponse' => $libDir . 'net/authorize/api/contract/v1/IsAliveResponse.php',
|
||||
'net\authorize\api\contract\v1\KeyBlockType' => $libDir . 'net/authorize/api/contract/v1/KeyBlockType.php',
|
||||
'net\authorize\api\contract\v1\KeyManagementSchemeType' => $libDir . 'net/authorize/api/contract/v1/KeyManagementSchemeType.php',
|
||||
'net\authorize\api\contract\v1\KeyValueType' => $libDir . 'net/authorize/api/contract/v1/KeyValueType.php',
|
||||
'net\authorize\api\contract\v1\LineItemType' => $libDir . 'net/authorize/api/contract/v1/LineItemType.php',
|
||||
'net\authorize\api\contract\v1\LogoutRequest' => $libDir . 'net/authorize/api/contract/v1/LogoutRequest.php',
|
||||
'net\authorize\api\contract\v1\LogoutResponse' => $libDir . 'net/authorize/api/contract/v1/LogoutResponse.php',
|
||||
'net\authorize\api\contract\v1\MerchantAuthenticationType' => $libDir . 'net/authorize/api/contract/v1/MerchantAuthenticationType.php',
|
||||
'net\authorize\api\contract\v1\MerchantContactType' => $libDir . 'net/authorize/api/contract/v1/MerchantContactType.php',
|
||||
'net\authorize\api\contract\v1\MessagesType' => $libDir . 'net/authorize/api/contract/v1/MessagesType.php',
|
||||
'net\authorize\api\contract\v1\MobileDeviceLoginRequest' => $libDir . 'net/authorize/api/contract/v1/MobileDeviceLoginRequest.php',
|
||||
'net\authorize\api\contract\v1\MobileDeviceLoginResponse' => $libDir . 'net/authorize/api/contract/v1/MobileDeviceLoginResponse.php',
|
||||
'net\authorize\api\contract\v1\MobileDeviceRegistrationRequest' => $libDir . 'net/authorize/api/contract/v1/MobileDeviceRegistrationRequest.php',
|
||||
'net\authorize\api\contract\v1\MobileDeviceRegistrationResponse' => $libDir . 'net/authorize/api/contract/v1/MobileDeviceRegistrationResponse.php',
|
||||
'net\authorize\api\contract\v1\MobileDeviceType' => $libDir . 'net/authorize/api/contract/v1/MobileDeviceType.php',
|
||||
'net\authorize\api\contract\v1\NameAndAddressType' => $libDir . 'net/authorize/api/contract/v1/NameAndAddressType.php',
|
||||
'net\authorize\api\contract\v1\OpaqueDataType' => $libDir . 'net/authorize/api/contract/v1/OpaqueDataType.php',
|
||||
'net\authorize\api\contract\v1\OrderExType' => $libDir . 'net/authorize/api/contract/v1/OrderExType.php',
|
||||
'net\authorize\api\contract\v1\OrderType' => $libDir . 'net/authorize/api/contract/v1/OrderType.php',
|
||||
'net\authorize\api\contract\v1\PagingType' => $libDir . 'net/authorize/api/contract/v1/PagingType.php',
|
||||
'net\authorize\api\contract\v1\PaymentDetailsType' => $libDir . 'net/authorize/api/contract/v1/PaymentDetailsType.php',
|
||||
'net\authorize\api\contract\v1\PaymentMaskedType' => $libDir . 'net/authorize/api/contract/v1/PaymentMaskedType.php',
|
||||
'net\authorize\api\contract\v1\PaymentProfileType' => $libDir . 'net/authorize/api/contract/v1/PaymentProfileType.php',
|
||||
'net\authorize\api\contract\v1\PaymentScheduleType' => $libDir . 'net/authorize/api/contract/v1/PaymentScheduleType.php',
|
||||
'net\authorize\api\contract\v1\PaymentSimpleType' => $libDir . 'net/authorize/api/contract/v1/PaymentSimpleType.php',
|
||||
'net\authorize\api\contract\v1\PaymentType' => $libDir . 'net/authorize/api/contract/v1/PaymentType.php',
|
||||
'net\authorize\api\contract\v1\PayPalType' => $libDir . 'net/authorize/api/contract/v1/PayPalType.php',
|
||||
'net\authorize\api\contract\v1\PermissionType' => $libDir . 'net/authorize/api/contract/v1/PermissionType.php',
|
||||
'net\authorize\api\contract\v1\ProcessorType'=> $libDir . 'net/authorize/api/contract/v1/ProcessorType.php',
|
||||
'net\authorize\api\contract\v1\ProfileTransactionType' => $libDir . 'net/authorize/api/contract/v1/ProfileTransactionType.php',
|
||||
'net\authorize\api\contract\v1\ProfileTransAmountType' => $libDir . 'net/authorize/api/contract/v1/ProfileTransAmountType.php',
|
||||
'net\authorize\api\contract\v1\ProfileTransAuthCaptureType' => $libDir . 'net/authorize/api/contract/v1/ProfileTransAuthCaptureType.php',
|
||||
'net\authorize\api\contract\v1\ProfileTransAuthOnlyType' => $libDir . 'net/authorize/api/contract/v1/ProfileTransAuthOnlyType.php',
|
||||
'net\authorize\api\contract\v1\ProfileTransCaptureOnlyType' => $libDir . 'net/authorize/api/contract/v1/ProfileTransCaptureOnlyType.php',
|
||||
'net\authorize\api\contract\v1\ProfileTransOrderType' => $libDir . 'net/authorize/api/contract/v1/ProfileTransOrderType.php',
|
||||
'net\authorize\api\contract\v1\ProfileTransPriorAuthCaptureType' => $libDir . 'net/authorize/api/contract/v1/ProfileTransPriorAuthCaptureType.php',
|
||||
'net\authorize\api\contract\v1\ProfileTransRefundType' => $libDir . 'net/authorize/api/contract/v1/ProfileTransRefundType.php',
|
||||
'net\authorize\api\contract\v1\ProfileTransVoidType' => $libDir . 'net/authorize/api/contract/v1/ProfileTransVoidType.php',
|
||||
'net\authorize\api\contract\v1\ReturnedItemType' => $libDir . 'net/authorize/api/contract/v1/ReturnedItemType.php',
|
||||
'net\authorize\api\contract\v1\SearchCriteriaCustomerProfileType' => $libDir . 'net/authorize/api/contract/v1/SearchCriteriaCustomerProfileType.php',
|
||||
'net\authorize\api\contract\v1\SecurePaymentContainerErrorType' => $libDir . 'net/authorize/api/contract/v1/SecurePaymentContainerErrorType.php',
|
||||
'net\authorize\api\contract\v1\SecurePaymentContainerRequest' => $libDir . 'net/authorize/api/contract/v1/SecurePaymentContainerRequest.php',
|
||||
'net\authorize\api\contract\v1\SecurePaymentContainerResponse' => $libDir . 'net/authorize/api/contract/v1/SecurePaymentContainerResponse.php',
|
||||
'net\authorize\api\contract\v1\SendCustomerTransactionReceiptRequest' => $libDir . 'net/authorize/api/contract/v1/SendCustomerTransactionReceiptRequest.php',
|
||||
'net\authorize\api\contract\v1\SendCustomerTransactionReceiptResponse' => $libDir . 'net/authorize/api/contract/v1/SendCustomerTransactionReceiptResponse.php',
|
||||
'net\authorize\api\contract\v1\SettingType' => $libDir . 'net/authorize/api/contract/v1/SettingType.php',
|
||||
'net\authorize\api\contract\v1\SolutionType' => $libDir . 'net/authorize/api/contract/v1/SolutionType.php',
|
||||
'net\authorize\api\contract\v1\SubMerchantType' => $libDir . 'net/authorize/api/contract/v1/SubMerchantType.php',
|
||||
'net\authorize\api\contract\v1\SubscriptionCustomerProfileType' => $libDir . 'net/authorize/api/contract/v1/SubscriptionCustomerProfileType.php',
|
||||
'net\authorize\api\contract\v1\SubscriptionDetailType' => $libDir . 'net/authorize/api/contract/v1/SubscriptionDetailType.php',
|
||||
'net\authorize\api\contract\v1\SubscriptionPaymentType' => $libDir . 'net/authorize/api/contract/v1/SubscriptionPaymentType.php',
|
||||
'net\authorize\api\contract\v1\TokenMaskedType' => $libDir . 'net/authorize/api/contract/v1/TokenMaskedType.php',
|
||||
'net\authorize\api\contract\v1\TransactionDetailsType' => $libDir . 'net/authorize/api/contract/v1/TransactionDetailsType.php',
|
||||
'net\authorize\api\contract\v1\TransactionListSortingType'=> $libDir . 'net/authorize/api/contract/v1/TransactionListSortingType.php',
|
||||
'net\authorize\api\contract\v1\TransactionRequestType' => $libDir . 'net/authorize/api/contract/v1/TransactionRequestType.php',
|
||||
'net\authorize\api\contract\v1\TransactionResponseType' => $libDir . 'net/authorize/api/contract/v1/TransactionResponseType.php',
|
||||
'net\authorize\api\contract\v1\TransactionSummaryType' => $libDir . 'net/authorize/api/contract/v1/TransactionSummaryType.php',
|
||||
'net\authorize\api\contract\v1\TransRetailInfoType' => $libDir . 'net/authorize/api/contract/v1/TransRetailInfoType.php',
|
||||
'net\authorize\api\contract\v1\UpdateCustomerPaymentProfileRequest' => $libDir . 'net/authorize/api/contract/v1/UpdateCustomerPaymentProfileRequest.php',
|
||||
'net\authorize\api\contract\v1\UpdateCustomerPaymentProfileResponse' => $libDir . 'net/authorize/api/contract/v1/UpdateCustomerPaymentProfileResponse.php',
|
||||
'net\authorize\api\contract\v1\UpdateCustomerProfileRequest' => $libDir . 'net/authorize/api/contract/v1/UpdateCustomerProfileRequest.php',
|
||||
'net\authorize\api\contract\v1\UpdateCustomerProfileResponse' => $libDir . 'net/authorize/api/contract/v1/UpdateCustomerProfileResponse.php',
|
||||
'net\authorize\api\contract\v1\UpdateCustomerShippingAddressRequest' => $libDir . 'net/authorize/api/contract/v1/UpdateCustomerShippingAddressRequest.php',
|
||||
'net\authorize\api\contract\v1\UpdateCustomerShippingAddressResponse' => $libDir . 'net/authorize/api/contract/v1/UpdateCustomerShippingAddressResponse.php',
|
||||
'net\authorize\api\contract\v1\UpdateHeldTransactionRequest'=> $libDir . 'net/authorize/api/contract/v1/UpdateHeldTransactionRequest.php',
|
||||
'net\authorize\api\contract\v1\UpdateHeldTransactionResponse'=> $libDir . 'net/authorize/api/contract/v1/UpdateHeldTransactionResponse.php',
|
||||
'net\authorize\api\contract\v1\UpdateSplitTenderGroupRequest' => $libDir . 'net/authorize/api/contract/v1/UpdateSplitTenderGroupRequest.php',
|
||||
'net\authorize\api\contract\v1\UpdateSplitTenderGroupResponse' => $libDir . 'net/authorize/api/contract/v1/UpdateSplitTenderGroupResponse.php',
|
||||
'net\authorize\api\contract\v1\UserFieldType' => $libDir . 'net/authorize/api/contract/v1/UserFieldType.php',
|
||||
'net\authorize\api\contract\v1\ValidateCustomerPaymentProfileRequest' => $libDir . 'net/authorize/api/contract/v1/ValidateCustomerPaymentProfileRequest.php',
|
||||
'net\authorize\api\contract\v1\ValidateCustomerPaymentProfileResponse' => $libDir . 'net/authorize/api/contract/v1/ValidateCustomerPaymentProfileResponse.php',
|
||||
'net\authorize\api\contract\v1\WebCheckOutDataType' => $libDir . 'net/authorize/api/contract/v1/WebCheckOutDataType.php',
|
||||
'net\authorize\api\contract\v1\KeyManagementSchemeType\DUKPTAType' => $libDir . 'net/authorize/api/contract/v1/KeyManagementSchemeType/DUKPTAType.php',
|
||||
'net\authorize\api\contract\v1\KeyManagementSchemeType\DUKPTAType\DeviceInfoAType' => $libDir . 'net/authorize/api/contract/v1/KeyManagementSchemeType/DUKPTAType/DeviceInfoAType.php',
|
||||
'net\authorize\api\contract\v1\KeyManagementSchemeType\DUKPTAType\EncryptedDataAType' => $libDir . 'net/authorize/api/contract/v1/KeyManagementSchemeType/DUKPTAType/EncryptedDataAType.php',
|
||||
'net\authorize\api\contract\v1\KeyManagementSchemeType\DUKPTAType\ModeAType' => $libDir . 'net/authorize/api/contract/v1/KeyManagementSchemeType/DUKPTAType/ModeAType.php',
|
||||
'net\authorize\api\contract\v1\MessagesType\MessageAType' => $libDir . 'net/authorize/api/contract/v1/MessagesType/MessageAType.php',
|
||||
'net\authorize\api\contract\v1\PaymentScheduleType\IntervalAType' => $libDir . 'net/authorize/api/contract/v1/PaymentScheduleType/IntervalAType.php',
|
||||
'net\authorize\api\contract\v1\TransactionRequestType\UserFieldsAType' => $libDir . 'net/authorize/api/contract/v1/TransactionRequestType/UserFieldsAType.php',
|
||||
'net\authorize\api\contract\v1\TransactionResponseType\ErrorsAType' => $libDir . 'net/authorize/api/contract/v1/TransactionResponseType/ErrorsAType.php',
|
||||
'net\authorize\api\contract\v1\TransactionResponseType\MessagesAType' => $libDir . 'net/authorize/api/contract/v1/TransactionResponseType/MessagesAType.php',
|
||||
'net\authorize\api\contract\v1\TransactionResponseType\PrePaidCardAType' => $libDir . 'net/authorize/api/contract/v1/TransactionResponseType/PrePaidCardAType.php',
|
||||
'net\authorize\api\contract\v1\TransactionResponseType\SecureAcceptanceAType' => $libDir . 'net/authorize/api/contract/v1/TransactionResponseType/SecureAcceptanceAType.php',
|
||||
'net\authorize\api\contract\v1\TransactionResponseType\SplitTenderPaymentsAType' => $libDir . 'net/authorize/api/contract/v1/TransactionResponseType/SplitTenderPaymentsAType.php',
|
||||
'net\authorize\api\contract\v1\TransactionResponseType\UserFieldsAType' => $libDir . 'net/authorize/api/contract/v1/TransactionResponseType/UserFieldsAType.php',
|
||||
'net\authorize\api\contract\v1\TransactionResponseType\ErrorsAType\ErrorAType' => $libDir . 'net/authorize/api/contract/v1/TransactionResponseType/ErrorsAType/ErrorAType.php',
|
||||
'net\authorize\api\contract\v1\TransactionResponseType\MessagesAType\MessageAType' => $libDir . 'net/authorize/api/contract/v1/TransactionResponseType/MessagesAType/MessageAType.php',
|
||||
'net\authorize\api\contract\v1\TransactionResponseType\SplitTenderPaymentsAType\SplitTenderPaymentAType' => $libDir . 'net/authorize/api/contract/v1/TransactionResponseType/SplitTenderPaymentsAType/SplitTenderPaymentAType.php',
|
||||
'net\authorize\api\contract\v1\WebCheckOutDataType\TokenAType' => $libDir . 'net/authorize/api/contract/v1/WebCheckOutDataType/TokenAType.php',
|
||||
'net\authorize\api\contract\v1\GetTransactionListForCustomerRequest' => $libDir . 'net/authorize/api/contract/v1/GetTransactionListForCustomerRequest.php',
|
||||
|
||||
'net\authorize\api\contract\v1\GetAUJobSummaryRequest' => $libDir . 'net/authorize/api/contract/v1/getAUJobSummaryRequest.php',
|
||||
'net\authorize\api\contract\v1\GetAUJobSummaryResponse' => $libDir . 'net/authorize/api/contract/v1/GetAUJobSummaryResponse.php',
|
||||
'net\authorize\api\contract\v1\GetAUJobDetailsRequest' => $libDir . 'net/authorize/api/contract/v1/GetAUJobDetailsRequest.php',
|
||||
'net\authorize\api\contract\v1\GetAUJobDetailsResponse' => $libDir . 'net/authorize/api/contract/v1/GetAUJobDetailsResponse.php',
|
||||
|
||||
'net\authorize\api\contract\v1\AuDeleteType' => $libDir . 'net/authorize/api/contract/v1/AuDeleteType.php',
|
||||
'net\authorize\api\contract\v1\AuDetailsType' => $libDir . 'net/authorize/api/contract/v1/AuDetailsType.php',
|
||||
'net\authorize\api\contract\v1\AuResponseType' => $libDir . 'net/authorize/api/contract/v1/AuResponseType.php',
|
||||
'net\authorize\api\contract\v1\AuUpdateType' => $libDir . 'net/authorize/api/contract/v1/AuUpdateType.php',
|
||||
|
||||
'net\authorize\api\contract\v1\ListOfAUDetailsType' => $libDir . 'net/authorize/api/contract/v1/ListOfAUDetailsType.php',
|
||||
'net\authorize\api\contract\v1\EmvTagType' => $libDir . 'net/authorize/api/contract/v1/EmvTagType.php',
|
||||
'net\authorize\api\contract\v1\PaymentEmvType' => $libDir . 'net/authorize/api/contract/v1/PaymentEmvType.php',
|
||||
'net\authorize\api\contract\v1\OtherTaxType' => $libDir . 'net/authorize/api/contract/v1/OtherTaxType.php',
|
||||
'net\authorize\api\contract\v1\UpdateMerchantDetailsRequest' => $libDir . 'net/authorize/api/contract/v1/UpdateMerchantDetailsRequest.php',
|
||||
'net\authorize\api\contract\v1\UpdateMerchantDetailsResponse' => $libDir . 'net/authorize/api/contract/v1/UpdateMerchantDetailsResponse.php',
|
||||
'net\authorize\api\contract\v1\WebCheckOutDataTypeTokenType' => $libDir . 'net/authorize/api/contract/v1/WebCheckOutDataTypeTokenType.php',
|
||||
|
||||
//Controllers
|
||||
'net\authorize\api\controller\ARBCancelSubscriptionController' => $libDir . 'net/authorize/api/controller/ARBCancelSubscriptionController.php',
|
||||
'net\authorize\api\controller\ARBCreateSubscriptionController' => $libDir . 'net/authorize/api/controller/ARBCreateSubscriptionController.php',
|
||||
'net\authorize\api\controller\ARBGetSubscriptionController' => $libDir . 'net/authorize/api/controller/ARBGetSubscriptionController.php',
|
||||
'net\authorize\api\controller\ARBGetSubscriptionListController' => $libDir . 'net/authorize/api/controller/ARBGetSubscriptionListController.php',
|
||||
'net\authorize\api\controller\ARBGetSubscriptionStatusController' => $libDir . 'net/authorize/api/controller/ARBGetSubscriptionStatusController.php',
|
||||
'net\authorize\api\controller\ARBUpdateSubscriptionController' => $libDir . 'net/authorize/api/controller/ARBUpdateSubscriptionController.php',
|
||||
'net\authorize\api\controller\AuthenticateTestController' => $libDir . 'net/authorize/api/controller/AuthenticateTestController.php',
|
||||
'net\authorize\api\controller\CreateCustomerPaymentProfileController' => $libDir . 'net/authorize/api/controller/CreateCustomerPaymentProfileController.php',
|
||||
'net\authorize\api\controller\CreateCustomerProfileController' => $libDir . 'net/authorize/api/controller/CreateCustomerProfileController.php',
|
||||
'net\authorize\api\controller\CreateCustomerProfileFromTransactionController' => $libDir . 'net/authorize/api/controller/CreateCustomerProfileFromTransactionController.php',
|
||||
'net\authorize\api\controller\CreateCustomerProfileTransactionController' => $libDir . 'net/authorize/api/controller/CreateCustomerProfileTransactionController.php',
|
||||
'net\authorize\api\controller\CreateCustomerShippingAddressController' => $libDir . 'net/authorize/api/controller/CreateCustomerShippingAddressController.php',
|
||||
'net\authorize\api\controller\CreateTransactionController' => $libDir . 'net/authorize/api/controller/CreateTransactionController.php',
|
||||
'net\authorize\api\controller\DecryptPaymentDataController' => $libDir . 'net/authorize/api/controller/DecryptPaymentDataController.php',
|
||||
'net\authorize\api\controller\DeleteCustomerPaymentProfileController' => $libDir . 'net/authorize/api/controller/DeleteCustomerPaymentProfileController.php',
|
||||
'net\authorize\api\controller\DeleteCustomerProfileController' => $libDir . 'net/authorize/api/controller/DeleteCustomerProfileController.php',
|
||||
'net\authorize\api\controller\DeleteCustomerShippingAddressController' => $libDir . 'net/authorize/api/controller/DeleteCustomerShippingAddressController.php',
|
||||
'net\authorize\api\controller\GetAUJobDetailsController' => $libDir . 'net/authorize/api/controller/GetAUJobDetailsController.php',
|
||||
'net\authorize\api\controller\GetAUJobSummaryController' => $libDir . 'net/authorize/api/controller/GetAUJobSummaryController.php',
|
||||
'net\authorize\api\controller\GetBatchStatisticsController' => $libDir . 'net/authorize/api/controller/GetBatchStatisticsController.php',
|
||||
'net\authorize\api\controller\GetCustomerPaymentProfileController' => $libDir . 'net/authorize/api/controller/GetCustomerPaymentProfileController.php',
|
||||
'net\authorize\api\controller\GetCustomerPaymentProfileListController' => $libDir . 'net/authorize/api/controller/GetCustomerPaymentProfileListController.php',
|
||||
'net\authorize\api\controller\GetCustomerProfileController' => $libDir . 'net/authorize/api/controller/GetCustomerProfileController.php',
|
||||
'net\authorize\api\controller\GetCustomerProfileIdsController' => $libDir . 'net/authorize/api/controller/GetCustomerProfileIdsController.php',
|
||||
'net\authorize\api\controller\GetCustomerShippingAddressController' => $libDir . 'net/authorize/api/controller/GetCustomerShippingAddressController.php',
|
||||
'net\authorize\api\controller\GetHostedPaymentPageController' => $libDir . 'net/authorize/api/controller/GetHostedPaymentPageController.php',
|
||||
'net\authorize\api\controller\GetHostedProfilePageController' => $libDir . 'net/authorize/api/controller/GetHostedProfilePageController.php',
|
||||
'net\authorize\api\controller\GetMerchantDetailsController' => $libDir . 'net/authorize/api/controller/GetMerchantDetailsController.php',
|
||||
'net\authorize\api\controller\GetSettledBatchListController' => $libDir . 'net/authorize/api/controller/GetSettledBatchListController.php',
|
||||
'net\authorize\api\controller\GetTransactionDetailsController' => $libDir . 'net/authorize/api/controller/GetTransactionDetailsController.php',
|
||||
'net\authorize\api\controller\GetTransactionListController' => $libDir . 'net/authorize/api/controller/GetTransactionListController.php',
|
||||
'net\authorize\api\controller\GetTransactionListForCustomerController' => $libDir . 'net/authorize/api/controller/GetTransactionListForCustomerController.php',
|
||||
'net\authorize\api\controller\GetUnsettledTransactionListController' => $libDir . 'net/authorize/api/controller/GetUnsettledTransactionListController.php',
|
||||
'net\authorize\api\controller\IsAliveController' => $libDir . 'net/authorize/api/controller/IsAliveController.php',
|
||||
'net\authorize\api\controller\LogoutController' => $libDir . 'net/authorize/api/controller/LogoutController.php',
|
||||
'net\authorize\api\controller\MobileDeviceLoginController' => $libDir . 'net/authorize/api/controller/MobileDeviceLoginController.php',
|
||||
'net\authorize\api\controller\MobileDeviceRegistrationController' => $libDir . 'net/authorize/api/controller/MobileDeviceRegistrationController.php',
|
||||
'net\authorize\api\controller\SecurePaymentContainerController' => $libDir . 'net/authorize/api/controller/SecurePaymentContainerController.php',
|
||||
'net\authorize\api\controller\SendCustomerTransactionReceiptController' => $libDir . 'net/authorize/api/controller/SendCustomerTransactionReceiptController.php',
|
||||
'net\authorize\api\controller\UpdateCustomerPaymentProfileController' => $libDir . 'net/authorize/api/controller/UpdateCustomerPaymentProfileController.php',
|
||||
'net\authorize\api\controller\UpdateCustomerProfileController' => $libDir . 'net/authorize/api/controller/UpdateCustomerProfileController.php',
|
||||
'net\authorize\api\controller\UpdateCustomerShippingAddressController' => $libDir . 'net/authorize/api/controller/UpdateCustomerShippingAddressController.php',
|
||||
'net\authorize\api\controller\UpdateHeldTransactionController' => $libDir . 'net/authorize/api/controller/UpdateHeldTransactionController.php',
|
||||
'net\authorize\api\controller\UpdateMerchantDetailsController' => $libDir . 'net/authorize/api/controller/UpdateMerchantDetailsController.php',
|
||||
'net\authorize\api\controller\UpdateSplitTenderGroupController' => $libDir . 'net/authorize/api/controller/UpdateSplitTenderGroupController.php',
|
||||
'net\authorize\api\controller\ValidateCustomerPaymentProfileController' => $libDir . 'net/authorize/api/controller/ValidateCustomerPaymentProfileController.php'
|
||||
|
||||
);
|
||||
20
vendor/authorizenet/authorizenet/composer.json
vendored
Normal file
20
vendor/authorizenet/authorizenet/composer.json
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "authorizenet/authorizenet",
|
||||
"type": "library",
|
||||
"version": "2.0.2",
|
||||
"description": "Official PHP SDK for Authorize.Net",
|
||||
"keywords": ["authorizenet", "authorize.net", "payment", "ecommerce"],
|
||||
"license": "proprietary",
|
||||
"homepage": "http://developer.authorize.net",
|
||||
"require": {
|
||||
"php": ">=5.6",
|
||||
"ext-curl": "*",
|
||||
"ext-json": "*"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": ["lib"]
|
||||
},
|
||||
"autoload-dev": {
|
||||
"classmap": ["tests"]
|
||||
}
|
||||
}
|
||||
224
vendor/authorizenet/authorizenet/doc/AIM.markdown
vendored
Normal file
224
vendor/authorizenet/authorizenet/doc/AIM.markdown
vendored
Normal file
@@ -0,0 +1,224 @@
|
||||
Advanced Integration Method
|
||||
===========================
|
||||
|
||||
Basic Overview
|
||||
--------------
|
||||
|
||||
The AuthorizeNetAIM class creates a request object for submitting transactions
|
||||
to the AuthorizeNetAIM API. To use, create an instance of the class, set the fields
|
||||
for your transaction, call the method you want to use (Authorize Only, Authorize &
|
||||
Capture, etc.) and you'll receive an AuthorizeNetAIM response object providing easy access
|
||||
to the results of the transaction.
|
||||
|
||||
Autoloading
|
||||
-----------------
|
||||
|
||||
```PHP
|
||||
require 'vendor/autoload.php';
|
||||
```
|
||||
|
||||
Setting Merchant Credentials
|
||||
----------------------------
|
||||
The easiest way to set credentials is to define constants which the SDK uses:
|
||||
|
||||
```PHP
|
||||
define("AUTHORIZENET_API_LOGIN_ID", "YOURLOGIN");
|
||||
define("AUTHORIZENET_TRANSACTION_KEY", "YOURKEY");
|
||||
```
|
||||
|
||||
You can also set credentials manually per request like so:
|
||||
|
||||
```PHP
|
||||
$sale = new AuthorizeNetAIM("YOUR_API_LOGIN_ID","YOUR_TRANSACTION_KEY");
|
||||
```
|
||||
|
||||
Setting the Transaction Post Location
|
||||
-------------------------------------
|
||||
|
||||
To post transactions to the live Authorize.Net gateway:
|
||||
|
||||
```PHP
|
||||
define("AUTHORIZENET_SANDBOX", false);
|
||||
```
|
||||
|
||||
To post transactions to the Authorize.Net test server:
|
||||
|
||||
```PHP
|
||||
define("AUTHORIZENET_SANDBOX", true);
|
||||
```
|
||||
|
||||
You can also set the location manually per request:
|
||||
|
||||
```PHP
|
||||
$sale->setSandbox(false);
|
||||
```
|
||||
|
||||
Setting Fields
|
||||
--------------
|
||||
|
||||
An Authorize.Net AIM request is simply a set of name/value pairs. The PHP SDK
|
||||
allows you to set these fields in a few different ways depending on your
|
||||
preference.
|
||||
|
||||
Note: to make things easier on the developer, the "x_" prefix attached to each
|
||||
field in the AIM API has been removed. Thus, instead of setting `$sale->x_card_num`,
|
||||
set `$sale->card_num` instead.
|
||||
|
||||
1.) By Setting Fields Directly:
|
||||
|
||||
```PHP
|
||||
$sale = new AuthorizeNetAIM;
|
||||
$sale->amount = "1999.99";
|
||||
$sale->card_num = '6011000000000012';
|
||||
$sale->exp_date = '04/15';
|
||||
$response = $sale->authorizeAndCapture();
|
||||
```
|
||||
|
||||
2.) By Setting Multiple Fields at Once:
|
||||
|
||||
```PHP
|
||||
$sale = new AuthorizeNetAIM;
|
||||
$sale->setFields(
|
||||
array(
|
||||
'amount' => rand(1, 1000),
|
||||
'card_num' => '6011000000000012',
|
||||
'exp_date' => '0415'
|
||||
)
|
||||
);
|
||||
```
|
||||
|
||||
3.) By Setting Special Items
|
||||
|
||||
To add line items or set custom fields use the respective functions:
|
||||
|
||||
Line Items:
|
||||
|
||||
```PHP
|
||||
$sale->addLineItem(
|
||||
'item1', // Item Id
|
||||
'Golf tees', // Item Name
|
||||
'Blue tees', // Item Description
|
||||
'2', // Item Quantity
|
||||
'5.00', // Item Unit Price
|
||||
'N' // Item taxable
|
||||
);
|
||||
```
|
||||
|
||||
Custom Fields:
|
||||
|
||||
```PHP
|
||||
$sale->setCustomField("coupon_code", "SAVE2011");
|
||||
```
|
||||
|
||||
4.) By Passing in Objects
|
||||
|
||||
Each property will be copied from the object to the AIM request.
|
||||
|
||||
```PHP
|
||||
$sale = new AuthorizeNetAIM;
|
||||
$customer = (object)array();
|
||||
$customer->first_name = "Jane";
|
||||
$customer->last_name = "Smith";
|
||||
$customer->company = "Jane Smith Enterprises Inc.";
|
||||
$customer->address = "20 Main Street";
|
||||
$customer->city = "San Francisco";
|
||||
$customer->state = "CA";
|
||||
$customer->zip = "94110";
|
||||
$customer->country = "US";
|
||||
$customer->phone = "415-555-5557";
|
||||
$customer->fax = "415-555-5556";
|
||||
$customer->email = "foo@example.com";
|
||||
$customer->cust_id = "55";
|
||||
$customer->customer_ip = "98.5.5.5";
|
||||
$sale->setFields($customer);
|
||||
```
|
||||
|
||||
Submitting Transactions
|
||||
-----------------------
|
||||
To submit a transaction call one of the 7 methods:
|
||||
|
||||
```PHP
|
||||
AuthorizeNetAIM::authorizeAndCapture()
|
||||
AuthorizeNetAIM::authorizeOnly()
|
||||
AuthorizeNetAIM::priorAuthCapture()
|
||||
AuthorizeNetAIM::void()
|
||||
AuthorizeNetAIM::captureOnly()
|
||||
AuthorizeNetAIM::credit()
|
||||
```
|
||||
|
||||
Each method has optional parameters which highlight the fields required by the
|
||||
Authorize.Net API for that transaction type.
|
||||
|
||||
|
||||
eCheck
|
||||
------
|
||||
To submit an electronic check transaction you can set the required fields individually
|
||||
or simply use the setECheck method:
|
||||
|
||||
```PHP
|
||||
$sale = new AuthorizeNetAIM;
|
||||
$sale->amount = "45.00";
|
||||
$sale->setECheck(
|
||||
'121042882', // bank_aba_code
|
||||
'123456789123', // bank_acct_num
|
||||
'CHECKING', // bank_acct_type
|
||||
'Bank of Earth', // bank_name
|
||||
'Jane Doe', // bank_acct_name
|
||||
'WEB' // echeck_type
|
||||
);
|
||||
$response = $sale->authorizeAndCapture();
|
||||
```
|
||||
|
||||
Partial Authorization Transactions
|
||||
----------------------------------
|
||||
To enable partial authorization transactions set the partial_auth flag
|
||||
to true:
|
||||
|
||||
```PHP
|
||||
$sale->allow_partial_auth = true;
|
||||
```
|
||||
|
||||
You should receive a split tender id in the response if a partial auth
|
||||
is made:
|
||||
|
||||
```PHP
|
||||
$split_tender_id = $response->split_tender_id;
|
||||
```
|
||||
|
||||
Itemized Order Information
|
||||
--------------------------
|
||||
To add itemized order information use the addLineItem method:
|
||||
|
||||
```PHP
|
||||
$auth->addLineItem(
|
||||
'item1', // Item Id
|
||||
'Golf tees', // Item Name
|
||||
'Blue tees', // Item Description
|
||||
'2', // Item Quantity
|
||||
'5.00', // Item Unit Price
|
||||
'N' // Item taxable
|
||||
);
|
||||
```
|
||||
|
||||
Merchant Defined Fields
|
||||
-----------------------
|
||||
You can use the setCustomField method to set any custom merchant defined field(s):
|
||||
|
||||
```PHP
|
||||
$sale->setCustomField("entrance_source", "Search Engine");
|
||||
$sale->setCustomField("coupon_code", "SAVE2011");
|
||||
```
|
||||
|
||||
Transaction Response
|
||||
--------------------
|
||||
When you submit an AIM transaction you receive an AuthorizeNetAIM_Response
|
||||
object in return. You can access each name/value pair in the response as
|
||||
you would normally expect:
|
||||
|
||||
```PHP
|
||||
$response = $sale->authorizeAndCapture();
|
||||
$response->response_code;
|
||||
$response->response_subcode;
|
||||
$response->response_reason_code;
|
||||
$response->transaction_id;
|
||||
```
|
||||
62
vendor/authorizenet/authorizenet/doc/ARB.markdown
vendored
Normal file
62
vendor/authorizenet/authorizenet/doc/ARB.markdown
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
ARB API
|
||||
=======
|
||||
|
||||
Basic Overview
|
||||
--------------
|
||||
|
||||
The AuthorizeNetARB class creates a request object for submitting transactions
|
||||
to the AuthorizeNetARB API.
|
||||
|
||||
|
||||
Creating/Updating Subscriptions
|
||||
-------------------------------
|
||||
|
||||
To create or update a subscription first create a subscription object:
|
||||
|
||||
```PHP
|
||||
$subscription = new AuthorizeNet_Subscription;
|
||||
$subscription->name = "Short subscription";
|
||||
$subscription->intervalLength = "1";
|
||||
$subscription->intervalUnit = "months";
|
||||
$subscription->startDate = "2011-03-12";
|
||||
$subscription->totalOccurrences = "14";
|
||||
$subscription->amount = rand(1,100);
|
||||
$subscription->creditCardCardNumber = "6011000000000012";
|
||||
$subscription->creditCardExpirationDate = "2018-10";
|
||||
$subscription->creditCardCardCode = "123";
|
||||
$subscription->billToFirstName = "john";
|
||||
$subscription->billToLastName = "doe";
|
||||
```
|
||||
|
||||
Then create an AuthorizeNetARB object and call the appropriate method
|
||||
passing in your subscription object:
|
||||
|
||||
```PHP
|
||||
$request = new AuthorizeNetARB;
|
||||
$response = $request->createSubscription($subscription);
|
||||
```
|
||||
|
||||
or for updating a subscription:
|
||||
|
||||
```PHP
|
||||
$response = $request->updateSubscription($subscription_id, $subscription);
|
||||
```
|
||||
|
||||
Getting Subscription Status
|
||||
---------------------------
|
||||
|
||||
Create a new AuthorizeNetARB object and call the getSubscriptionStatus
|
||||
method with the subscription_id you want the status of as the parameter:
|
||||
|
||||
```PHP
|
||||
$status_request = new AuthorizeNetARB;
|
||||
$status_response = $status_request->getSubscriptionStatus($subscription_id);
|
||||
```
|
||||
|
||||
Canceling a Subscription
|
||||
------------------------
|
||||
|
||||
```PHP
|
||||
$cancellation = new AuthorizeNetARB;
|
||||
$cancel_response = $cancellation->cancelSubscription($subscription_id);
|
||||
```
|
||||
275
vendor/authorizenet/authorizenet/doc/CIM.markdown
vendored
Normal file
275
vendor/authorizenet/authorizenet/doc/CIM.markdown
vendored
Normal file
@@ -0,0 +1,275 @@
|
||||
CIM API
|
||||
=======
|
||||
|
||||
Basic Overview
|
||||
--------------
|
||||
|
||||
The AuthorizeNetCIM class creates a request object for submitting transactions
|
||||
to the Authorize.Net CIM API.
|
||||
|
||||
|
||||
Creating a Customer Profile
|
||||
---------------------------
|
||||
|
||||
To create a new cusomter profile, first create a new AuthorizeNetCustomer
|
||||
object.
|
||||
|
||||
```PHP
|
||||
$customerProfile = new AuthorizeNetCustomer;
|
||||
$customerProfile->description = "Description of customer";
|
||||
$customerProfile->merchantCustomerId = 123;
|
||||
$customerProfile->email = "user@domain.com";
|
||||
```
|
||||
You can then create an add payment profiles and addresses to this
|
||||
customer object.
|
||||
|
||||
```PHP
|
||||
// Add payment profile.
|
||||
$paymentProfile = new AuthorizeNetPaymentProfile;
|
||||
$paymentProfile->customerType = "individual";
|
||||
$paymentProfile->payment->creditCard->cardNumber = "4111111111111111";
|
||||
$paymentProfile->payment->creditCard->expirationDate = "2015-10";
|
||||
$customerProfile->paymentProfiles[] = $paymentProfile;
|
||||
|
||||
// Add another payment profile.
|
||||
$paymentProfile2 = new AuthorizeNetPaymentProfile;
|
||||
$paymentProfile2->customerType = "business";
|
||||
$paymentProfile2->payment->bankAccount->accountType = "businessChecking";
|
||||
$paymentProfile2->payment->bankAccount->routingNumber = "121042882";
|
||||
$paymentProfile2->payment->bankAccount->accountNumber = "123456789123";
|
||||
$paymentProfile2->payment->bankAccount->nameOnAccount = "Jane Doe";
|
||||
$paymentProfile2->payment->bankAccount->echeckType = "WEB";
|
||||
$paymentProfile2->payment->bankAccount->bankName = "Pandora Bank";
|
||||
$customerProfile->paymentProfiles[] = $paymentProfile2;
|
||||
|
||||
// Add shipping address.
|
||||
$address = new AuthorizeNetAddress;
|
||||
$address->firstName = "john";
|
||||
$address->lastName = "Doe";
|
||||
$address->company = "John Doe Company";
|
||||
$address->address = "1 Main Street";
|
||||
$address->city = "Boston";
|
||||
$address->state = "MA";
|
||||
$address->zip = "02412";
|
||||
$address->country = "USA";
|
||||
$address->phoneNumber = "555-555-5555";
|
||||
$address->faxNumber = "555-555-5556";
|
||||
$customerProfile->shipToList[] = $address;
|
||||
|
||||
// Add another shipping address.
|
||||
$address2 = new AuthorizeNetAddress;
|
||||
$address2->firstName = "jane";
|
||||
$address2->lastName = "Doe";
|
||||
$address2->address = "11 Main Street";
|
||||
$address2->city = "Boston";
|
||||
$address2->state = "MA";
|
||||
$address2->zip = "02412";
|
||||
$address2->country = "USA";
|
||||
$address2->phoneNumber = "555-512-5555";
|
||||
$address2->faxNumber = "555-523-5556";
|
||||
$customerProfile->shipToList[] = $address2;
|
||||
```
|
||||
|
||||
Next, create an AuthorizeNetCIM object:
|
||||
|
||||
```PHP
|
||||
$request = new AuthorizeNetCIM;
|
||||
```
|
||||
|
||||
Finally, call the createCustomerProfile method and pass in your
|
||||
customer object:
|
||||
|
||||
```PHP
|
||||
$response = $request->createCustomerProfile($customerProfile);
|
||||
```
|
||||
|
||||
The response object provides some helper methods for easy access to the
|
||||
results of the transaction:
|
||||
|
||||
```PHP
|
||||
$new_customer_id = $response->getCustomerProfileId();
|
||||
```
|
||||
|
||||
The response object also stores the XML response as a SimpleXml element
|
||||
which you can access like so:
|
||||
|
||||
```PHP
|
||||
$new_customer_id = $response->xml->customerProfileId
|
||||
```
|
||||
|
||||
You can also run xpath queries against the result:
|
||||
|
||||
```PHP
|
||||
$array = $response->xpath('customerProfileId');
|
||||
$new_customer_id = $array[0];
|
||||
```
|
||||
|
||||
Deleting a Customer Profile
|
||||
---------------------------
|
||||
|
||||
To delete a customer profile first create a new AuthorizeNetCIM object:
|
||||
|
||||
```PHP
|
||||
$request = new AuthorizeNetCIM;
|
||||
```
|
||||
|
||||
Then call the deleteCustomerProfile method:
|
||||
|
||||
```PHP
|
||||
request->deleteCustomerProfile($customer_id);
|
||||
```
|
||||
|
||||
|
||||
Retrieving a Customer Profile
|
||||
-----------------------------
|
||||
|
||||
To retrieve a customer profile call the getCustomerProfile method:
|
||||
|
||||
```PHP
|
||||
$response = $request->getCustomerProfile($customerProfileId);
|
||||
```
|
||||
|
||||
Validation Mode
|
||||
---------------
|
||||
|
||||
Validation mode allows you to generate a test transaction at the time you create a customer profile. In Test Mode, only field validation is performed. In Live Mode, a transaction is generated and submitted to the processor with the amount of $0.00 or $0.01. If successful, the transaction is immediately voided.
|
||||
|
||||
To create a customer profile with Validation mode, simply pass in the
|
||||
a value for the validation mode parameter on the createCustomerProfile method:
|
||||
|
||||
```PHP
|
||||
$response = $request->createCustomerProfile($customerProfile, "testMode");
|
||||
```
|
||||
|
||||
You can access the validation response for each payment profile via xpath,
|
||||
the SimpleXML element or the getValidationResponses method:
|
||||
|
||||
```PHP
|
||||
$validationResponses = $response->getValidationResponses();
|
||||
foreach ($validationResponses as $vr) {
|
||||
echo $vr->approved;
|
||||
}
|
||||
```
|
||||
|
||||
Updating a Customer Profile
|
||||
---------------------------
|
||||
|
||||
Call the updateCustomerProfile method with the customerProfileId and customerProfile
|
||||
parameters:
|
||||
|
||||
```PHP
|
||||
$response = $request->updateCustomerProfile($customerProfileId, $customerProfile);
|
||||
```
|
||||
|
||||
Adding a Payment Profile
|
||||
------------------------
|
||||
|
||||
```PHP
|
||||
$paymentProfile = new AuthorizeNetPaymentProfile;
|
||||
$paymentProfile->customerType = "individual";
|
||||
$paymentProfile->payment->creditCard->cardNumber = "4111111111111111";
|
||||
$paymentProfile->payment->creditCard->expirationDate = "2015-10";
|
||||
$response = $request->createCustomerPaymentProfile($customerProfileId, $paymentProfile);
|
||||
```
|
||||
|
||||
Updating a Payment Profile
|
||||
--------------------------
|
||||
|
||||
```PHP
|
||||
$paymentProfile->payment->creditCard->cardNumber = "4111111111111111";
|
||||
$paymentProfile->payment->creditCard->expirationDate = "2017-11";
|
||||
$response = $request->updateCustomerPaymentProfile($customerProfileId,$paymentProfileId, $paymentProfile);
|
||||
```
|
||||
|
||||
Adding a Shipping Address
|
||||
-------------------------
|
||||
|
||||
```PHP
|
||||
$address = new AuthorizeNetAddress;
|
||||
$address->firstName = "john";
|
||||
$address->lastName = "Doe";
|
||||
$address->company = "John Doe Company";
|
||||
$address->address = "1 Main Street";
|
||||
$address->city = "Boston";
|
||||
$address->state = "MA";
|
||||
$address->zip = "02412";
|
||||
$address->country = "USA";
|
||||
$address->phoneNumber = "555-555-5555";
|
||||
$address->faxNumber = "555-555-5556";
|
||||
$response = $request->createCustomerShippingAddress($customerProfileId, $address);
|
||||
$customerAddressId = $response->getCustomerAddressId();
|
||||
```
|
||||
|
||||
Updating a Shipping Address
|
||||
---------------------------
|
||||
|
||||
```PHP
|
||||
// Update shipping address.
|
||||
$address->address = "2 First Street";
|
||||
$response = $request->updateCustomerShippingAddress($customerProfileId, $customerAddressId, $address);
|
||||
```
|
||||
|
||||
Creating Transactions
|
||||
---------------------
|
||||
|
||||
```PHP
|
||||
// Create Auth & Capture Transaction
|
||||
$transaction = new AuthorizeNetTransaction;
|
||||
$transaction->amount = "9.79";
|
||||
$transaction->customerProfileId = $customerProfileId;
|
||||
$transaction->customerPaymentProfileId = $paymentProfileId;
|
||||
$transaction->customerShippingAddressId = $customerAddressId;
|
||||
|
||||
$lineItem = new AuthorizeNetLineItem;
|
||||
$lineItem->itemId = "4";
|
||||
$lineItem->name = "Cookies";
|
||||
$lineItem->description = "Chocolate Chip";
|
||||
$lineItem->quantity = "4";
|
||||
$lineItem->unitPrice = "1.00";
|
||||
$lineItem->taxable = "true";
|
||||
|
||||
$lineItem2 = new AuthorizeNetLineItem;
|
||||
$lineItem2->itemId = "4";
|
||||
$lineItem2->name = "Cookies";
|
||||
$lineItem2->description= "Peanut Butter";
|
||||
$lineItem2->quantity = "4";
|
||||
$lineItem2->unitPrice = "1.00";
|
||||
$lineItem2->taxable = "true";
|
||||
|
||||
$transaction->lineItems[] = $lineItem;
|
||||
$transaction->lineItems[] = $lineItem2;
|
||||
|
||||
$response = $request->createCustomerProfileTransaction("AuthCapture", $transaction);
|
||||
$transactionResponse = $response->getTransactionResponse();
|
||||
$transactionId = $transactionResponse->transaction_id;
|
||||
```
|
||||
|
||||
Voiding a Transaction
|
||||
---------------------
|
||||
|
||||
```PHP
|
||||
$transaction = new AuthorizeNetTransaction;
|
||||
$transaction->transId = $transactionId;
|
||||
$response = $request->createCustomerProfileTransaction("Void", $transaction);
|
||||
```
|
||||
|
||||
Deleting a Shipping Address
|
||||
---------------------------
|
||||
|
||||
```PHP
|
||||
$response = $request->deleteCustomerShippingAddress($customerProfileId, $customerAddressId);
|
||||
```
|
||||
|
||||
Deleting a Payment Profile
|
||||
--------------------------
|
||||
|
||||
```PHP
|
||||
$response = $request->deleteCustomerPaymentProfile($customerProfileId, $paymentProfileId);
|
||||
```
|
||||
|
||||
Getting Customer Profile IDs
|
||||
----------------------------
|
||||
|
||||
```PHP
|
||||
$response = $request->getCustomerProfileIds();
|
||||
```
|
||||
44
vendor/authorizenet/authorizenet/doc/CP.markdown
vendored
Normal file
44
vendor/authorizenet/authorizenet/doc/CP.markdown
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
Card Present API
|
||||
================
|
||||
|
||||
Basic Overview
|
||||
--------------
|
||||
|
||||
The AuthorizeNetCP class creates a request object for submitting transactions
|
||||
to the AuthorizeNetCP API. The AuthorizeNetCP class extends the AuthorizeNetAIM
|
||||
class. See the AIM.markdown for help with the basics. This document contains
|
||||
information regarding the special features of the AuthorizeNetCP class.
|
||||
|
||||
|
||||
Merchant Credentials
|
||||
--------------------
|
||||
|
||||
Please note that if you are using both the CNP and CP APIs your merchant
|
||||
credentials will be different.
|
||||
|
||||
Setting Track Data
|
||||
------------------
|
||||
|
||||
To set Track 1 and/or Track 2 data, use the respective methods like so:
|
||||
|
||||
```PHP
|
||||
$sale = new AuthorizeNetCP(CP_API_LOGIN_ID, CP_TRANSACTION_KEY);
|
||||
$sale->setFields(
|
||||
array(
|
||||
'amount' => rand(1, 1000),
|
||||
'device_type' => '4',
|
||||
)
|
||||
);
|
||||
$sale->setTrack1Data('%B4111111111111111^CARDUSER/JOHN^1803101000000000020000831000000?');
|
||||
$response = $sale->authorizeAndCapture();
|
||||
|
||||
$sale = new AuthorizeNetCP(CP_API_LOGIN_ID, CP_TRANSACTION_KEY);
|
||||
$sale->setFields(
|
||||
array(
|
||||
'amount' => rand(1, 1000),
|
||||
'device_type' => '4',
|
||||
)
|
||||
);
|
||||
$sale->setTrack2Data('4111111111111111=1803101000020000831?');
|
||||
$response = $sale->authorizeAndCapture();
|
||||
```
|
||||
24
vendor/authorizenet/authorizenet/doc/DPM.markdown
vendored
Normal file
24
vendor/authorizenet/authorizenet/doc/DPM.markdown
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
Direct Post Method
|
||||
==================
|
||||
|
||||
Basic Overview
|
||||
--------------
|
||||
|
||||
The Authorize.Net PHP SDK includes a class that demonstrates one way
|
||||
of implementing the Direct Post Method.
|
||||
|
||||
While it is not necessary to use the AuthorizeNetDPM class to implement
|
||||
DPM, it may serve as a handy reference.
|
||||
|
||||
The AuthorizeNetDPM class extends the AuthorizeNetSIM_Form class.
|
||||
See the SIM.markdown for additional documentation.
|
||||
|
||||
Relay Response Snippet
|
||||
----------------------
|
||||
|
||||
The AuthorizeNetDPM class contains a `getRelayResponseSnippet($redirect_url)`
|
||||
which generates a snippet of HTML that will redirect a user back to your
|
||||
site after submitting a checkout form using DPM/SIM.
|
||||
|
||||
Use this method(or just grab the html) if you want to create a checkout
|
||||
experience where the user only interacts with pages on your site.
|
||||
3
vendor/authorizenet/authorizenet/doc/README.md
vendored
Normal file
3
vendor/authorizenet/authorizenet/doc/README.md
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# This documentation and the objects it documents have been deprecated
|
||||
|
||||
For the README for this repository, see README.md in the root level of the repository. For examples of how to interact with the current Authorize.Net API, see our new sample code GitHub repository at https://github.com/AuthorizeNet/sample-code-php.
|
||||
79
vendor/authorizenet/authorizenet/doc/SIM.markdown
vendored
Normal file
79
vendor/authorizenet/authorizenet/doc/SIM.markdown
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
Server Integration Method
|
||||
=========================
|
||||
|
||||
Basic Overview
|
||||
--------------
|
||||
|
||||
The Authorize.Net PHP SDK includes classes that can speed up implementing
|
||||
a Server Integration Method solution.
|
||||
|
||||
|
||||
Hosted Order/Receipt Page
|
||||
-------------------------
|
||||
|
||||
The `AuthorizeNetSIM_Form` class aims to make it easier to setup the hidden
|
||||
fields necessary for creating a SIM experience. While it is not necessary
|
||||
to use the `AuthorizeNetSIM_Form` class to implement SIM, it may be handy for
|
||||
reference.
|
||||
|
||||
The code below will generate a buy now button that leads to a hosted order page:
|
||||
|
||||
```PHP
|
||||
<form method="post" action="https://test.authorize.net/gateway/transact.dll">
|
||||
<?php
|
||||
$amount = "9.99";
|
||||
$fp_sequence = "123";
|
||||
$time = time();
|
||||
|
||||
$fingerprint = AuthorizeNetSIM_Form::getFingerprint($api_login_id, $transaction_key, $amount, $fp_sequence, $time);
|
||||
$sim = new AuthorizeNetSIM_Form(
|
||||
array(
|
||||
'x_amount' => $amount,
|
||||
'x_fp_sequence' => $fp_sequence,
|
||||
'x_fp_hash' => $fingerprint,
|
||||
'x_fp_timestamp' => $time,
|
||||
'x_relay_response'=> "FALSE",
|
||||
'x_login' => $api_login_id,
|
||||
)
|
||||
);
|
||||
echo $sim->getHiddenFieldString();?>
|
||||
<input type="submit" value="Buy Now">
|
||||
</form>
|
||||
```
|
||||
|
||||
Fingerprint Generation
|
||||
----------------------
|
||||
|
||||
To generate the fingerprint needed for a SIM transaction call the `getFingerprint` method:
|
||||
|
||||
```PHP
|
||||
$fingerprint = AuthorizeNetSIM_Form::getFingerprint($api_login_id, $transaction_key, $amount, $fp_sequence, $fp_timestamp);
|
||||
```
|
||||
|
||||
Relay Response
|
||||
--------------
|
||||
|
||||
The PHP SDK includes a `AuthorizeNetSIM` class for handling a relay response from
|
||||
Authorize.Net.
|
||||
|
||||
To receive a relay response from Authorize.Net you can either configure the
|
||||
url in the Merchant Interface or specify the url when submitting a transaction
|
||||
with SIM using the "x_relay_url" field.
|
||||
|
||||
When a transaction occurs, Authorize.Net will post the transaction details to
|
||||
this url. You can then create a page on your server at a url such as
|
||||
http://yourdomain.com/response_handler.php and execute any logic you want
|
||||
when a transaction occurs. The AuthorizeNetSIM class makes it easy to verify
|
||||
the transaction came from Authorize.Net and parse the response:
|
||||
|
||||
```PHP
|
||||
$response = new AuthorizeNetSIM;
|
||||
if ($response->isAuthorizeNet())
|
||||
{
|
||||
if ($response->approved)
|
||||
{
|
||||
// Activate magazine subscription
|
||||
magazine_subscription_activate($response->cust_id);
|
||||
}
|
||||
}
|
||||
```
|
||||
10
vendor/authorizenet/authorizenet/doc/SOAP.markdown
vendored
Normal file
10
vendor/authorizenet/authorizenet/doc/SOAP.markdown
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
SOAP
|
||||
====
|
||||
|
||||
Basic Overview
|
||||
--------------
|
||||
|
||||
The AuthorizeNetSOAP class provides a very basic wrapper to PHP's bundled
|
||||
SoapClient class. The AuthorizeNetSOAP class merely contains the WSDL,
|
||||
Sandbox, and Live Production server urls to make it easier to connect
|
||||
to the Authorize.Net SOAP API.
|
||||
69
vendor/authorizenet/authorizenet/doc/TD.markdown
vendored
Normal file
69
vendor/authorizenet/authorizenet/doc/TD.markdown
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
Transaction Details API
|
||||
=======================
|
||||
|
||||
Basic Overview
|
||||
--------------
|
||||
|
||||
The AuthorizeNetTD class creates a request object for submitting requests
|
||||
to the Authorize.Net Transaction Details API.
|
||||
|
||||
The AuthorizeNetTD class returns a response that uses PHP's bundled SimpleXML
|
||||
class for accessing it's members.
|
||||
|
||||
The AuthorizeNetTD response provides two ways to access response elements:
|
||||
|
||||
1.) A SimpleXml object:
|
||||
|
||||
```PHP
|
||||
$response->xml->transaction->payment->creditCard->cardType
|
||||
```
|
||||
|
||||
2.) Xpath:
|
||||
|
||||
```PHP
|
||||
$batches = $response->xpath("batchList/batch");
|
||||
```
|
||||
|
||||
3.) AuthorizeNet Objects (todo)
|
||||
|
||||
|
||||
|
||||
Get Transaction Details
|
||||
-----------------------
|
||||
|
||||
```PHP
|
||||
$request = new AuthorizeNetTD;
|
||||
$response = $request->getTransactionDetails($transId);
|
||||
echo "Amount: {$response->xml->transaction->authAmount}";
|
||||
```
|
||||
|
||||
Get Settled Batch List
|
||||
----------------------
|
||||
|
||||
```PHP
|
||||
$request = new AuthorizeNetTD;
|
||||
$response = $request->getSettledBatchList();
|
||||
$batches = $response->xpath("batchList/batch");
|
||||
echo "Batch 1: {$batches[0]->batchId}";
|
||||
```
|
||||
|
||||
Get Transaction List
|
||||
--------------------
|
||||
|
||||
```PHP
|
||||
$request = new AuthorizeNetTD;
|
||||
$response = $request->getTransactionList($batch_id);
|
||||
$transactions = $response->xpath("transactions/transaction")
|
||||
```
|
||||
|
||||
There are two additional helper methods in the PHP SDK which
|
||||
will make multiple calls to retrieve a day's worth of
|
||||
transactions or a month's worth of batches:
|
||||
|
||||
```PHP
|
||||
getTransactionsForDay($month, $day, $year = false)
|
||||
getSettledBatchListForMonth($month , $year)
|
||||
```
|
||||
|
||||
If you don't pass parameters into these methods they will default
|
||||
to the current day/month.
|
||||
11
vendor/authorizenet/authorizenet/lib/net/authorize/api/constants/ANetEnvironment.php
vendored
Normal file
11
vendor/authorizenet/authorizenet/lib/net/authorize/api/constants/ANetEnvironment.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace net\authorize\api\constants;
|
||||
|
||||
class ANetEnvironment
|
||||
{
|
||||
const CUSTOM = "http://wwww.myendpoint.com";
|
||||
const SANDBOX = "https://apitest.authorize.net";
|
||||
const PRODUCTION = "https://api2.authorize.net";
|
||||
|
||||
const VERSION = "2.0.2";
|
||||
}
|
||||
177
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/ANetApiRequestType.php
vendored
Normal file
177
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/ANetApiRequestType.php
vendored
Normal file
@@ -0,0 +1,177 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing ANetApiRequestType
|
||||
*
|
||||
*
|
||||
* XSD Type: ANetApiRequest
|
||||
*/
|
||||
class ANetApiRequestType implements \JsonSerializable
|
||||
{
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\MerchantAuthenticationType
|
||||
* $merchantAuthentication
|
||||
*/
|
||||
private $merchantAuthentication = null;
|
||||
|
||||
/**
|
||||
* @property string $clientId
|
||||
*/
|
||||
private $clientId = null;
|
||||
|
||||
/**
|
||||
* @property string $refId
|
||||
*/
|
||||
private $refId = null;
|
||||
|
||||
/**
|
||||
* Gets as merchantAuthentication
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\MerchantAuthenticationType
|
||||
*/
|
||||
public function getMerchantAuthentication()
|
||||
{
|
||||
return $this->merchantAuthentication;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new merchantAuthentication
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\MerchantAuthenticationType
|
||||
* $merchantAuthentication
|
||||
* @return self
|
||||
*/
|
||||
public function setMerchantAuthentication(\net\authorize\api\contract\v1\MerchantAuthenticationType $merchantAuthentication)
|
||||
{
|
||||
$this->merchantAuthentication = $merchantAuthentication;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as clientId
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getClientId()
|
||||
{
|
||||
return $this->clientId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new clientId
|
||||
*
|
||||
* @param string $clientId
|
||||
* @return self
|
||||
*/
|
||||
public function setClientId($clientId)
|
||||
{
|
||||
$this->clientId = $clientId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as refId
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getRefId()
|
||||
{
|
||||
return $this->refId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new refId
|
||||
*
|
||||
* @param string $refId
|
||||
* @return self
|
||||
*/
|
||||
public function setRefId($refId)
|
||||
{
|
||||
$this->refId = $refId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
175
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/ANetApiResponseType.php
vendored
Normal file
175
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/ANetApiResponseType.php
vendored
Normal file
@@ -0,0 +1,175 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing ANetApiResponseType
|
||||
*
|
||||
*
|
||||
* XSD Type: ANetApiResponse
|
||||
*/
|
||||
class ANetApiResponseType implements \JsonSerializable
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $refId
|
||||
*/
|
||||
private $refId = null;
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\MessagesType $messages
|
||||
*/
|
||||
private $messages = null;
|
||||
|
||||
/**
|
||||
* @property string $sessionToken
|
||||
*/
|
||||
private $sessionToken = null;
|
||||
|
||||
/**
|
||||
* Gets as refId
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getRefId()
|
||||
{
|
||||
return $this->refId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new refId
|
||||
*
|
||||
* @param string $refId
|
||||
* @return self
|
||||
*/
|
||||
public function setRefId($refId)
|
||||
{
|
||||
$this->refId = $refId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as messages
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\MessagesType
|
||||
*/
|
||||
public function getMessages()
|
||||
{
|
||||
return $this->messages;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new messages
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\MessagesType $messages
|
||||
* @return self
|
||||
*/
|
||||
public function setMessages(\net\authorize\api\contract\v1\MessagesType $messages)
|
||||
{
|
||||
$this->messages = $messages;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as sessionToken
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSessionToken()
|
||||
{
|
||||
return $this->sessionToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new sessionToken
|
||||
*
|
||||
* @param string $sessionToken
|
||||
* @return self
|
||||
*/
|
||||
public function setSessionToken($sessionToken)
|
||||
{
|
||||
$this->sessionToken = $sessionToken;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing ARBCancelSubscriptionRequest
|
||||
*/
|
||||
class ARBCancelSubscriptionRequest extends ANetApiRequestType
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $subscriptionId
|
||||
*/
|
||||
private $subscriptionId = null;
|
||||
|
||||
/**
|
||||
* Gets as subscriptionId
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSubscriptionId()
|
||||
{
|
||||
return $this->subscriptionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new subscriptionId
|
||||
*
|
||||
* @param string $subscriptionId
|
||||
* @return self
|
||||
*/
|
||||
public function setSubscriptionId($subscriptionId)
|
||||
{
|
||||
$this->subscriptionId = $subscriptionId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return array_merge(parent::jsonSerialize(), $values);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing ARBCancelSubscriptionResponse
|
||||
*/
|
||||
class ARBCancelSubscriptionResponse extends ANetApiResponseType
|
||||
{
|
||||
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing ARBCreateSubscriptionRequest
|
||||
*/
|
||||
class ARBCreateSubscriptionRequest extends ANetApiRequestType
|
||||
{
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\ARBSubscriptionType $subscription
|
||||
*/
|
||||
private $subscription = null;
|
||||
|
||||
/**
|
||||
* Gets as subscription
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\ARBSubscriptionType
|
||||
*/
|
||||
public function getSubscription()
|
||||
{
|
||||
return $this->subscription;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new subscription
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\ARBSubscriptionType $subscription
|
||||
* @return self
|
||||
*/
|
||||
public function setSubscription(\net\authorize\api\contract\v1\ARBSubscriptionType $subscription)
|
||||
{
|
||||
$this->subscription = $subscription;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return array_merge(parent::jsonSerialize(), $values);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
115
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/ARBCreateSubscriptionResponse.php
vendored
Normal file
115
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/ARBCreateSubscriptionResponse.php
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing ARBCreateSubscriptionResponse
|
||||
*/
|
||||
class ARBCreateSubscriptionResponse extends ANetApiResponseType
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $subscriptionId
|
||||
*/
|
||||
private $subscriptionId = null;
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\CustomerProfileIdType $profile
|
||||
*/
|
||||
private $profile = null;
|
||||
|
||||
/**
|
||||
* Gets as subscriptionId
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSubscriptionId()
|
||||
{
|
||||
return $this->subscriptionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new subscriptionId
|
||||
*
|
||||
* @param string $subscriptionId
|
||||
* @return self
|
||||
*/
|
||||
public function setSubscriptionId($subscriptionId)
|
||||
{
|
||||
$this->subscriptionId = $subscriptionId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as profile
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\CustomerProfileIdType
|
||||
*/
|
||||
public function getProfile()
|
||||
{
|
||||
return $this->profile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new profile
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\CustomerProfileIdType $profile
|
||||
* @return self
|
||||
*/
|
||||
public function setProfile(\net\authorize\api\contract\v1\CustomerProfileIdType $profile)
|
||||
{
|
||||
$this->profile = $profile;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
125
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/ARBGetSubscriptionListRequest.php
vendored
Normal file
125
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/ARBGetSubscriptionListRequest.php
vendored
Normal file
@@ -0,0 +1,125 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing ARBGetSubscriptionListRequest
|
||||
*/
|
||||
class ARBGetSubscriptionListRequest extends ANetApiRequestType
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $searchType
|
||||
*/
|
||||
private $searchType = null;
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\ARBGetSubscriptionListSortingType
|
||||
* $sorting
|
||||
*/
|
||||
private $sorting = null;
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\PagingType $paging
|
||||
*/
|
||||
private $paging = null;
|
||||
|
||||
/**
|
||||
* Gets as searchType
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSearchType()
|
||||
{
|
||||
return $this->searchType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new searchType
|
||||
*
|
||||
* @param string $searchType
|
||||
* @return self
|
||||
*/
|
||||
public function setSearchType($searchType)
|
||||
{
|
||||
$this->searchType = $searchType;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as sorting
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\ARBGetSubscriptionListSortingType
|
||||
*/
|
||||
public function getSorting()
|
||||
{
|
||||
return $this->sorting;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new sorting
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\ARBGetSubscriptionListSortingType $sorting
|
||||
* @return self
|
||||
*/
|
||||
public function setSorting(\net\authorize\api\contract\v1\ARBGetSubscriptionListSortingType $sorting)
|
||||
{
|
||||
$this->sorting = $sorting;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as paging
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\PagingType
|
||||
*/
|
||||
public function getPaging()
|
||||
{
|
||||
return $this->paging;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new paging
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\PagingType $paging
|
||||
* @return self
|
||||
*/
|
||||
public function setPaging(\net\authorize\api\contract\v1\PagingType $paging)
|
||||
{
|
||||
$this->paging = $paging;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return array_merge(parent::jsonSerialize(), $values);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing ARBGetSubscriptionListResponse
|
||||
*/
|
||||
class ARBGetSubscriptionListResponse extends ANetApiResponseType
|
||||
{
|
||||
|
||||
/**
|
||||
* @property integer $totalNumInResultSet
|
||||
*/
|
||||
private $totalNumInResultSet = null;
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\SubscriptionDetailType[]
|
||||
* $subscriptionDetails
|
||||
*/
|
||||
private $subscriptionDetails = null;
|
||||
|
||||
/**
|
||||
* Gets as totalNumInResultSet
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getTotalNumInResultSet()
|
||||
{
|
||||
return $this->totalNumInResultSet;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new totalNumInResultSet
|
||||
*
|
||||
* @param integer $totalNumInResultSet
|
||||
* @return self
|
||||
*/
|
||||
public function setTotalNumInResultSet($totalNumInResultSet)
|
||||
{
|
||||
$this->totalNumInResultSet = $totalNumInResultSet;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds as subscriptionDetail
|
||||
*
|
||||
* @return self
|
||||
* @param \net\authorize\api\contract\v1\SubscriptionDetailType $subscriptionDetail
|
||||
*/
|
||||
public function addToSubscriptionDetails(\net\authorize\api\contract\v1\SubscriptionDetailType $subscriptionDetail)
|
||||
{
|
||||
$this->subscriptionDetails[] = $subscriptionDetail;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* isset subscriptionDetails
|
||||
*
|
||||
* @param scalar $index
|
||||
* @return boolean
|
||||
*/
|
||||
public function issetSubscriptionDetails($index)
|
||||
{
|
||||
return isset($this->subscriptionDetails[$index]);
|
||||
}
|
||||
|
||||
/**
|
||||
* unset subscriptionDetails
|
||||
*
|
||||
* @param scalar $index
|
||||
* @return void
|
||||
*/
|
||||
public function unsetSubscriptionDetails($index)
|
||||
{
|
||||
unset($this->subscriptionDetails[$index]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as subscriptionDetails
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\SubscriptionDetailType[]
|
||||
*/
|
||||
public function getSubscriptionDetails()
|
||||
{
|
||||
return $this->subscriptionDetails;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new subscriptionDetails
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\SubscriptionDetailType[]
|
||||
* $subscriptionDetails
|
||||
* @return self
|
||||
*/
|
||||
public function setSubscriptionDetails(array $subscriptionDetails)
|
||||
{
|
||||
$this->subscriptionDetails = $subscriptionDetails;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,148 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing ARBGetSubscriptionListSortingType
|
||||
*
|
||||
*
|
||||
* XSD Type: ARBGetSubscriptionListSorting
|
||||
*/
|
||||
class ARBGetSubscriptionListSortingType implements \JsonSerializable
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $orderBy
|
||||
*/
|
||||
private $orderBy = null;
|
||||
|
||||
/**
|
||||
* @property boolean $orderDescending
|
||||
*/
|
||||
private $orderDescending = null;
|
||||
|
||||
/**
|
||||
* Gets as orderBy
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOrderBy()
|
||||
{
|
||||
return $this->orderBy;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new orderBy
|
||||
*
|
||||
* @param string $orderBy
|
||||
* @return self
|
||||
*/
|
||||
public function setOrderBy($orderBy)
|
||||
{
|
||||
$this->orderBy = $orderBy;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as orderDescending
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getOrderDescending()
|
||||
{
|
||||
return $this->orderDescending;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new orderDescending
|
||||
*
|
||||
* @param boolean $orderDescending
|
||||
* @return self
|
||||
*/
|
||||
public function setOrderDescending($orderDescending)
|
||||
{
|
||||
$this->orderDescending = $orderDescending;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
97
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/ARBGetSubscriptionRequest.php
vendored
Normal file
97
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/ARBGetSubscriptionRequest.php
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing ARBGetSubscriptionRequest
|
||||
*/
|
||||
class ARBGetSubscriptionRequest extends ANetApiRequestType
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $subscriptionId
|
||||
*/
|
||||
private $subscriptionId = null;
|
||||
|
||||
/**
|
||||
* @property boolean $includeTransactions
|
||||
*/
|
||||
private $includeTransactions = null;
|
||||
|
||||
/**
|
||||
* Gets as subscriptionId
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSubscriptionId()
|
||||
{
|
||||
return $this->subscriptionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new subscriptionId
|
||||
*
|
||||
* @param string $subscriptionId
|
||||
* @return self
|
||||
*/
|
||||
public function setSubscriptionId($subscriptionId)
|
||||
{
|
||||
$this->subscriptionId = $subscriptionId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as includeTransactions
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getIncludeTransactions()
|
||||
{
|
||||
return $this->includeTransactions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new includeTransactions
|
||||
*
|
||||
* @param boolean $includeTransactions
|
||||
* @return self
|
||||
*/
|
||||
public function setIncludeTransactions($includeTransactions)
|
||||
{
|
||||
$this->includeTransactions = $includeTransactions;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return array_merge(parent::jsonSerialize(), $values);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing ARBGetSubscriptionResponse
|
||||
*/
|
||||
class ARBGetSubscriptionResponse extends ANetApiResponseType
|
||||
{
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\ARBSubscriptionMaskedType $subscription
|
||||
*/
|
||||
private $subscription = null;
|
||||
|
||||
/**
|
||||
* Gets as subscription
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\ARBSubscriptionMaskedType
|
||||
*/
|
||||
public function getSubscription()
|
||||
{
|
||||
return $this->subscription;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new subscription
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\ARBSubscriptionMaskedType $subscription
|
||||
* @return self
|
||||
*/
|
||||
public function setSubscription(\net\authorize\api\contract\v1\ARBSubscriptionMaskedType $subscription)
|
||||
{
|
||||
$this->subscription = $subscription;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing ARBGetSubscriptionStatusRequest
|
||||
*/
|
||||
class ARBGetSubscriptionStatusRequest extends ANetApiRequestType
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $subscriptionId
|
||||
*/
|
||||
private $subscriptionId = null;
|
||||
|
||||
/**
|
||||
* Gets as subscriptionId
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSubscriptionId()
|
||||
{
|
||||
return $this->subscriptionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new subscriptionId
|
||||
*
|
||||
* @param string $subscriptionId
|
||||
* @return self
|
||||
*/
|
||||
public function setSubscriptionId($subscriptionId)
|
||||
{
|
||||
$this->subscriptionId = $subscriptionId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return array_merge(parent::jsonSerialize(), $values);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing ARBGetSubscriptionStatusResponse
|
||||
*/
|
||||
class ARBGetSubscriptionStatusResponse extends ANetApiResponseType
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $status
|
||||
*/
|
||||
private $status = null;
|
||||
|
||||
/**
|
||||
* Gets as status
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getStatus()
|
||||
{
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new status
|
||||
*
|
||||
* @param string $status
|
||||
* @return self
|
||||
*/
|
||||
public function setStatus($status)
|
||||
{
|
||||
$this->status = $status;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
345
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/ARBSubscriptionMaskedType.php
vendored
Normal file
345
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/ARBSubscriptionMaskedType.php
vendored
Normal file
@@ -0,0 +1,345 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing ARBSubscriptionMaskedType
|
||||
*
|
||||
*
|
||||
* XSD Type: ARBSubscriptionMaskedType
|
||||
*/
|
||||
class ARBSubscriptionMaskedType implements \JsonSerializable
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $name
|
||||
*/
|
||||
private $name = null;
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\PaymentScheduleType $paymentSchedule
|
||||
*/
|
||||
private $paymentSchedule = null;
|
||||
|
||||
/**
|
||||
* @property float $amount
|
||||
*/
|
||||
private $amount = null;
|
||||
|
||||
/**
|
||||
* @property float $trialAmount
|
||||
*/
|
||||
private $trialAmount = null;
|
||||
|
||||
/**
|
||||
* @property string $status
|
||||
*/
|
||||
private $status = null;
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\SubscriptionCustomerProfileType
|
||||
* $profile
|
||||
*/
|
||||
private $profile = null;
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\OrderType $order
|
||||
*/
|
||||
private $order = null;
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\ArbTransactionType[] $arbTransactions
|
||||
*/
|
||||
private $arbTransactions = null;
|
||||
|
||||
/**
|
||||
* Gets as name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new name
|
||||
*
|
||||
* @param string $name
|
||||
* @return self
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as paymentSchedule
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\PaymentScheduleType
|
||||
*/
|
||||
public function getPaymentSchedule()
|
||||
{
|
||||
return $this->paymentSchedule;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new paymentSchedule
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\PaymentScheduleType $paymentSchedule
|
||||
* @return self
|
||||
*/
|
||||
public function setPaymentSchedule(\net\authorize\api\contract\v1\PaymentScheduleType $paymentSchedule)
|
||||
{
|
||||
$this->paymentSchedule = $paymentSchedule;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as amount
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getAmount()
|
||||
{
|
||||
return $this->amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new amount
|
||||
*
|
||||
* @param float $amount
|
||||
* @return self
|
||||
*/
|
||||
public function setAmount($amount)
|
||||
{
|
||||
$this->amount = $amount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as trialAmount
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getTrialAmount()
|
||||
{
|
||||
return $this->trialAmount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new trialAmount
|
||||
*
|
||||
* @param float $trialAmount
|
||||
* @return self
|
||||
*/
|
||||
public function setTrialAmount($trialAmount)
|
||||
{
|
||||
$this->trialAmount = $trialAmount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as status
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getStatus()
|
||||
{
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new status
|
||||
*
|
||||
* @param string $status
|
||||
* @return self
|
||||
*/
|
||||
public function setStatus($status)
|
||||
{
|
||||
$this->status = $status;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as profile
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\SubscriptionCustomerProfileType
|
||||
*/
|
||||
public function getProfile()
|
||||
{
|
||||
return $this->profile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new profile
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\SubscriptionCustomerProfileType $profile
|
||||
* @return self
|
||||
*/
|
||||
public function setProfile(\net\authorize\api\contract\v1\SubscriptionCustomerProfileType $profile)
|
||||
{
|
||||
$this->profile = $profile;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as order
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\OrderType
|
||||
*/
|
||||
public function getOrder()
|
||||
{
|
||||
return $this->order;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new order
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\OrderType $order
|
||||
* @return self
|
||||
*/
|
||||
public function setOrder(\net\authorize\api\contract\v1\OrderType $order)
|
||||
{
|
||||
$this->order = $order;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds as arbTransaction
|
||||
*
|
||||
* @return self
|
||||
* @param \net\authorize\api\contract\v1\ArbTransactionType $arbTransaction
|
||||
*/
|
||||
public function addToArbTransactions(\net\authorize\api\contract\v1\ArbTransactionType $arbTransaction)
|
||||
{
|
||||
$this->arbTransactions[] = $arbTransaction;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* isset arbTransactions
|
||||
*
|
||||
* @param scalar $index
|
||||
* @return boolean
|
||||
*/
|
||||
public function issetArbTransactions($index)
|
||||
{
|
||||
return isset($this->arbTransactions[$index]);
|
||||
}
|
||||
|
||||
/**
|
||||
* unset arbTransactions
|
||||
*
|
||||
* @param scalar $index
|
||||
* @return void
|
||||
*/
|
||||
public function unsetArbTransactions($index)
|
||||
{
|
||||
unset($this->arbTransactions[$index]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as arbTransactions
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\ArbTransactionType[]
|
||||
*/
|
||||
public function getArbTransactions()
|
||||
{
|
||||
return $this->arbTransactions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new arbTransactions
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\ArbTransactionType[] $arbTransactions
|
||||
* @return self
|
||||
*/
|
||||
public function setArbTransactions(array $arbTransactions)
|
||||
{
|
||||
$this->arbTransactions = $arbTransactions;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
364
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/ARBSubscriptionType.php
vendored
Normal file
364
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/ARBSubscriptionType.php
vendored
Normal file
@@ -0,0 +1,364 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing ARBSubscriptionType
|
||||
*
|
||||
*
|
||||
* XSD Type: ARBSubscriptionType
|
||||
*/
|
||||
class ARBSubscriptionType implements \JsonSerializable
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $name
|
||||
*/
|
||||
private $name = null;
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\PaymentScheduleType $paymentSchedule
|
||||
*/
|
||||
private $paymentSchedule = null;
|
||||
|
||||
/**
|
||||
* @property float $amount
|
||||
*/
|
||||
private $amount = null;
|
||||
|
||||
/**
|
||||
* @property float $trialAmount
|
||||
*/
|
||||
private $trialAmount = null;
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\PaymentType $payment
|
||||
*/
|
||||
private $payment = null;
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\OrderType $order
|
||||
*/
|
||||
private $order = null;
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\CustomerType $customer
|
||||
*/
|
||||
private $customer = null;
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\NameAndAddressType $billTo
|
||||
*/
|
||||
private $billTo = null;
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\NameAndAddressType $shipTo
|
||||
*/
|
||||
private $shipTo = null;
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\CustomerProfileIdType $profile
|
||||
*/
|
||||
private $profile = null;
|
||||
|
||||
/**
|
||||
* Gets as name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new name
|
||||
*
|
||||
* @param string $name
|
||||
* @return self
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as paymentSchedule
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\PaymentScheduleType
|
||||
*/
|
||||
public function getPaymentSchedule()
|
||||
{
|
||||
return $this->paymentSchedule;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new paymentSchedule
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\PaymentScheduleType $paymentSchedule
|
||||
* @return self
|
||||
*/
|
||||
public function setPaymentSchedule(\net\authorize\api\contract\v1\PaymentScheduleType $paymentSchedule)
|
||||
{
|
||||
$this->paymentSchedule = $paymentSchedule;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as amount
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getAmount()
|
||||
{
|
||||
return $this->amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new amount
|
||||
*
|
||||
* @param float $amount
|
||||
* @return self
|
||||
*/
|
||||
public function setAmount($amount)
|
||||
{
|
||||
$this->amount = $amount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as trialAmount
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getTrialAmount()
|
||||
{
|
||||
return $this->trialAmount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new trialAmount
|
||||
*
|
||||
* @param float $trialAmount
|
||||
* @return self
|
||||
*/
|
||||
public function setTrialAmount($trialAmount)
|
||||
{
|
||||
$this->trialAmount = $trialAmount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as payment
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\PaymentType
|
||||
*/
|
||||
public function getPayment()
|
||||
{
|
||||
return $this->payment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new payment
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\PaymentType $payment
|
||||
* @return self
|
||||
*/
|
||||
public function setPayment(\net\authorize\api\contract\v1\PaymentType $payment)
|
||||
{
|
||||
$this->payment = $payment;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as order
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\OrderType
|
||||
*/
|
||||
public function getOrder()
|
||||
{
|
||||
return $this->order;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new order
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\OrderType $order
|
||||
* @return self
|
||||
*/
|
||||
public function setOrder(\net\authorize\api\contract\v1\OrderType $order)
|
||||
{
|
||||
$this->order = $order;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as customer
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\CustomerType
|
||||
*/
|
||||
public function getCustomer()
|
||||
{
|
||||
return $this->customer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new customer
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\CustomerType $customer
|
||||
* @return self
|
||||
*/
|
||||
public function setCustomer(\net\authorize\api\contract\v1\CustomerType $customer)
|
||||
{
|
||||
$this->customer = $customer;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as billTo
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\NameAndAddressType
|
||||
*/
|
||||
public function getBillTo()
|
||||
{
|
||||
return $this->billTo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new billTo
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\NameAndAddressType $billTo
|
||||
* @return self
|
||||
*/
|
||||
public function setBillTo(\net\authorize\api\contract\v1\NameAndAddressType $billTo)
|
||||
{
|
||||
$this->billTo = $billTo;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as shipTo
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\NameAndAddressType
|
||||
*/
|
||||
public function getShipTo()
|
||||
{
|
||||
return $this->shipTo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new shipTo
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\NameAndAddressType $shipTo
|
||||
* @return self
|
||||
*/
|
||||
public function setShipTo(\net\authorize\api\contract\v1\NameAndAddressType $shipTo)
|
||||
{
|
||||
$this->shipTo = $shipTo;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as profile
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\CustomerProfileIdType
|
||||
*/
|
||||
public function getProfile()
|
||||
{
|
||||
return $this->profile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new profile
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\CustomerProfileIdType $profile
|
||||
* @return self
|
||||
*/
|
||||
public function setProfile(\net\authorize\api\contract\v1\CustomerProfileIdType $profile)
|
||||
{
|
||||
$this->profile = $profile;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing ARBUpdateSubscriptionRequest
|
||||
*/
|
||||
class ARBUpdateSubscriptionRequest extends ANetApiRequestType
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $subscriptionId
|
||||
*/
|
||||
private $subscriptionId = null;
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\ARBSubscriptionType $subscription
|
||||
*/
|
||||
private $subscription = null;
|
||||
|
||||
/**
|
||||
* Gets as subscriptionId
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSubscriptionId()
|
||||
{
|
||||
return $this->subscriptionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new subscriptionId
|
||||
*
|
||||
* @param string $subscriptionId
|
||||
* @return self
|
||||
*/
|
||||
public function setSubscriptionId($subscriptionId)
|
||||
{
|
||||
$this->subscriptionId = $subscriptionId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as subscription
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\ARBSubscriptionType
|
||||
*/
|
||||
public function getSubscription()
|
||||
{
|
||||
return $this->subscription;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new subscription
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\ARBSubscriptionType $subscription
|
||||
* @return self
|
||||
*/
|
||||
public function setSubscription(\net\authorize\api\contract\v1\ARBSubscriptionType $subscription)
|
||||
{
|
||||
$this->subscription = $subscription;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return array_merge(parent::jsonSerialize(), $values);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing ARBUpdateSubscriptionResponse
|
||||
*/
|
||||
class ARBUpdateSubscriptionResponse extends ANetApiResponseType
|
||||
{
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\CustomerProfileIdType $profile
|
||||
*/
|
||||
private $profile = null;
|
||||
|
||||
/**
|
||||
* Gets as profile
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\CustomerProfileIdType
|
||||
*/
|
||||
public function getProfile()
|
||||
{
|
||||
return $this->profile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new profile
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\CustomerProfileIdType $profile
|
||||
* @return self
|
||||
*/
|
||||
public function setProfile(\net\authorize\api\contract\v1\CustomerProfileIdType $profile)
|
||||
{
|
||||
$this->profile = $profile;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
229
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/ArbTransactionType.php
vendored
Normal file
229
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/ArbTransactionType.php
vendored
Normal file
@@ -0,0 +1,229 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing ArbTransactionType
|
||||
*
|
||||
*
|
||||
* XSD Type: arbTransaction
|
||||
*/
|
||||
class ArbTransactionType implements \JsonSerializable
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $transId
|
||||
*/
|
||||
private $transId = null;
|
||||
|
||||
/**
|
||||
* @property string $response
|
||||
*/
|
||||
private $response = null;
|
||||
|
||||
/**
|
||||
* @property \DateTime $submitTimeUTC
|
||||
*/
|
||||
private $submitTimeUTC = null;
|
||||
|
||||
/**
|
||||
* @property integer $payNum
|
||||
*/
|
||||
private $payNum = null;
|
||||
|
||||
/**
|
||||
* @property integer $attemptNum
|
||||
*/
|
||||
private $attemptNum = null;
|
||||
|
||||
/**
|
||||
* Gets as transId
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTransId()
|
||||
{
|
||||
return $this->transId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new transId
|
||||
*
|
||||
* @param string $transId
|
||||
* @return self
|
||||
*/
|
||||
public function setTransId($transId)
|
||||
{
|
||||
$this->transId = $transId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as response
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getResponse()
|
||||
{
|
||||
return $this->response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new response
|
||||
*
|
||||
* @param string $response
|
||||
* @return self
|
||||
*/
|
||||
public function setResponse($response)
|
||||
{
|
||||
$this->response = $response;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as submitTimeUTC
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getSubmitTimeUTC()
|
||||
{
|
||||
return $this->submitTimeUTC;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new submitTimeUTC
|
||||
*
|
||||
* @param \DateTime $submitTimeUTC
|
||||
* @return self
|
||||
*/
|
||||
public function setSubmitTimeUTC(\DateTime $submitTimeUTC)
|
||||
{
|
||||
$this->submitTimeUTC = $submitTimeUTC;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as payNum
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getPayNum()
|
||||
{
|
||||
return $this->payNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new payNum
|
||||
*
|
||||
* @param integer $payNum
|
||||
* @return self
|
||||
*/
|
||||
public function setPayNum($payNum)
|
||||
{
|
||||
$this->payNum = $payNum;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as attemptNum
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getAttemptNum()
|
||||
{
|
||||
return $this->attemptNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new attemptNum
|
||||
*
|
||||
* @param integer $attemptNum
|
||||
* @return self
|
||||
*/
|
||||
public function setAttemptNum($attemptNum)
|
||||
{
|
||||
$this->attemptNum = $attemptNum;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
155
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/ArrayOfSettingType.php
vendored
Normal file
155
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/ArrayOfSettingType.php
vendored
Normal file
@@ -0,0 +1,155 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing ArrayOfSettingType
|
||||
*
|
||||
*
|
||||
* XSD Type: ArrayOfSetting
|
||||
*/
|
||||
class ArrayOfSettingType implements \JsonSerializable
|
||||
{
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\SettingType[] $setting
|
||||
*/
|
||||
private $setting = null;
|
||||
|
||||
/**
|
||||
* Adds as setting
|
||||
*
|
||||
* @return self
|
||||
* @param \net\authorize\api\contract\v1\SettingType $setting
|
||||
*/
|
||||
public function addToSetting(\net\authorize\api\contract\v1\SettingType $setting)
|
||||
{
|
||||
$this->setting[] = $setting;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* isset setting
|
||||
*
|
||||
* @param scalar $index
|
||||
* @return boolean
|
||||
*/
|
||||
public function issetSetting($index)
|
||||
{
|
||||
return isset($this->setting[$index]);
|
||||
}
|
||||
|
||||
/**
|
||||
* unset setting
|
||||
*
|
||||
* @param scalar $index
|
||||
* @return void
|
||||
*/
|
||||
public function unsetSetting($index)
|
||||
{
|
||||
unset($this->setting[$index]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as setting
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\SettingType[]
|
||||
*/
|
||||
public function getSetting()
|
||||
{
|
||||
return $this->setting;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new setting
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\SettingType[] $setting
|
||||
* @return self
|
||||
*/
|
||||
public function setSetting(array $setting)
|
||||
{
|
||||
$this->setting = $setting;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
121
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/AuDeleteType.php
vendored
Normal file
121
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/AuDeleteType.php
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing AuDeleteType
|
||||
*
|
||||
*
|
||||
* XSD Type: auDeleteType
|
||||
*/
|
||||
class AuDeleteType extends AuDetailsType implements \JsonSerializable
|
||||
{
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\CreditCardMaskedType $creditCard
|
||||
*/
|
||||
private $creditCard = null;
|
||||
|
||||
/**
|
||||
* Gets as creditCard
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\CreditCardMaskedType
|
||||
*/
|
||||
public function getCreditCard()
|
||||
{
|
||||
return $this->creditCard;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new creditCard
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\CreditCardMaskedType $creditCard
|
||||
* @return self
|
||||
*/
|
||||
public function setCreditCard(\net\authorize\api\contract\v1\CreditCardMaskedType $creditCard)
|
||||
{
|
||||
$this->creditCard = $creditCard;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return array_merge(parent::jsonSerialize(), $values);
|
||||
}
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
283
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/AuDetailsType.php
vendored
Normal file
283
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/AuDetailsType.php
vendored
Normal file
@@ -0,0 +1,283 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing AuDetailsType
|
||||
*
|
||||
*
|
||||
* XSD Type: auDetailsType
|
||||
*/
|
||||
class AuDetailsType implements \JsonSerializable
|
||||
{
|
||||
|
||||
/**
|
||||
* @property integer $customerProfileID
|
||||
*/
|
||||
private $customerProfileID = null;
|
||||
|
||||
/**
|
||||
* @property integer $customerPaymentProfileID
|
||||
*/
|
||||
private $customerPaymentProfileID = null;
|
||||
|
||||
/**
|
||||
* @property string $firstName
|
||||
*/
|
||||
private $firstName = null;
|
||||
|
||||
/**
|
||||
* @property string $lastName
|
||||
*/
|
||||
private $lastName = null;
|
||||
|
||||
/**
|
||||
* @property string $updateTimeUTC
|
||||
*/
|
||||
private $updateTimeUTC = null;
|
||||
|
||||
/**
|
||||
* @property string $auReasonCode
|
||||
*/
|
||||
private $auReasonCode = null;
|
||||
|
||||
/**
|
||||
* @property string $reasonDescription
|
||||
*/
|
||||
private $reasonDescription = null;
|
||||
|
||||
/**
|
||||
* Gets as customerProfileID
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getCustomerProfileID()
|
||||
{
|
||||
return $this->customerProfileID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new customerProfileID
|
||||
*
|
||||
* @param integer $customerProfileID
|
||||
* @return self
|
||||
*/
|
||||
public function setCustomerProfileID($customerProfileID)
|
||||
{
|
||||
$this->customerProfileID = $customerProfileID;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as customerPaymentProfileID
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getCustomerPaymentProfileID()
|
||||
{
|
||||
return $this->customerPaymentProfileID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new customerPaymentProfileID
|
||||
*
|
||||
* @param integer $customerPaymentProfileID
|
||||
* @return self
|
||||
*/
|
||||
public function setCustomerPaymentProfileID($customerPaymentProfileID)
|
||||
{
|
||||
$this->customerPaymentProfileID = $customerPaymentProfileID;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as firstName
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFirstName()
|
||||
{
|
||||
return $this->firstName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new firstName
|
||||
*
|
||||
* @param string $firstName
|
||||
* @return self
|
||||
*/
|
||||
public function setFirstName($firstName)
|
||||
{
|
||||
$this->firstName = $firstName;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as lastName
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getLastName()
|
||||
{
|
||||
return $this->lastName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new lastName
|
||||
*
|
||||
* @param string $lastName
|
||||
* @return self
|
||||
*/
|
||||
public function setLastName($lastName)
|
||||
{
|
||||
$this->lastName = $lastName;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as updateTimeUTC
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUpdateTimeUTC()
|
||||
{
|
||||
return $this->updateTimeUTC;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new updateTimeUTC
|
||||
*
|
||||
* @param string $updateTimeUTC
|
||||
* @return self
|
||||
*/
|
||||
public function setUpdateTimeUTC($updateTimeUTC)
|
||||
{
|
||||
$this->updateTimeUTC = $updateTimeUTC;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as auReasonCode
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAuReasonCode()
|
||||
{
|
||||
return $this->auReasonCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new auReasonCode
|
||||
*
|
||||
* @param string $auReasonCode
|
||||
* @return self
|
||||
*/
|
||||
public function setAuReasonCode($auReasonCode)
|
||||
{
|
||||
$this->auReasonCode = $auReasonCode;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as reasonDescription
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getReasonDescription()
|
||||
{
|
||||
return $this->reasonDescription;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new reasonDescription
|
||||
*
|
||||
* @param string $reasonDescription
|
||||
* @return self
|
||||
*/
|
||||
public function setReasonDescription($reasonDescription)
|
||||
{
|
||||
$this->reasonDescription = $reasonDescription;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
175
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/AuResponseType.php
vendored
Normal file
175
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/AuResponseType.php
vendored
Normal file
@@ -0,0 +1,175 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing AuResponseType
|
||||
*
|
||||
*
|
||||
* XSD Type: auResponseType
|
||||
*/
|
||||
class AuResponseType implements \JsonSerializable
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $auReasonCode
|
||||
*/
|
||||
private $auReasonCode = null;
|
||||
|
||||
/**
|
||||
* @property integer $profileCount
|
||||
*/
|
||||
private $profileCount = null;
|
||||
|
||||
/**
|
||||
* @property string $reasonDescription
|
||||
*/
|
||||
private $reasonDescription = null;
|
||||
|
||||
/**
|
||||
* Gets as auReasonCode
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAuReasonCode()
|
||||
{
|
||||
return $this->auReasonCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new auReasonCode
|
||||
*
|
||||
* @param string $auReasonCode
|
||||
* @return self
|
||||
*/
|
||||
public function setAuReasonCode($auReasonCode)
|
||||
{
|
||||
$this->auReasonCode = $auReasonCode;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as profileCount
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getProfileCount()
|
||||
{
|
||||
return $this->profileCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new profileCount
|
||||
*
|
||||
* @param integer $profileCount
|
||||
* @return self
|
||||
*/
|
||||
public function setProfileCount($profileCount)
|
||||
{
|
||||
$this->profileCount = $profileCount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as reasonDescription
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getReasonDescription()
|
||||
{
|
||||
return $this->reasonDescription;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new reasonDescription
|
||||
*
|
||||
* @param string $reasonDescription
|
||||
* @return self
|
||||
*/
|
||||
public function setReasonDescription($reasonDescription)
|
||||
{
|
||||
$this->reasonDescription = $reasonDescription;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
148
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/AuUpdateType.php
vendored
Normal file
148
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/AuUpdateType.php
vendored
Normal file
@@ -0,0 +1,148 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing AuUpdateType
|
||||
*
|
||||
*
|
||||
* XSD Type: auUpdateType
|
||||
*/
|
||||
class AuUpdateType extends AuDetailsType implements \JsonSerializable
|
||||
{
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\CreditCardMaskedType $newCreditCard
|
||||
*/
|
||||
private $newCreditCard = null;
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\CreditCardMaskedType $oldCreditCard
|
||||
*/
|
||||
private $oldCreditCard = null;
|
||||
|
||||
/**
|
||||
* Gets as newCreditCard
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\CreditCardMaskedType
|
||||
*/
|
||||
public function getNewCreditCard()
|
||||
{
|
||||
return $this->newCreditCard;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new newCreditCard
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\CreditCardMaskedType $newCreditCard
|
||||
* @return self
|
||||
*/
|
||||
public function setNewCreditCard(\net\authorize\api\contract\v1\CreditCardMaskedType $newCreditCard)
|
||||
{
|
||||
$this->newCreditCard = $newCreditCard;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as oldCreditCard
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\CreditCardMaskedType
|
||||
*/
|
||||
public function getOldCreditCard()
|
||||
{
|
||||
return $this->oldCreditCard;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new oldCreditCard
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\CreditCardMaskedType $oldCreditCard
|
||||
* @return self
|
||||
*/
|
||||
public function setOldCreditCard(\net\authorize\api\contract\v1\CreditCardMaskedType $oldCreditCard)
|
||||
{
|
||||
$this->oldCreditCard = $oldCreditCard;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return array_merge(parent::jsonSerialize(), $values);
|
||||
}
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
43
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/AuthenticateTestRequest.php
vendored
Normal file
43
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/AuthenticateTestRequest.php
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing AuthenticateTestRequest
|
||||
*/
|
||||
class AuthenticateTestRequest extends ANetApiRequestType
|
||||
{
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return array_merge(parent::jsonSerialize(), $values);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
61
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/AuthenticateTestResponse.php
vendored
Normal file
61
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/AuthenticateTestResponse.php
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing AuthenticateTestResponse
|
||||
*/
|
||||
class AuthenticateTestResponse extends ANetApiResponseType
|
||||
{
|
||||
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
121
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/AuthorizationIndicatorType.php
vendored
Normal file
121
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/AuthorizationIndicatorType.php
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing AuthorizationIndicatorType
|
||||
*
|
||||
*
|
||||
* XSD Type: authorizationIndicatorType
|
||||
*/
|
||||
class AuthorizationIndicatorType implements \JsonSerializable
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $authorizationIndicator
|
||||
*/
|
||||
private $authorizationIndicator = null;
|
||||
|
||||
/**
|
||||
* Gets as authorizationIndicator
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAuthorizationIndicator()
|
||||
{
|
||||
return $this->authorizationIndicator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new authorizationIndicator
|
||||
*
|
||||
* @param string $authorizationIndicator
|
||||
* @return self
|
||||
*/
|
||||
public function setAuthorizationIndicator($authorizationIndicator)
|
||||
{
|
||||
$this->authorizationIndicator = $authorizationIndicator;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
256
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/BankAccountMaskedType.php
vendored
Normal file
256
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/BankAccountMaskedType.php
vendored
Normal file
@@ -0,0 +1,256 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing BankAccountMaskedType
|
||||
*
|
||||
*
|
||||
* XSD Type: bankAccountMaskedType
|
||||
*/
|
||||
class BankAccountMaskedType implements \JsonSerializable
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $accountType
|
||||
*/
|
||||
private $accountType = null;
|
||||
|
||||
/**
|
||||
* @property string $routingNumber
|
||||
*/
|
||||
private $routingNumber = null;
|
||||
|
||||
/**
|
||||
* @property string $accountNumber
|
||||
*/
|
||||
private $accountNumber = null;
|
||||
|
||||
/**
|
||||
* @property string $nameOnAccount
|
||||
*/
|
||||
private $nameOnAccount = null;
|
||||
|
||||
/**
|
||||
* @property string $echeckType
|
||||
*/
|
||||
private $echeckType = null;
|
||||
|
||||
/**
|
||||
* @property string $bankName
|
||||
*/
|
||||
private $bankName = null;
|
||||
|
||||
/**
|
||||
* Gets as accountType
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAccountType()
|
||||
{
|
||||
return $this->accountType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new accountType
|
||||
*
|
||||
* @param string $accountType
|
||||
* @return self
|
||||
*/
|
||||
public function setAccountType($accountType)
|
||||
{
|
||||
$this->accountType = $accountType;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as routingNumber
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getRoutingNumber()
|
||||
{
|
||||
return $this->routingNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new routingNumber
|
||||
*
|
||||
* @param string $routingNumber
|
||||
* @return self
|
||||
*/
|
||||
public function setRoutingNumber($routingNumber)
|
||||
{
|
||||
$this->routingNumber = $routingNumber;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as accountNumber
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAccountNumber()
|
||||
{
|
||||
return $this->accountNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new accountNumber
|
||||
*
|
||||
* @param string $accountNumber
|
||||
* @return self
|
||||
*/
|
||||
public function setAccountNumber($accountNumber)
|
||||
{
|
||||
$this->accountNumber = $accountNumber;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as nameOnAccount
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getNameOnAccount()
|
||||
{
|
||||
return $this->nameOnAccount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new nameOnAccount
|
||||
*
|
||||
* @param string $nameOnAccount
|
||||
* @return self
|
||||
*/
|
||||
public function setNameOnAccount($nameOnAccount)
|
||||
{
|
||||
$this->nameOnAccount = $nameOnAccount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as echeckType
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getEcheckType()
|
||||
{
|
||||
return $this->echeckType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new echeckType
|
||||
*
|
||||
* @param string $echeckType
|
||||
* @return self
|
||||
*/
|
||||
public function setEcheckType($echeckType)
|
||||
{
|
||||
$this->echeckType = $echeckType;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as bankName
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBankName()
|
||||
{
|
||||
return $this->bankName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new bankName
|
||||
*
|
||||
* @param string $bankName
|
||||
* @return self
|
||||
*/
|
||||
public function setBankName($bankName)
|
||||
{
|
||||
$this->bankName = $bankName;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
283
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/BankAccountType.php
vendored
Normal file
283
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/BankAccountType.php
vendored
Normal file
@@ -0,0 +1,283 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing BankAccountType
|
||||
*
|
||||
*
|
||||
* XSD Type: bankAccountType
|
||||
*/
|
||||
class BankAccountType implements \JsonSerializable
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $accountType
|
||||
*/
|
||||
private $accountType = null;
|
||||
|
||||
/**
|
||||
* @property string $routingNumber
|
||||
*/
|
||||
private $routingNumber = null;
|
||||
|
||||
/**
|
||||
* @property string $accountNumber
|
||||
*/
|
||||
private $accountNumber = null;
|
||||
|
||||
/**
|
||||
* @property string $nameOnAccount
|
||||
*/
|
||||
private $nameOnAccount = null;
|
||||
|
||||
/**
|
||||
* @property string $echeckType
|
||||
*/
|
||||
private $echeckType = null;
|
||||
|
||||
/**
|
||||
* @property string $bankName
|
||||
*/
|
||||
private $bankName = null;
|
||||
|
||||
/**
|
||||
* @property string $checkNumber
|
||||
*/
|
||||
private $checkNumber = null;
|
||||
|
||||
/**
|
||||
* Gets as accountType
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAccountType()
|
||||
{
|
||||
return $this->accountType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new accountType
|
||||
*
|
||||
* @param string $accountType
|
||||
* @return self
|
||||
*/
|
||||
public function setAccountType($accountType)
|
||||
{
|
||||
$this->accountType = $accountType;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as routingNumber
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getRoutingNumber()
|
||||
{
|
||||
return $this->routingNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new routingNumber
|
||||
*
|
||||
* @param string $routingNumber
|
||||
* @return self
|
||||
*/
|
||||
public function setRoutingNumber($routingNumber)
|
||||
{
|
||||
$this->routingNumber = $routingNumber;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as accountNumber
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAccountNumber()
|
||||
{
|
||||
return $this->accountNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new accountNumber
|
||||
*
|
||||
* @param string $accountNumber
|
||||
* @return self
|
||||
*/
|
||||
public function setAccountNumber($accountNumber)
|
||||
{
|
||||
$this->accountNumber = $accountNumber;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as nameOnAccount
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getNameOnAccount()
|
||||
{
|
||||
return $this->nameOnAccount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new nameOnAccount
|
||||
*
|
||||
* @param string $nameOnAccount
|
||||
* @return self
|
||||
*/
|
||||
public function setNameOnAccount($nameOnAccount)
|
||||
{
|
||||
$this->nameOnAccount = $nameOnAccount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as echeckType
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getEcheckType()
|
||||
{
|
||||
return $this->echeckType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new echeckType
|
||||
*
|
||||
* @param string $echeckType
|
||||
* @return self
|
||||
*/
|
||||
public function setEcheckType($echeckType)
|
||||
{
|
||||
$this->echeckType = $echeckType;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as bankName
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBankName()
|
||||
{
|
||||
return $this->bankName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new bankName
|
||||
*
|
||||
* @param string $bankName
|
||||
* @return self
|
||||
*/
|
||||
public function setBankName($bankName)
|
||||
{
|
||||
$this->bankName = $bankName;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as checkNumber
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCheckNumber()
|
||||
{
|
||||
return $this->checkNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new checkNumber
|
||||
*
|
||||
* @param string $checkNumber
|
||||
* @return self
|
||||
*/
|
||||
public function setCheckNumber($checkNumber)
|
||||
{
|
||||
$this->checkNumber = $checkNumber;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
344
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/BatchDetailsType.php
vendored
Normal file
344
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/BatchDetailsType.php
vendored
Normal file
@@ -0,0 +1,344 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing BatchDetailsType
|
||||
*
|
||||
*
|
||||
* XSD Type: batchDetailsType
|
||||
*/
|
||||
class BatchDetailsType implements \JsonSerializable
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $batchId
|
||||
*/
|
||||
private $batchId = null;
|
||||
|
||||
/**
|
||||
* @property \DateTime $settlementTimeUTC
|
||||
*/
|
||||
private $settlementTimeUTC = null;
|
||||
|
||||
/**
|
||||
* @property \DateTime $settlementTimeLocal
|
||||
*/
|
||||
private $settlementTimeLocal = null;
|
||||
|
||||
/**
|
||||
* @property string $settlementState
|
||||
*/
|
||||
private $settlementState = null;
|
||||
|
||||
/**
|
||||
* @property string $paymentMethod
|
||||
*/
|
||||
private $paymentMethod = null;
|
||||
|
||||
/**
|
||||
* @property string $marketType
|
||||
*/
|
||||
private $marketType = null;
|
||||
|
||||
/**
|
||||
* @property string $product
|
||||
*/
|
||||
private $product = null;
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\BatchStatisticType[] $statistics
|
||||
*/
|
||||
private $statistics = null;
|
||||
|
||||
/**
|
||||
* Gets as batchId
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBatchId()
|
||||
{
|
||||
return $this->batchId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new batchId
|
||||
*
|
||||
* @param string $batchId
|
||||
* @return self
|
||||
*/
|
||||
public function setBatchId($batchId)
|
||||
{
|
||||
$this->batchId = $batchId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as settlementTimeUTC
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getSettlementTimeUTC()
|
||||
{
|
||||
return $this->settlementTimeUTC;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new settlementTimeUTC
|
||||
*
|
||||
* @param \DateTime $settlementTimeUTC
|
||||
* @return self
|
||||
*/
|
||||
public function setSettlementTimeUTC(\DateTime $settlementTimeUTC)
|
||||
{
|
||||
$this->settlementTimeUTC = $settlementTimeUTC;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as settlementTimeLocal
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getSettlementTimeLocal()
|
||||
{
|
||||
return $this->settlementTimeLocal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new settlementTimeLocal
|
||||
*
|
||||
* @param \DateTime $settlementTimeLocal
|
||||
* @return self
|
||||
*/
|
||||
public function setSettlementTimeLocal(\DateTime $settlementTimeLocal)
|
||||
{
|
||||
$this->settlementTimeLocal = $settlementTimeLocal;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as settlementState
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSettlementState()
|
||||
{
|
||||
return $this->settlementState;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new settlementState
|
||||
*
|
||||
* @param string $settlementState
|
||||
* @return self
|
||||
*/
|
||||
public function setSettlementState($settlementState)
|
||||
{
|
||||
$this->settlementState = $settlementState;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as paymentMethod
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPaymentMethod()
|
||||
{
|
||||
return $this->paymentMethod;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new paymentMethod
|
||||
*
|
||||
* @param string $paymentMethod
|
||||
* @return self
|
||||
*/
|
||||
public function setPaymentMethod($paymentMethod)
|
||||
{
|
||||
$this->paymentMethod = $paymentMethod;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as marketType
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMarketType()
|
||||
{
|
||||
return $this->marketType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new marketType
|
||||
*
|
||||
* @param string $marketType
|
||||
* @return self
|
||||
*/
|
||||
public function setMarketType($marketType)
|
||||
{
|
||||
$this->marketType = $marketType;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as product
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getProduct()
|
||||
{
|
||||
return $this->product;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new product
|
||||
*
|
||||
* @param string $product
|
||||
* @return self
|
||||
*/
|
||||
public function setProduct($product)
|
||||
{
|
||||
$this->product = $product;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds as statistic
|
||||
*
|
||||
* @return self
|
||||
* @param \net\authorize\api\contract\v1\BatchStatisticType $statistic
|
||||
*/
|
||||
public function addToStatistics(\net\authorize\api\contract\v1\BatchStatisticType $statistic)
|
||||
{
|
||||
$this->statistics[] = $statistic;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* isset statistics
|
||||
*
|
||||
* @param scalar $index
|
||||
* @return boolean
|
||||
*/
|
||||
public function issetStatistics($index)
|
||||
{
|
||||
return isset($this->statistics[$index]);
|
||||
}
|
||||
|
||||
/**
|
||||
* unset statistics
|
||||
*
|
||||
* @param scalar $index
|
||||
* @return void
|
||||
*/
|
||||
public function unsetStatistics($index)
|
||||
{
|
||||
unset($this->statistics[$index]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as statistics
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\BatchStatisticType[]
|
||||
*/
|
||||
public function getStatistics()
|
||||
{
|
||||
return $this->statistics;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new statistics
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\BatchStatisticType[] $statistics
|
||||
* @return self
|
||||
*/
|
||||
public function setStatistics(array $statistics)
|
||||
{
|
||||
$this->statistics = $statistics;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
661
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/BatchStatisticType.php
vendored
Normal file
661
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/BatchStatisticType.php
vendored
Normal file
@@ -0,0 +1,661 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing BatchStatisticType
|
||||
*
|
||||
*
|
||||
* XSD Type: batchStatisticType
|
||||
*/
|
||||
class BatchStatisticType implements \JsonSerializable
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $accountType
|
||||
*/
|
||||
private $accountType = null;
|
||||
|
||||
/**
|
||||
* @property float $chargeAmount
|
||||
*/
|
||||
private $chargeAmount = null;
|
||||
|
||||
/**
|
||||
* @property integer $chargeCount
|
||||
*/
|
||||
private $chargeCount = null;
|
||||
|
||||
/**
|
||||
* @property float $refundAmount
|
||||
*/
|
||||
private $refundAmount = null;
|
||||
|
||||
/**
|
||||
* @property integer $refundCount
|
||||
*/
|
||||
private $refundCount = null;
|
||||
|
||||
/**
|
||||
* @property integer $voidCount
|
||||
*/
|
||||
private $voidCount = null;
|
||||
|
||||
/**
|
||||
* @property integer $declineCount
|
||||
*/
|
||||
private $declineCount = null;
|
||||
|
||||
/**
|
||||
* @property integer $errorCount
|
||||
*/
|
||||
private $errorCount = null;
|
||||
|
||||
/**
|
||||
* @property float $returnedItemAmount
|
||||
*/
|
||||
private $returnedItemAmount = null;
|
||||
|
||||
/**
|
||||
* @property integer $returnedItemCount
|
||||
*/
|
||||
private $returnedItemCount = null;
|
||||
|
||||
/**
|
||||
* @property float $chargebackAmount
|
||||
*/
|
||||
private $chargebackAmount = null;
|
||||
|
||||
/**
|
||||
* @property integer $chargebackCount
|
||||
*/
|
||||
private $chargebackCount = null;
|
||||
|
||||
/**
|
||||
* @property integer $correctionNoticeCount
|
||||
*/
|
||||
private $correctionNoticeCount = null;
|
||||
|
||||
/**
|
||||
* @property float $chargeChargeBackAmount
|
||||
*/
|
||||
private $chargeChargeBackAmount = null;
|
||||
|
||||
/**
|
||||
* @property integer $chargeChargeBackCount
|
||||
*/
|
||||
private $chargeChargeBackCount = null;
|
||||
|
||||
/**
|
||||
* @property float $refundChargeBackAmount
|
||||
*/
|
||||
private $refundChargeBackAmount = null;
|
||||
|
||||
/**
|
||||
* @property integer $refundChargeBackCount
|
||||
*/
|
||||
private $refundChargeBackCount = null;
|
||||
|
||||
/**
|
||||
* @property float $chargeReturnedItemsAmount
|
||||
*/
|
||||
private $chargeReturnedItemsAmount = null;
|
||||
|
||||
/**
|
||||
* @property integer $chargeReturnedItemsCount
|
||||
*/
|
||||
private $chargeReturnedItemsCount = null;
|
||||
|
||||
/**
|
||||
* @property float $refundReturnedItemsAmount
|
||||
*/
|
||||
private $refundReturnedItemsAmount = null;
|
||||
|
||||
/**
|
||||
* @property integer $refundReturnedItemsCount
|
||||
*/
|
||||
private $refundReturnedItemsCount = null;
|
||||
|
||||
/**
|
||||
* Gets as accountType
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAccountType()
|
||||
{
|
||||
return $this->accountType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new accountType
|
||||
*
|
||||
* @param string $accountType
|
||||
* @return self
|
||||
*/
|
||||
public function setAccountType($accountType)
|
||||
{
|
||||
$this->accountType = $accountType;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as chargeAmount
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getChargeAmount()
|
||||
{
|
||||
return $this->chargeAmount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new chargeAmount
|
||||
*
|
||||
* @param float $chargeAmount
|
||||
* @return self
|
||||
*/
|
||||
public function setChargeAmount($chargeAmount)
|
||||
{
|
||||
$this->chargeAmount = $chargeAmount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as chargeCount
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getChargeCount()
|
||||
{
|
||||
return $this->chargeCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new chargeCount
|
||||
*
|
||||
* @param integer $chargeCount
|
||||
* @return self
|
||||
*/
|
||||
public function setChargeCount($chargeCount)
|
||||
{
|
||||
$this->chargeCount = $chargeCount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as refundAmount
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getRefundAmount()
|
||||
{
|
||||
return $this->refundAmount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new refundAmount
|
||||
*
|
||||
* @param float $refundAmount
|
||||
* @return self
|
||||
*/
|
||||
public function setRefundAmount($refundAmount)
|
||||
{
|
||||
$this->refundAmount = $refundAmount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as refundCount
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getRefundCount()
|
||||
{
|
||||
return $this->refundCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new refundCount
|
||||
*
|
||||
* @param integer $refundCount
|
||||
* @return self
|
||||
*/
|
||||
public function setRefundCount($refundCount)
|
||||
{
|
||||
$this->refundCount = $refundCount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as voidCount
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getVoidCount()
|
||||
{
|
||||
return $this->voidCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new voidCount
|
||||
*
|
||||
* @param integer $voidCount
|
||||
* @return self
|
||||
*/
|
||||
public function setVoidCount($voidCount)
|
||||
{
|
||||
$this->voidCount = $voidCount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as declineCount
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getDeclineCount()
|
||||
{
|
||||
return $this->declineCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new declineCount
|
||||
*
|
||||
* @param integer $declineCount
|
||||
* @return self
|
||||
*/
|
||||
public function setDeclineCount($declineCount)
|
||||
{
|
||||
$this->declineCount = $declineCount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as errorCount
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getErrorCount()
|
||||
{
|
||||
return $this->errorCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new errorCount
|
||||
*
|
||||
* @param integer $errorCount
|
||||
* @return self
|
||||
*/
|
||||
public function setErrorCount($errorCount)
|
||||
{
|
||||
$this->errorCount = $errorCount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as returnedItemAmount
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getReturnedItemAmount()
|
||||
{
|
||||
return $this->returnedItemAmount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new returnedItemAmount
|
||||
*
|
||||
* @param float $returnedItemAmount
|
||||
* @return self
|
||||
*/
|
||||
public function setReturnedItemAmount($returnedItemAmount)
|
||||
{
|
||||
$this->returnedItemAmount = $returnedItemAmount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as returnedItemCount
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getReturnedItemCount()
|
||||
{
|
||||
return $this->returnedItemCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new returnedItemCount
|
||||
*
|
||||
* @param integer $returnedItemCount
|
||||
* @return self
|
||||
*/
|
||||
public function setReturnedItemCount($returnedItemCount)
|
||||
{
|
||||
$this->returnedItemCount = $returnedItemCount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as chargebackAmount
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getChargebackAmount()
|
||||
{
|
||||
return $this->chargebackAmount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new chargebackAmount
|
||||
*
|
||||
* @param float $chargebackAmount
|
||||
* @return self
|
||||
*/
|
||||
public function setChargebackAmount($chargebackAmount)
|
||||
{
|
||||
$this->chargebackAmount = $chargebackAmount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as chargebackCount
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getChargebackCount()
|
||||
{
|
||||
return $this->chargebackCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new chargebackCount
|
||||
*
|
||||
* @param integer $chargebackCount
|
||||
* @return self
|
||||
*/
|
||||
public function setChargebackCount($chargebackCount)
|
||||
{
|
||||
$this->chargebackCount = $chargebackCount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as correctionNoticeCount
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getCorrectionNoticeCount()
|
||||
{
|
||||
return $this->correctionNoticeCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new correctionNoticeCount
|
||||
*
|
||||
* @param integer $correctionNoticeCount
|
||||
* @return self
|
||||
*/
|
||||
public function setCorrectionNoticeCount($correctionNoticeCount)
|
||||
{
|
||||
$this->correctionNoticeCount = $correctionNoticeCount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as chargeChargeBackAmount
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getChargeChargeBackAmount()
|
||||
{
|
||||
return $this->chargeChargeBackAmount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new chargeChargeBackAmount
|
||||
*
|
||||
* @param float $chargeChargeBackAmount
|
||||
* @return self
|
||||
*/
|
||||
public function setChargeChargeBackAmount($chargeChargeBackAmount)
|
||||
{
|
||||
$this->chargeChargeBackAmount = $chargeChargeBackAmount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as chargeChargeBackCount
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getChargeChargeBackCount()
|
||||
{
|
||||
return $this->chargeChargeBackCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new chargeChargeBackCount
|
||||
*
|
||||
* @param integer $chargeChargeBackCount
|
||||
* @return self
|
||||
*/
|
||||
public function setChargeChargeBackCount($chargeChargeBackCount)
|
||||
{
|
||||
$this->chargeChargeBackCount = $chargeChargeBackCount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as refundChargeBackAmount
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getRefundChargeBackAmount()
|
||||
{
|
||||
return $this->refundChargeBackAmount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new refundChargeBackAmount
|
||||
*
|
||||
* @param float $refundChargeBackAmount
|
||||
* @return self
|
||||
*/
|
||||
public function setRefundChargeBackAmount($refundChargeBackAmount)
|
||||
{
|
||||
$this->refundChargeBackAmount = $refundChargeBackAmount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as refundChargeBackCount
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getRefundChargeBackCount()
|
||||
{
|
||||
return $this->refundChargeBackCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new refundChargeBackCount
|
||||
*
|
||||
* @param integer $refundChargeBackCount
|
||||
* @return self
|
||||
*/
|
||||
public function setRefundChargeBackCount($refundChargeBackCount)
|
||||
{
|
||||
$this->refundChargeBackCount = $refundChargeBackCount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as chargeReturnedItemsAmount
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getChargeReturnedItemsAmount()
|
||||
{
|
||||
return $this->chargeReturnedItemsAmount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new chargeReturnedItemsAmount
|
||||
*
|
||||
* @param float $chargeReturnedItemsAmount
|
||||
* @return self
|
||||
*/
|
||||
public function setChargeReturnedItemsAmount($chargeReturnedItemsAmount)
|
||||
{
|
||||
$this->chargeReturnedItemsAmount = $chargeReturnedItemsAmount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as chargeReturnedItemsCount
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getChargeReturnedItemsCount()
|
||||
{
|
||||
return $this->chargeReturnedItemsCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new chargeReturnedItemsCount
|
||||
*
|
||||
* @param integer $chargeReturnedItemsCount
|
||||
* @return self
|
||||
*/
|
||||
public function setChargeReturnedItemsCount($chargeReturnedItemsCount)
|
||||
{
|
||||
$this->chargeReturnedItemsCount = $chargeReturnedItemsCount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as refundReturnedItemsAmount
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getRefundReturnedItemsAmount()
|
||||
{
|
||||
return $this->refundReturnedItemsAmount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new refundReturnedItemsAmount
|
||||
*
|
||||
* @param float $refundReturnedItemsAmount
|
||||
* @return self
|
||||
*/
|
||||
public function setRefundReturnedItemsAmount($refundReturnedItemsAmount)
|
||||
{
|
||||
$this->refundReturnedItemsAmount = $refundReturnedItemsAmount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as refundReturnedItemsCount
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getRefundReturnedItemsCount()
|
||||
{
|
||||
return $this->refundReturnedItemsCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new refundReturnedItemsCount
|
||||
*
|
||||
* @param integer $refundReturnedItemsCount
|
||||
* @return self
|
||||
*/
|
||||
public function setRefundReturnedItemsCount($refundReturnedItemsCount)
|
||||
{
|
||||
$this->refundReturnedItemsCount = $refundReturnedItemsCount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
229
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/CardArtType.php
vendored
Normal file
229
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/CardArtType.php
vendored
Normal file
@@ -0,0 +1,229 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing CardArtType
|
||||
*
|
||||
*
|
||||
* XSD Type: cardArt
|
||||
*/
|
||||
class CardArtType implements \JsonSerializable
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $cardBrand
|
||||
*/
|
||||
private $cardBrand = null;
|
||||
|
||||
/**
|
||||
* @property string $cardImageHeight
|
||||
*/
|
||||
private $cardImageHeight = null;
|
||||
|
||||
/**
|
||||
* @property string $cardImageUrl
|
||||
*/
|
||||
private $cardImageUrl = null;
|
||||
|
||||
/**
|
||||
* @property string $cardImageWidth
|
||||
*/
|
||||
private $cardImageWidth = null;
|
||||
|
||||
/**
|
||||
* @property string $cardType
|
||||
*/
|
||||
private $cardType = null;
|
||||
|
||||
/**
|
||||
* Gets as cardBrand
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCardBrand()
|
||||
{
|
||||
return $this->cardBrand;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new cardBrand
|
||||
*
|
||||
* @param string $cardBrand
|
||||
* @return self
|
||||
*/
|
||||
public function setCardBrand($cardBrand)
|
||||
{
|
||||
$this->cardBrand = $cardBrand;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as cardImageHeight
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCardImageHeight()
|
||||
{
|
||||
return $this->cardImageHeight;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new cardImageHeight
|
||||
*
|
||||
* @param string $cardImageHeight
|
||||
* @return self
|
||||
*/
|
||||
public function setCardImageHeight($cardImageHeight)
|
||||
{
|
||||
$this->cardImageHeight = $cardImageHeight;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as cardImageUrl
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCardImageUrl()
|
||||
{
|
||||
return $this->cardImageUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new cardImageUrl
|
||||
*
|
||||
* @param string $cardImageUrl
|
||||
* @return self
|
||||
*/
|
||||
public function setCardImageUrl($cardImageUrl)
|
||||
{
|
||||
$this->cardImageUrl = $cardImageUrl;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as cardImageWidth
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCardImageWidth()
|
||||
{
|
||||
return $this->cardImageWidth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new cardImageWidth
|
||||
*
|
||||
* @param string $cardImageWidth
|
||||
* @return self
|
||||
*/
|
||||
public function setCardImageWidth($cardImageWidth)
|
||||
{
|
||||
$this->cardImageWidth = $cardImageWidth;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as cardType
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCardType()
|
||||
{
|
||||
return $this->cardType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new cardType
|
||||
*
|
||||
* @param string $cardType
|
||||
* @return self
|
||||
*/
|
||||
public function setCardType($cardType)
|
||||
{
|
||||
$this->cardType = $cardType;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
148
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/CcAuthenticationType.php
vendored
Normal file
148
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/CcAuthenticationType.php
vendored
Normal file
@@ -0,0 +1,148 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing CcAuthenticationType
|
||||
*
|
||||
*
|
||||
* XSD Type: ccAuthenticationType
|
||||
*/
|
||||
class CcAuthenticationType implements \JsonSerializable
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $authenticationIndicator
|
||||
*/
|
||||
private $authenticationIndicator = null;
|
||||
|
||||
/**
|
||||
* @property string $cardholderAuthenticationValue
|
||||
*/
|
||||
private $cardholderAuthenticationValue = null;
|
||||
|
||||
/**
|
||||
* Gets as authenticationIndicator
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAuthenticationIndicator()
|
||||
{
|
||||
return $this->authenticationIndicator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new authenticationIndicator
|
||||
*
|
||||
* @param string $authenticationIndicator
|
||||
* @return self
|
||||
*/
|
||||
public function setAuthenticationIndicator($authenticationIndicator)
|
||||
{
|
||||
$this->authenticationIndicator = $authenticationIndicator;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as cardholderAuthenticationValue
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCardholderAuthenticationValue()
|
||||
{
|
||||
return $this->cardholderAuthenticationValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new cardholderAuthenticationValue
|
||||
*
|
||||
* @param string $cardholderAuthenticationValue
|
||||
* @return self
|
||||
*/
|
||||
public function setCardholderAuthenticationValue($cardholderAuthenticationValue)
|
||||
{
|
||||
$this->cardholderAuthenticationValue = $cardholderAuthenticationValue;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
175
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/ContactDetailType.php
vendored
Normal file
175
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/ContactDetailType.php
vendored
Normal file
@@ -0,0 +1,175 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing ContactDetailType
|
||||
*
|
||||
*
|
||||
* XSD Type: ContactDetailType
|
||||
*/
|
||||
class ContactDetailType implements \JsonSerializable
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $email
|
||||
*/
|
||||
private $email = null;
|
||||
|
||||
/**
|
||||
* @property string $firstName
|
||||
*/
|
||||
private $firstName = null;
|
||||
|
||||
/**
|
||||
* @property string $lastName
|
||||
*/
|
||||
private $lastName = null;
|
||||
|
||||
/**
|
||||
* Gets as email
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getEmail()
|
||||
{
|
||||
return $this->email;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new email
|
||||
*
|
||||
* @param string $email
|
||||
* @return self
|
||||
*/
|
||||
public function setEmail($email)
|
||||
{
|
||||
$this->email = $email;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as firstName
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFirstName()
|
||||
{
|
||||
return $this->firstName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new firstName
|
||||
*
|
||||
* @param string $firstName
|
||||
* @return self
|
||||
*/
|
||||
public function setFirstName($firstName)
|
||||
{
|
||||
$this->firstName = $firstName;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as lastName
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getLastName()
|
||||
{
|
||||
return $this->lastName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new lastName
|
||||
*
|
||||
* @param string $lastName
|
||||
* @return self
|
||||
*/
|
||||
public function setLastName($lastName)
|
||||
{
|
||||
$this->lastName = $lastName;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing CreateCustomerPaymentProfileRequest
|
||||
*/
|
||||
class CreateCustomerPaymentProfileRequest extends ANetApiRequestType
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $customerProfileId
|
||||
*/
|
||||
private $customerProfileId = null;
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\CustomerPaymentProfileType
|
||||
* $paymentProfile
|
||||
*/
|
||||
private $paymentProfile = null;
|
||||
|
||||
/**
|
||||
* @property string $validationMode
|
||||
*/
|
||||
private $validationMode = null;
|
||||
|
||||
/**
|
||||
* Gets as customerProfileId
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCustomerProfileId()
|
||||
{
|
||||
return $this->customerProfileId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new customerProfileId
|
||||
*
|
||||
* @param string $customerProfileId
|
||||
* @return self
|
||||
*/
|
||||
public function setCustomerProfileId($customerProfileId)
|
||||
{
|
||||
$this->customerProfileId = $customerProfileId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as paymentProfile
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\CustomerPaymentProfileType
|
||||
*/
|
||||
public function getPaymentProfile()
|
||||
{
|
||||
return $this->paymentProfile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new paymentProfile
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\CustomerPaymentProfileType $paymentProfile
|
||||
* @return self
|
||||
*/
|
||||
public function setPaymentProfile(\net\authorize\api\contract\v1\CustomerPaymentProfileType $paymentProfile)
|
||||
{
|
||||
$this->paymentProfile = $paymentProfile;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as validationMode
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getValidationMode()
|
||||
{
|
||||
return $this->validationMode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new validationMode
|
||||
*
|
||||
* @param string $validationMode
|
||||
* @return self
|
||||
*/
|
||||
public function setValidationMode($validationMode)
|
||||
{
|
||||
$this->validationMode = $validationMode;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return array_merge(parent::jsonSerialize(), $values);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,142 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing CreateCustomerPaymentProfileResponse
|
||||
*/
|
||||
class CreateCustomerPaymentProfileResponse extends ANetApiResponseType
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $customerProfileId
|
||||
*/
|
||||
private $customerProfileId = null;
|
||||
|
||||
/**
|
||||
* @property string $customerPaymentProfileId
|
||||
*/
|
||||
private $customerPaymentProfileId = null;
|
||||
|
||||
/**
|
||||
* @property string $validationDirectResponse
|
||||
*/
|
||||
private $validationDirectResponse = null;
|
||||
|
||||
/**
|
||||
* Gets as customerProfileId
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCustomerProfileId()
|
||||
{
|
||||
return $this->customerProfileId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new customerProfileId
|
||||
*
|
||||
* @param string $customerProfileId
|
||||
* @return self
|
||||
*/
|
||||
public function setCustomerProfileId($customerProfileId)
|
||||
{
|
||||
$this->customerProfileId = $customerProfileId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as customerPaymentProfileId
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCustomerPaymentProfileId()
|
||||
{
|
||||
return $this->customerPaymentProfileId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new customerPaymentProfileId
|
||||
*
|
||||
* @param string $customerPaymentProfileId
|
||||
* @return self
|
||||
*/
|
||||
public function setCustomerPaymentProfileId($customerPaymentProfileId)
|
||||
{
|
||||
$this->customerPaymentProfileId = $customerPaymentProfileId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as validationDirectResponse
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getValidationDirectResponse()
|
||||
{
|
||||
return $this->validationDirectResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new validationDirectResponse
|
||||
*
|
||||
* @param string $validationDirectResponse
|
||||
* @return self
|
||||
*/
|
||||
public function setValidationDirectResponse($validationDirectResponse)
|
||||
{
|
||||
$this->validationDirectResponse = $validationDirectResponse;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing CreateCustomerProfileFromTransactionRequest
|
||||
*/
|
||||
class CreateCustomerProfileFromTransactionRequest extends ANetApiRequestType
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $transId
|
||||
*/
|
||||
private $transId = null;
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\CustomerProfileBaseType $customer
|
||||
*/
|
||||
private $customer = null;
|
||||
|
||||
/**
|
||||
* @property string $customerProfileId
|
||||
*/
|
||||
private $customerProfileId = null;
|
||||
|
||||
/**
|
||||
* @property boolean $defaultPaymentProfile
|
||||
*/
|
||||
private $defaultPaymentProfile = null;
|
||||
|
||||
/**
|
||||
* @property boolean $defaultShippingAddress
|
||||
*/
|
||||
private $defaultShippingAddress = null;
|
||||
|
||||
/**
|
||||
* @property string $profileType
|
||||
*/
|
||||
private $profileType = null;
|
||||
|
||||
/**
|
||||
* Gets as transId
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTransId()
|
||||
{
|
||||
return $this->transId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new transId
|
||||
*
|
||||
* @param string $transId
|
||||
* @return self
|
||||
*/
|
||||
public function setTransId($transId)
|
||||
{
|
||||
$this->transId = $transId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as customer
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\CustomerProfileBaseType
|
||||
*/
|
||||
public function getCustomer()
|
||||
{
|
||||
return $this->customer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new customer
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\CustomerProfileBaseType $customer
|
||||
* @return self
|
||||
*/
|
||||
public function setCustomer(\net\authorize\api\contract\v1\CustomerProfileBaseType $customer)
|
||||
{
|
||||
$this->customer = $customer;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as customerProfileId
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCustomerProfileId()
|
||||
{
|
||||
return $this->customerProfileId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new customerProfileId
|
||||
*
|
||||
* @param string $customerProfileId
|
||||
* @return self
|
||||
*/
|
||||
public function setCustomerProfileId($customerProfileId)
|
||||
{
|
||||
$this->customerProfileId = $customerProfileId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as defaultPaymentProfile
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getDefaultPaymentProfile()
|
||||
{
|
||||
return $this->defaultPaymentProfile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new defaultPaymentProfile
|
||||
*
|
||||
* @param boolean $defaultPaymentProfile
|
||||
* @return self
|
||||
*/
|
||||
public function setDefaultPaymentProfile($defaultPaymentProfile)
|
||||
{
|
||||
$this->defaultPaymentProfile = $defaultPaymentProfile;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as defaultShippingAddress
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getDefaultShippingAddress()
|
||||
{
|
||||
return $this->defaultShippingAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new defaultShippingAddress
|
||||
*
|
||||
* @param boolean $defaultShippingAddress
|
||||
* @return self
|
||||
*/
|
||||
public function setDefaultShippingAddress($defaultShippingAddress)
|
||||
{
|
||||
$this->defaultShippingAddress = $defaultShippingAddress;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as profileType
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getProfileType()
|
||||
{
|
||||
return $this->profileType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new profileType
|
||||
*
|
||||
* @param string $profileType
|
||||
* @return self
|
||||
*/
|
||||
public function setProfileType($profileType)
|
||||
{
|
||||
$this->profileType = $profileType;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return array_merge(parent::jsonSerialize(), $values);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing CreateCustomerProfileRequest
|
||||
*/
|
||||
class CreateCustomerProfileRequest extends ANetApiRequestType
|
||||
{
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\CustomerProfileType $profile
|
||||
*/
|
||||
private $profile = null;
|
||||
|
||||
/**
|
||||
* @property string $validationMode
|
||||
*/
|
||||
private $validationMode = null;
|
||||
|
||||
/**
|
||||
* Gets as profile
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\CustomerProfileType
|
||||
*/
|
||||
public function getProfile()
|
||||
{
|
||||
return $this->profile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new profile
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\CustomerProfileType $profile
|
||||
* @return self
|
||||
*/
|
||||
public function setProfile(\net\authorize\api\contract\v1\CustomerProfileType $profile)
|
||||
{
|
||||
$this->profile = $profile;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as validationMode
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getValidationMode()
|
||||
{
|
||||
return $this->validationMode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new validationMode
|
||||
*
|
||||
* @param string $validationMode
|
||||
* @return self
|
||||
*/
|
||||
public function setValidationMode($validationMode)
|
||||
{
|
||||
$this->validationMode = $validationMode;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return array_merge(parent::jsonSerialize(), $values);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
271
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/CreateCustomerProfileResponse.php
vendored
Normal file
271
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/CreateCustomerProfileResponse.php
vendored
Normal file
@@ -0,0 +1,271 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing CreateCustomerProfileResponse
|
||||
*/
|
||||
class CreateCustomerProfileResponse extends ANetApiResponseType
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $customerProfileId
|
||||
*/
|
||||
private $customerProfileId = null;
|
||||
|
||||
/**
|
||||
* @property string[] $customerPaymentProfileIdList
|
||||
*/
|
||||
private $customerPaymentProfileIdList = null;
|
||||
|
||||
/**
|
||||
* @property string[] $customerShippingAddressIdList
|
||||
*/
|
||||
private $customerShippingAddressIdList = null;
|
||||
|
||||
/**
|
||||
* @property string[] $validationDirectResponseList
|
||||
*/
|
||||
private $validationDirectResponseList = null;
|
||||
|
||||
/**
|
||||
* Gets as customerProfileId
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCustomerProfileId()
|
||||
{
|
||||
return $this->customerProfileId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new customerProfileId
|
||||
*
|
||||
* @param string $customerProfileId
|
||||
* @return self
|
||||
*/
|
||||
public function setCustomerProfileId($customerProfileId)
|
||||
{
|
||||
$this->customerProfileId = $customerProfileId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds as numericString
|
||||
*
|
||||
* @return self
|
||||
* @param string $numericString
|
||||
*/
|
||||
public function addToCustomerPaymentProfileIdList($numericString)
|
||||
{
|
||||
$this->customerPaymentProfileIdList[] = $numericString;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* isset customerPaymentProfileIdList
|
||||
*
|
||||
* @param scalar $index
|
||||
* @return boolean
|
||||
*/
|
||||
public function issetCustomerPaymentProfileIdList($index)
|
||||
{
|
||||
return isset($this->customerPaymentProfileIdList[$index]);
|
||||
}
|
||||
|
||||
/**
|
||||
* unset customerPaymentProfileIdList
|
||||
*
|
||||
* @param scalar $index
|
||||
* @return void
|
||||
*/
|
||||
public function unsetCustomerPaymentProfileIdList($index)
|
||||
{
|
||||
unset($this->customerPaymentProfileIdList[$index]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as customerPaymentProfileIdList
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getCustomerPaymentProfileIdList()
|
||||
{
|
||||
return $this->customerPaymentProfileIdList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new customerPaymentProfileIdList
|
||||
*
|
||||
* @param string $customerPaymentProfileIdList
|
||||
* @return self
|
||||
*/
|
||||
public function setCustomerPaymentProfileIdList(array $customerPaymentProfileIdList)
|
||||
{
|
||||
$this->customerPaymentProfileIdList = $customerPaymentProfileIdList;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds as numericString
|
||||
*
|
||||
* @return self
|
||||
* @param string $numericString
|
||||
*/
|
||||
public function addToCustomerShippingAddressIdList($numericString)
|
||||
{
|
||||
$this->customerShippingAddressIdList[] = $numericString;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* isset customerShippingAddressIdList
|
||||
*
|
||||
* @param scalar $index
|
||||
* @return boolean
|
||||
*/
|
||||
public function issetCustomerShippingAddressIdList($index)
|
||||
{
|
||||
return isset($this->customerShippingAddressIdList[$index]);
|
||||
}
|
||||
|
||||
/**
|
||||
* unset customerShippingAddressIdList
|
||||
*
|
||||
* @param scalar $index
|
||||
* @return void
|
||||
*/
|
||||
public function unsetCustomerShippingAddressIdList($index)
|
||||
{
|
||||
unset($this->customerShippingAddressIdList[$index]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as customerShippingAddressIdList
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getCustomerShippingAddressIdList()
|
||||
{
|
||||
return $this->customerShippingAddressIdList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new customerShippingAddressIdList
|
||||
*
|
||||
* @param string $customerShippingAddressIdList
|
||||
* @return self
|
||||
*/
|
||||
public function setCustomerShippingAddressIdList(array $customerShippingAddressIdList)
|
||||
{
|
||||
$this->customerShippingAddressIdList = $customerShippingAddressIdList;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds as string
|
||||
*
|
||||
* @return self
|
||||
* @param string $string
|
||||
*/
|
||||
public function addToValidationDirectResponseList($string)
|
||||
{
|
||||
$this->validationDirectResponseList[] = $string;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* isset validationDirectResponseList
|
||||
*
|
||||
* @param scalar $index
|
||||
* @return boolean
|
||||
*/
|
||||
public function issetValidationDirectResponseList($index)
|
||||
{
|
||||
return isset($this->validationDirectResponseList[$index]);
|
||||
}
|
||||
|
||||
/**
|
||||
* unset validationDirectResponseList
|
||||
*
|
||||
* @param scalar $index
|
||||
* @return void
|
||||
*/
|
||||
public function unsetValidationDirectResponseList($index)
|
||||
{
|
||||
unset($this->validationDirectResponseList[$index]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as validationDirectResponseList
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getValidationDirectResponseList()
|
||||
{
|
||||
return $this->validationDirectResponseList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new validationDirectResponseList
|
||||
*
|
||||
* @param string[] $validationDirectResponseList
|
||||
* @return self
|
||||
*/
|
||||
public function setValidationDirectResponseList(array $validationDirectResponseList)
|
||||
{
|
||||
$this->validationDirectResponseList = $validationDirectResponseList;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing CreateCustomerProfileTransactionRequest
|
||||
*/
|
||||
class CreateCustomerProfileTransactionRequest extends ANetApiRequestType
|
||||
{
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\ProfileTransactionType $transaction
|
||||
*/
|
||||
private $transaction = null;
|
||||
|
||||
/**
|
||||
* @property string $extraOptions
|
||||
*/
|
||||
private $extraOptions = null;
|
||||
|
||||
/**
|
||||
* Gets as transaction
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\ProfileTransactionType
|
||||
*/
|
||||
public function getTransaction()
|
||||
{
|
||||
return $this->transaction;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new transaction
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\ProfileTransactionType $transaction
|
||||
* @return self
|
||||
*/
|
||||
public function setTransaction(\net\authorize\api\contract\v1\ProfileTransactionType $transaction)
|
||||
{
|
||||
$this->transaction = $transaction;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as extraOptions
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getExtraOptions()
|
||||
{
|
||||
return $this->extraOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new extraOptions
|
||||
*
|
||||
* @param string $extraOptions
|
||||
* @return self
|
||||
*/
|
||||
public function setExtraOptions($extraOptions)
|
||||
{
|
||||
$this->extraOptions = $extraOptions;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return array_merge(parent::jsonSerialize(), $values);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing CreateCustomerProfileTransactionResponse
|
||||
*/
|
||||
class CreateCustomerProfileTransactionResponse extends ANetApiResponseType
|
||||
{
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\TransactionResponseType
|
||||
* $transactionResponse
|
||||
*/
|
||||
private $transactionResponse = null;
|
||||
|
||||
/**
|
||||
* @property string $directResponse
|
||||
*/
|
||||
private $directResponse = null;
|
||||
|
||||
/**
|
||||
* Gets as transactionResponse
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\TransactionResponseType
|
||||
*/
|
||||
public function getTransactionResponse()
|
||||
{
|
||||
return $this->transactionResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new transactionResponse
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\TransactionResponseType
|
||||
* $transactionResponse
|
||||
* @return self
|
||||
*/
|
||||
public function setTransactionResponse(\net\authorize\api\contract\v1\TransactionResponseType $transactionResponse)
|
||||
{
|
||||
$this->transactionResponse = $transactionResponse;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as directResponse
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDirectResponse()
|
||||
{
|
||||
return $this->directResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new directResponse
|
||||
*
|
||||
* @param string $directResponse
|
||||
* @return self
|
||||
*/
|
||||
public function setDirectResponse($directResponse)
|
||||
{
|
||||
$this->directResponse = $directResponse;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing CreateCustomerShippingAddressRequest
|
||||
*/
|
||||
class CreateCustomerShippingAddressRequest extends ANetApiRequestType
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $customerProfileId
|
||||
*/
|
||||
private $customerProfileId = null;
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\CustomerAddressType $address
|
||||
*/
|
||||
private $address = null;
|
||||
|
||||
/**
|
||||
* @property boolean $defaultShippingAddress
|
||||
*/
|
||||
private $defaultShippingAddress = null;
|
||||
|
||||
/**
|
||||
* Gets as customerProfileId
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCustomerProfileId()
|
||||
{
|
||||
return $this->customerProfileId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new customerProfileId
|
||||
*
|
||||
* @param string $customerProfileId
|
||||
* @return self
|
||||
*/
|
||||
public function setCustomerProfileId($customerProfileId)
|
||||
{
|
||||
$this->customerProfileId = $customerProfileId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as address
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\CustomerAddressType
|
||||
*/
|
||||
public function getAddress()
|
||||
{
|
||||
return $this->address;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new address
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\CustomerAddressType $address
|
||||
* @return self
|
||||
*/
|
||||
public function setAddress(\net\authorize\api\contract\v1\CustomerAddressType $address)
|
||||
{
|
||||
$this->address = $address;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as defaultShippingAddress
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getDefaultShippingAddress()
|
||||
{
|
||||
return $this->defaultShippingAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new defaultShippingAddress
|
||||
*
|
||||
* @param boolean $defaultShippingAddress
|
||||
* @return self
|
||||
*/
|
||||
public function setDefaultShippingAddress($defaultShippingAddress)
|
||||
{
|
||||
$this->defaultShippingAddress = $defaultShippingAddress;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return array_merge(parent::jsonSerialize(), $values);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing CreateCustomerShippingAddressResponse
|
||||
*/
|
||||
class CreateCustomerShippingAddressResponse extends ANetApiResponseType
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $customerProfileId
|
||||
*/
|
||||
private $customerProfileId = null;
|
||||
|
||||
/**
|
||||
* @property string $customerAddressId
|
||||
*/
|
||||
private $customerAddressId = null;
|
||||
|
||||
/**
|
||||
* Gets as customerProfileId
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCustomerProfileId()
|
||||
{
|
||||
return $this->customerProfileId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new customerProfileId
|
||||
*
|
||||
* @param string $customerProfileId
|
||||
* @return self
|
||||
*/
|
||||
public function setCustomerProfileId($customerProfileId)
|
||||
{
|
||||
$this->customerProfileId = $customerProfileId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as customerAddressId
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCustomerAddressId()
|
||||
{
|
||||
return $this->customerAddressId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new customerAddressId
|
||||
*
|
||||
* @param string $customerAddressId
|
||||
* @return self
|
||||
*/
|
||||
public function setCustomerAddressId($customerAddressId)
|
||||
{
|
||||
$this->customerAddressId = $customerAddressId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
270
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/CreateProfileResponseType.php
vendored
Normal file
270
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/CreateProfileResponseType.php
vendored
Normal file
@@ -0,0 +1,270 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing CreateProfileResponseType
|
||||
*
|
||||
*
|
||||
* XSD Type: createProfileResponse
|
||||
*/
|
||||
class CreateProfileResponseType implements \JsonSerializable
|
||||
{
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\MessagesType $messages
|
||||
*/
|
||||
private $messages = null;
|
||||
|
||||
/**
|
||||
* @property string $customerProfileId
|
||||
*/
|
||||
private $customerProfileId = null;
|
||||
|
||||
/**
|
||||
* @property string[] $customerPaymentProfileIdList
|
||||
*/
|
||||
private $customerPaymentProfileIdList = null;
|
||||
|
||||
/**
|
||||
* @property string[] $customerShippingAddressIdList
|
||||
*/
|
||||
private $customerShippingAddressIdList = null;
|
||||
|
||||
/**
|
||||
* Gets as messages
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\MessagesType
|
||||
*/
|
||||
public function getMessages()
|
||||
{
|
||||
return $this->messages;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new messages
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\MessagesType $messages
|
||||
* @return self
|
||||
*/
|
||||
public function setMessages(\net\authorize\api\contract\v1\MessagesType $messages)
|
||||
{
|
||||
$this->messages = $messages;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as customerProfileId
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCustomerProfileId()
|
||||
{
|
||||
return $this->customerProfileId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new customerProfileId
|
||||
*
|
||||
* @param string $customerProfileId
|
||||
* @return self
|
||||
*/
|
||||
public function setCustomerProfileId($customerProfileId)
|
||||
{
|
||||
$this->customerProfileId = $customerProfileId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds as numericString
|
||||
*
|
||||
* @return self
|
||||
* @param string $numericString
|
||||
*/
|
||||
public function addToCustomerPaymentProfileIdList($numericString)
|
||||
{
|
||||
$this->customerPaymentProfileIdList[] = $numericString;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* isset customerPaymentProfileIdList
|
||||
*
|
||||
* @param scalar $index
|
||||
* @return boolean
|
||||
*/
|
||||
public function issetCustomerPaymentProfileIdList($index)
|
||||
{
|
||||
return isset($this->customerPaymentProfileIdList[$index]);
|
||||
}
|
||||
|
||||
/**
|
||||
* unset customerPaymentProfileIdList
|
||||
*
|
||||
* @param scalar $index
|
||||
* @return void
|
||||
*/
|
||||
public function unsetCustomerPaymentProfileIdList($index)
|
||||
{
|
||||
unset($this->customerPaymentProfileIdList[$index]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as customerPaymentProfileIdList
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getCustomerPaymentProfileIdList()
|
||||
{
|
||||
return $this->customerPaymentProfileIdList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new customerPaymentProfileIdList
|
||||
*
|
||||
* @param string $customerPaymentProfileIdList
|
||||
* @return self
|
||||
*/
|
||||
public function setCustomerPaymentProfileIdList(array $customerPaymentProfileIdList)
|
||||
{
|
||||
$this->customerPaymentProfileIdList = $customerPaymentProfileIdList;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds as numericString
|
||||
*
|
||||
* @return self
|
||||
* @param string $numericString
|
||||
*/
|
||||
public function addToCustomerShippingAddressIdList($numericString)
|
||||
{
|
||||
$this->customerShippingAddressIdList[] = $numericString;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* isset customerShippingAddressIdList
|
||||
*
|
||||
* @param scalar $index
|
||||
* @return boolean
|
||||
*/
|
||||
public function issetCustomerShippingAddressIdList($index)
|
||||
{
|
||||
return isset($this->customerShippingAddressIdList[$index]);
|
||||
}
|
||||
|
||||
/**
|
||||
* unset customerShippingAddressIdList
|
||||
*
|
||||
* @param scalar $index
|
||||
* @return void
|
||||
*/
|
||||
public function unsetCustomerShippingAddressIdList($index)
|
||||
{
|
||||
unset($this->customerShippingAddressIdList[$index]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as customerShippingAddressIdList
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getCustomerShippingAddressIdList()
|
||||
{
|
||||
return $this->customerShippingAddressIdList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new customerShippingAddressIdList
|
||||
*
|
||||
* @param string $customerShippingAddressIdList
|
||||
* @return self
|
||||
*/
|
||||
public function setCustomerShippingAddressIdList(array $customerShippingAddressIdList)
|
||||
{
|
||||
$this->customerShippingAddressIdList = $customerShippingAddressIdList;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
71
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/CreateTransactionRequest.php
vendored
Normal file
71
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/CreateTransactionRequest.php
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing CreateTransactionRequest
|
||||
*/
|
||||
class CreateTransactionRequest extends ANetApiRequestType
|
||||
{
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\TransactionRequestType
|
||||
* $transactionRequest
|
||||
*/
|
||||
private $transactionRequest = null;
|
||||
|
||||
/**
|
||||
* Gets as transactionRequest
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\TransactionRequestType
|
||||
*/
|
||||
public function getTransactionRequest()
|
||||
{
|
||||
return $this->transactionRequest;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new transactionRequest
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\TransactionRequestType $transactionRequest
|
||||
* @return self
|
||||
*/
|
||||
public function setTransactionRequest(\net\authorize\api\contract\v1\TransactionRequestType $transactionRequest)
|
||||
{
|
||||
$this->transactionRequest = $transactionRequest;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return array_merge(parent::jsonSerialize(), $values);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
118
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/CreateTransactionResponse.php
vendored
Normal file
118
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/CreateTransactionResponse.php
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing CreateTransactionResponse
|
||||
*/
|
||||
class CreateTransactionResponse extends ANetApiResponseType
|
||||
{
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\TransactionResponseType
|
||||
* $transactionResponse
|
||||
*/
|
||||
private $transactionResponse = null;
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\CreateProfileResponseType
|
||||
* $profileResponse
|
||||
*/
|
||||
private $profileResponse = null;
|
||||
|
||||
/**
|
||||
* Gets as transactionResponse
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\TransactionResponseType
|
||||
*/
|
||||
public function getTransactionResponse()
|
||||
{
|
||||
return $this->transactionResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new transactionResponse
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\TransactionResponseType
|
||||
* $transactionResponse
|
||||
* @return self
|
||||
*/
|
||||
public function setTransactionResponse(\net\authorize\api\contract\v1\TransactionResponseType $transactionResponse)
|
||||
{
|
||||
$this->transactionResponse = $transactionResponse;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as profileResponse
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\CreateProfileResponseType
|
||||
*/
|
||||
public function getProfileResponse()
|
||||
{
|
||||
return $this->profileResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new profileResponse
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\CreateProfileResponseType $profileResponse
|
||||
* @return self
|
||||
*/
|
||||
public function setProfileResponse(\net\authorize\api\contract\v1\CreateProfileResponseType $profileResponse)
|
||||
{
|
||||
$this->profileResponse = $profileResponse;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
256
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/CreditCardMaskedType.php
vendored
Normal file
256
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/CreditCardMaskedType.php
vendored
Normal file
@@ -0,0 +1,256 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing CreditCardMaskedType
|
||||
*
|
||||
*
|
||||
* XSD Type: creditCardMaskedType
|
||||
*/
|
||||
class CreditCardMaskedType implements \JsonSerializable
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $cardNumber
|
||||
*/
|
||||
private $cardNumber = null;
|
||||
|
||||
/**
|
||||
* @property string $expirationDate
|
||||
*/
|
||||
private $expirationDate = null;
|
||||
|
||||
/**
|
||||
* @property string $cardType
|
||||
*/
|
||||
private $cardType = null;
|
||||
|
||||
/**
|
||||
* @property \net\authorize\api\contract\v1\CardArtType $cardArt
|
||||
*/
|
||||
private $cardArt = null;
|
||||
|
||||
/**
|
||||
* @property string $issuerNumber
|
||||
*/
|
||||
private $issuerNumber = null;
|
||||
|
||||
/**
|
||||
* @property boolean $isPaymentToken
|
||||
*/
|
||||
private $isPaymentToken = null;
|
||||
|
||||
/**
|
||||
* Gets as cardNumber
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCardNumber()
|
||||
{
|
||||
return $this->cardNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new cardNumber
|
||||
*
|
||||
* @param string $cardNumber
|
||||
* @return self
|
||||
*/
|
||||
public function setCardNumber($cardNumber)
|
||||
{
|
||||
$this->cardNumber = $cardNumber;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as expirationDate
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getExpirationDate()
|
||||
{
|
||||
return $this->expirationDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new expirationDate
|
||||
*
|
||||
* @param string $expirationDate
|
||||
* @return self
|
||||
*/
|
||||
public function setExpirationDate($expirationDate)
|
||||
{
|
||||
$this->expirationDate = $expirationDate;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as cardType
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCardType()
|
||||
{
|
||||
return $this->cardType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new cardType
|
||||
*
|
||||
* @param string $cardType
|
||||
* @return self
|
||||
*/
|
||||
public function setCardType($cardType)
|
||||
{
|
||||
$this->cardType = $cardType;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as cardArt
|
||||
*
|
||||
* @return \net\authorize\api\contract\v1\CardArtType
|
||||
*/
|
||||
public function getCardArt()
|
||||
{
|
||||
return $this->cardArt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new cardArt
|
||||
*
|
||||
* @param \net\authorize\api\contract\v1\CardArtType $cardArt
|
||||
* @return self
|
||||
*/
|
||||
public function setCardArt(\net\authorize\api\contract\v1\CardArtType $cardArt)
|
||||
{
|
||||
$this->cardArt = $cardArt;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as issuerNumber
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getIssuerNumber()
|
||||
{
|
||||
return $this->issuerNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new issuerNumber
|
||||
*
|
||||
* @param string $issuerNumber
|
||||
* @return self
|
||||
*/
|
||||
public function setIssuerNumber($issuerNumber)
|
||||
{
|
||||
$this->issuerNumber = $issuerNumber;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as isPaymentToken
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getIsPaymentToken()
|
||||
{
|
||||
return $this->isPaymentToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new isPaymentToken
|
||||
*
|
||||
* @param boolean $isPaymentToken
|
||||
* @return self
|
||||
*/
|
||||
public function setIsPaymentToken($isPaymentToken)
|
||||
{
|
||||
$this->isPaymentToken = $isPaymentToken;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
148
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/CreditCardSimpleType.php
vendored
Normal file
148
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/CreditCardSimpleType.php
vendored
Normal file
@@ -0,0 +1,148 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing CreditCardSimpleType
|
||||
*
|
||||
*
|
||||
* XSD Type: creditCardSimpleType
|
||||
*/
|
||||
class CreditCardSimpleType implements \JsonSerializable
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $cardNumber
|
||||
*/
|
||||
private $cardNumber = null;
|
||||
|
||||
/**
|
||||
* @property string $expirationDate
|
||||
*/
|
||||
private $expirationDate = null;
|
||||
|
||||
/**
|
||||
* Gets as cardNumber
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCardNumber()
|
||||
{
|
||||
return $this->cardNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new cardNumber
|
||||
*
|
||||
* @param string $cardNumber
|
||||
* @return self
|
||||
*/
|
||||
public function setCardNumber($cardNumber)
|
||||
{
|
||||
$this->cardNumber = $cardNumber;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as expirationDate
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getExpirationDate()
|
||||
{
|
||||
return $this->expirationDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new expirationDate
|
||||
*
|
||||
* @param string $expirationDate
|
||||
* @return self
|
||||
*/
|
||||
public function setExpirationDate($expirationDate)
|
||||
{
|
||||
$this->expirationDate = $expirationDate;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
148
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/CreditCardTrackType.php
vendored
Normal file
148
vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/CreditCardTrackType.php
vendored
Normal file
@@ -0,0 +1,148 @@
|
||||
<?php
|
||||
|
||||
namespace net\authorize\api\contract\v1;
|
||||
|
||||
/**
|
||||
* Class representing CreditCardTrackType
|
||||
*
|
||||
*
|
||||
* XSD Type: creditCardTrackType
|
||||
*/
|
||||
class CreditCardTrackType implements \JsonSerializable
|
||||
{
|
||||
|
||||
/**
|
||||
* @property string $track1
|
||||
*/
|
||||
private $track1 = null;
|
||||
|
||||
/**
|
||||
* @property string $track2
|
||||
*/
|
||||
private $track2 = null;
|
||||
|
||||
/**
|
||||
* Gets as track1
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTrack1()
|
||||
{
|
||||
return $this->track1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new track1
|
||||
*
|
||||
* @param string $track1
|
||||
* @return self
|
||||
*/
|
||||
public function setTrack1($track1)
|
||||
{
|
||||
$this->track1 = $track1;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets as track2
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTrack2()
|
||||
{
|
||||
return $this->track2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new track2
|
||||
*
|
||||
* @param string $track2
|
||||
* @return self
|
||||
*/
|
||||
public function setTrack2($track2)
|
||||
{
|
||||
$this->track2 = $track2;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
// Json Serialize Code
|
||||
public function jsonSerialize(){
|
||||
$values = array_filter((array)get_object_vars($this),
|
||||
function ($val){
|
||||
return !is_null($val);
|
||||
});
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($values as $key => $value){
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
if (isset($value)){
|
||||
if ($classDetails->className === 'Date'){
|
||||
$dateTime = $value->format('Y-m-d');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime'){
|
||||
$dateTime = $value->format('Y-m-d\TH:i:s\Z');
|
||||
$values[$key] = $dateTime;
|
||||
}
|
||||
if (is_array($value)){
|
||||
if (!$classDetails->isInlineArray){
|
||||
$subKey = $classDetails->arrayEntryname;
|
||||
$subArray = [$subKey => $value];
|
||||
$values[$key] = $subArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
// Json Set Code
|
||||
public function set($data)
|
||||
{
|
||||
if(is_array($data) || is_object($data)) {
|
||||
$mapper = \net\authorize\util\Mapper::Instance();
|
||||
foreach($data AS $key => $value) {
|
||||
$classDetails = $mapper->getClass(get_class() , $key);
|
||||
|
||||
if($classDetails !== NULL ) {
|
||||
if ($classDetails->isArray) {
|
||||
if ($classDetails->isCustomDefined) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new $classDetails->className;
|
||||
$type->set($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$type = new \DateTime($valueChild);
|
||||
$this->{'addTo' . $key}($type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($value AS $keyChild => $valueChild) {
|
||||
$this->{'addTo' . $key}($valueChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($classDetails->isCustomDefined){
|
||||
$type = new $classDetails->className;
|
||||
$type->set($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
|
||||
$type = new \DateTime($value);
|
||||
$this->{'set' . $key}($type);
|
||||
}
|
||||
else {
|
||||
$this->{'set' . $key}($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user