update lock clucknut
All checks were successful
All checks were successful
This commit is contained in:
@@ -30,6 +30,7 @@ jobs:
|
||||
- "8.0"
|
||||
- "8.1"
|
||||
- "8.2"
|
||||
- "8.3"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
181
vendor/fedapay/fedapay-php/Jenkinsfile
vendored
181
vendor/fedapay/fedapay-php/Jenkinsfile
vendored
@@ -1,181 +0,0 @@
|
||||
pipeline {
|
||||
agent none
|
||||
|
||||
stages {
|
||||
stage('Notify') {
|
||||
steps {
|
||||
slackSend (color: '#FFFF00', message: "STARTED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
|
||||
}
|
||||
}
|
||||
|
||||
stage('test') {
|
||||
parallel {
|
||||
stage('php:5.5') {
|
||||
agent {
|
||||
docker {
|
||||
image 'php:5.5'
|
||||
args '-u root:sudo'
|
||||
}
|
||||
}
|
||||
|
||||
steps {
|
||||
withCredentials([
|
||||
file(credentialsId: 'ssh_private_key_file', variable: 'SSH_PRIVATE_KEY_FILE')
|
||||
]) {
|
||||
sh '''
|
||||
bash -x jenkins-ci.sh
|
||||
php vendor/bin/phpunit
|
||||
php vendor/bin/phpcs --standard=PSR2 -n lib tests *.php
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
sh 'rm -R vendor/'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('php:5.6') {
|
||||
agent {
|
||||
docker {
|
||||
image 'php:5.6'
|
||||
args '-u root:sudo'
|
||||
}
|
||||
}
|
||||
|
||||
steps {
|
||||
withCredentials([
|
||||
file(credentialsId: 'ssh_private_key_file', variable: 'SSH_PRIVATE_KEY_FILE')
|
||||
]) {
|
||||
sh '''
|
||||
bash -x jenkins-ci.sh
|
||||
php vendor/bin/phpunit
|
||||
php vendor/bin/phpcs --standard=PSR2 -n lib tests *.php
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
sh 'rm -R vendor/'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('php:7.0') {
|
||||
agent {
|
||||
docker {
|
||||
image 'php:7.0'
|
||||
args '-u root:sudo'
|
||||
}
|
||||
}
|
||||
|
||||
steps {
|
||||
withCredentials([
|
||||
file(credentialsId: 'ssh_private_key_file', variable: 'SSH_PRIVATE_KEY_FILE')
|
||||
]) {
|
||||
sh '''
|
||||
bash -x jenkins-ci.sh
|
||||
php vendor/bin/phpunit
|
||||
php vendor/bin/phpcs --standard=PSR2 -n lib tests *.php
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
sh 'rm -R vendor/'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('php:7.1') {
|
||||
agent {
|
||||
docker {
|
||||
image 'php:7.1'
|
||||
args '-u root:sudo'
|
||||
}
|
||||
}
|
||||
|
||||
steps {
|
||||
withCredentials([
|
||||
file(credentialsId: 'ssh_private_key_file', variable: 'SSH_PRIVATE_KEY_FILE')
|
||||
]) {
|
||||
sh '''
|
||||
bash -x jenkins-ci.sh
|
||||
php vendor/bin/phpunit
|
||||
php vendor/bin/phpcs --standard=PSR2 -n lib tests *.php
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
sh 'rm -R vendor/'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('php:7.2') {
|
||||
agent {
|
||||
docker {
|
||||
image 'php:7.2'
|
||||
args '-u root:sudo'
|
||||
}
|
||||
}
|
||||
|
||||
steps {
|
||||
withCredentials([
|
||||
file(credentialsId: 'ssh_private_key_file', variable: 'SSH_PRIVATE_KEY_FILE')
|
||||
]) {
|
||||
sh '''
|
||||
bash -x jenkins-ci.sh
|
||||
php vendor/bin/phpunit
|
||||
php vendor/bin/phpcs --standard=PSR2 -n lib tests *.php
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
sh 'rm -R vendor/'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Trigger') {
|
||||
agent any
|
||||
|
||||
when {
|
||||
anyOf {
|
||||
branch 'develop'
|
||||
branch 'master'
|
||||
}
|
||||
}
|
||||
|
||||
steps {
|
||||
withCredentials([usernamePassword(credentialsId: 'auth_access', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
|
||||
sh '''
|
||||
URL='https://jenkins.fedapay.com/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)'
|
||||
CRUMB=$(curl -s $URL --user ${USERNAME}:${PASSWORD})
|
||||
curl -X POST -H "$CRUMB" --user ${USERNAME}:${PASSWORD} https://jenkins.fedapay.com/job/fedapay-checkout/job/${BRANCH_NAME}/build
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
success {
|
||||
slackSend (color: '#00FF00', message: "SUCCESSFUL: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
|
||||
}
|
||||
|
||||
failure {
|
||||
slackSend (color: '#FF0000', message: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,8 @@ class Client extends Resource
|
||||
public static function grantClientCredentials()
|
||||
{
|
||||
list($response, $opts) = static::_staticRequest(
|
||||
'post', '/oauth/token',
|
||||
'post',
|
||||
'/oauth/token',
|
||||
[
|
||||
'grant_type' => 'client_credentials',
|
||||
'client_id' => FedaPay::getOauthClientId(),
|
||||
|
||||
38
vendor/fedapay/fedapay-php/lib/PaymentSource.php
vendored
Normal file
38
vendor/fedapay/fedapay-php/lib/PaymentSource.php
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace FedaPay;
|
||||
|
||||
/**
|
||||
* Class PhoneNumber
|
||||
*
|
||||
* @property int $id
|
||||
* @property string product
|
||||
* @property string channel
|
||||
* @property string referrer
|
||||
* @property string lib
|
||||
* @property string lib_version
|
||||
* @property string api_version
|
||||
* @property string ip
|
||||
* @property string device
|
||||
* @property string os
|
||||
* @property string browser
|
||||
* @property string country
|
||||
* @property string city
|
||||
* @property string region
|
||||
* @property string latitude
|
||||
* @property string longitude
|
||||
* @property string account_id
|
||||
* @property string sourceable_type
|
||||
* @property string sourceable_id
|
||||
* @property string os_version
|
||||
* @property string browser_version
|
||||
* @property string device_vendor
|
||||
* @property string created_at
|
||||
* @property string updated_at
|
||||
*
|
||||
* @package FedaPay
|
||||
*/
|
||||
class PaymentSource extends Resource
|
||||
{
|
||||
|
||||
}
|
||||
9
vendor/fedapay/fedapay-php/lib/Requestor.php
vendored
9
vendor/fedapay/fedapay-php/lib/Requestor.php
vendored
@@ -125,9 +125,12 @@ protected function defaultHeaders()
|
||||
$accountId = FedaPay::getAccountId();
|
||||
|
||||
$default = [
|
||||
'X-Version' => FedaPay::VERSION,
|
||||
'X-Api-Version' => $apiVersion,
|
||||
'X-Source' => 'FedaPay PhpLib',
|
||||
// Deprecated 'X-Version' => FedaPay::VERSION,
|
||||
'X-FedaPay-Lib-Version' => FedaPay::VERSION,
|
||||
// Deprecated 'X-Api-Version' => $apiVersion,
|
||||
'X-FedaPay-Api-Version' => $apiVersion,
|
||||
// Deprecated 'X-Source' => 'FedaPay PhpLib',
|
||||
'X-FedaPay-Lib' => 'FedaPay PhpLib',
|
||||
'Authorization' => "Bearer $auth"
|
||||
];
|
||||
|
||||
|
||||
12
vendor/fedapay/fedapay-php/lib/Resource.php
vendored
12
vendor/fedapay/fedapay-php/lib/Resource.php
vendored
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* @package FedaPay
|
||||
*/
|
||||
abstract class Resource extends FedaPayObject
|
||||
class Resource extends FedaPayObject
|
||||
{
|
||||
use ApiOperations\Request;
|
||||
|
||||
@@ -103,4 +103,14 @@ public function instanceUrl()
|
||||
{
|
||||
return static::resourcePath($this['id']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send any request
|
||||
* @return FedaPay\FedaPayObject
|
||||
*/
|
||||
public static function request($method, $url, $params = [], $headers = [])
|
||||
{
|
||||
list($response, $opts) = static::_staticRequest($method, $url, $params, $headers);
|
||||
return Util::arrayToFedaPayObject($response, $opts);
|
||||
}
|
||||
}
|
||||
|
||||
1
vendor/fedapay/fedapay-php/lib/Util/Util.php
vendored
1
vendor/fedapay/fedapay-php/lib/Util/Util.php
vendored
@@ -58,6 +58,7 @@ public static function convertToFedaPayObject($resp, $opts)
|
||||
'v1/page' => 'FedaPay\\Page',
|
||||
'v1/invoice' => 'FedaPay\\Invoice',
|
||||
'v1/balance' => 'FedaPay\\Balance',
|
||||
'v1/payment_source' => 'FedaPay\\PaymentSource',
|
||||
];
|
||||
|
||||
if (self::isList($resp)) {
|
||||
|
||||
@@ -21,9 +21,9 @@ protected function setUpConfig()
|
||||
|
||||
\FedaPay\Requestor::setHttpClient(\FedaPay\HttpClient\CurlClient::instance());
|
||||
$this->defaultHeaders = [
|
||||
'X-Version' => \FedaPay\FedaPay::VERSION,
|
||||
'X-Api-Version' => \FedaPay\FedaPay::getApiVersion(),
|
||||
'X-Source' => 'FedaPay PhpLib',
|
||||
'X-FedaPay-Lib-Version' => \FedaPay\FedaPay::VERSION,
|
||||
'X-FedaPay-Api-Version' => \FedaPay\FedaPay::getApiVersion(),
|
||||
'X-FedaPay-Lib' => 'FedaPay PhpLib',
|
||||
'Authorization' => 'Bearer '. (self::API_KEY ?: self::OAUTH_TOKEN)
|
||||
];
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public function testRequestSetParams()
|
||||
[
|
||||
'Authorization' => 'Bearer mytoken',
|
||||
'FedaPay-Account' => 898,
|
||||
'X-Api-Version' => 'v3',
|
||||
'X-FedaPay-Api-Version' => 'v3',
|
||||
'X-Custom' => 'foo'
|
||||
]
|
||||
);
|
||||
|
||||
0
vendor/fedapay/fedapay-php/update_certs.php
vendored
Normal file → Executable file
0
vendor/fedapay/fedapay-php/update_certs.php
vendored
Normal file → Executable file
Reference in New Issue
Block a user