diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..242212f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+.DS_Store
+/.idea
+
+/dev/magento
+/dev/composer.env
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
index e2a9355..8649791 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,59 +1,27 @@
sudo: required
-dist: trusty
-group: edge
-addons:
- apt:
- packages:
- - mysql-server-5.6
- - mysql-client-core-5.6
- - mysql-client-5.6
- - postfix
- hosts:
- - magento2.travis
-language: php
+services:
+ - docker
matrix:
include:
- - php: 7.1
- env:
- - MAGENTO_VERSION=2.2-develop
+ - env:
+ - MAGENTO_VERSION=~2.2
- TEST_SUITE=unit
- - php: 7.1
- env:
- - MAGENTO_VERSION=2.2-develop
+ - env:
+ - MAGENTO_VERSION=~2.2
- TEST_SUITE=integration
- - php: 7.1
- env:
- - MAGENTO_VERSION=2.2.4
- - TEST_SUITE=unit
- - php: 7.1
- env:
- - MAGENTO_VERSION=2.2.4
- - TEST_SUITE=integration
- - php: 7.0
- env:
- - MAGENTO_VERSION=2.2-develop
- - TEST_SUITE=unit
- - php: 7.0
- env:
- - MAGENTO_VERSION=2.2-develop
- - TEST_SUITE=integration
- - php: 7.0
- env:
- - MAGENTO_VERSION=2.2.4
- - TEST_SUITE=unit
- - php: 7.0
- env:
- - MAGENTO_VERSION=2.2.4
- - TEST_SUITE=integration
-env:
- global:
- - COMPOSER_BIN_DIR=~/bin
- - STRIPE_MOCK_VERSION=0.5.0
- - COMPOSER_PACKAGE_NAME=pmclain/module-stripe
+ - env:
+ - MAGENTO_VERSION=~2.2
+ - TEST_SUITE=acceptance
cache:
- apt: true
directories:
- $HOME/.composer/cache
- - stripe-mock
-before_script: ./.travis/before_script.sh
-script: phpunit -c magento2/dev/tests/$TEST_SUITE
+before_script:
+ - echo "COMPOSER_MAGENTO_USERNAME=$COMPOSER_MAGENTO_USERNAME" >> dev/composer.env
+ - echo "COMPOSER_MAGENTO_PASSWORD=$COMPOSER_MAGENTO_PASSWORD" >> dev/composer.env
+ - echo "COMPOSER_GITHUB_TOKEN=$COMPOSER_GITHUB_TOKEN" >> dev/composer.env
+ - sed -E -i "s/MAGENTO_VERSION=.*/MAGENTO_VERSION=${MAGENTO_VERSION}/" dev/docker-compose.yml
+ - docker-compose -f dev/docker-compose.yml build
+ - docker-compose -f dev/docker-compose.yml up -d
+ - docker-compose -f dev/docker-compose.yml exec app module-installer
+script:
+ - docker-compose -f dev/docker-compose.yml exec app test-${TEST_SUITE}
diff --git a/.travis/before_script.sh b/.travis/before_script.sh
deleted file mode 100755
index 55a31a5..0000000
--- a/.travis/before_script.sh
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-trap '>&2 echo Error: Command \`$BASH_COMMAND\` on line $LINENO failed with exit code $?' ERR
-
-# download stripe mock
-if [ ! -d "stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}" ]; then
- mkdir -p stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}/
- curl -L "https://github.com/stripe/stripe-mock/releases/download/v${STRIPE_MOCK_VERSION}/stripe-mock_${STRIPE_MOCK_VERSION}_linux_amd64.tar.gz" -o "stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}_linux_amd64.tar.gz"
- tar -zxf "stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}_linux_amd64.tar.gz" -C "stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}/"
-fi
-
-# start stripe mock
-stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}/stripe-mock > /dev/null &
-STRIPE_MOCK_PID=$!
-
-# mock mail
-sudo service postfix stop
-echo # print a newline
-smtp-sink -d "%d.%H.%M.%S" localhost:2500 1000 &
-echo 'sendmail_path = "/usr/sbin/sendmail -t -i "' > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/sendmail.ini
-
-# disable xdebug and adjust memory limit
-echo > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
-echo 'memory_limit = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
-phpenv rehash;
-
-composer selfupdate
-
-# clone main magento github repository
-git clone --branch $MAGENTO_VERSION --depth=1 https://github.com/magento/magento2
-
-# install Magento
-cd magento2
-
-# add composer package under test, composer require will trigger update/install
-composer config minimum-stability dev
-composer config repositories.travis_to_test git https://github.com/$TRAVIS_REPO_SLUG.git
-composer require $COMPOSER_PACKAGE_NAME:dev-$TRAVIS_BRANCH#$TRAVIS_COMMIT
-
-# prepare for test suite
-case $TEST_SUITE in
- integration)
- cp vendor/$COMPOSER_PACKAGE_NAME/Test/Integration/phpunit.xml.dist dev/tests/integration/phpunit.xml
-
- cd dev/tests/integration
-
- # create database and move db config into place
- mysql -uroot -e '
- SET @@global.sql_mode = NO_ENGINE_SUBSTITUTION;
- CREATE DATABASE magento_integration_tests;
- '
- mv etc/install-config-mysql.travis.php.dist etc/install-config-mysql.php
-
- cd ../../..
- ;;
- static)
- cd dev/tests/static
-
- echo "==> preparing changed files list"
- changed_files_ce="$TRAVIS_BUILD_DIR/dev/tests/static/testsuite/Magento/Test/_files/changed_files_ce.txt"
- php get_github_changes.php \
- --output-file="$changed_files_ce" \
- --base-path="$TRAVIS_BUILD_DIR" \
- --repo='https://github.com/magento/magento2.git' \
- --branch="$TRAVIS_BRANCH"
- cat "$changed_files_ce" | sed 's/^/ + including /'
-
- cd ../../..
- ;;
- unit)
- cp vendor/$COMPOSER_PACKAGE_NAME/Test/Unit/phpunit.xml.dist dev/tests/unit/phpunit.xml
- ;;
-esac
diff --git a/README.md b/README.md
index 16cda4d..6e4c359 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,8 @@ In your Magento 2 root directory run
## Magento Version Requirements
| Release | Magento Version |
| ------- | --------------- |
-| 2.x.x | 2.2.x |
+| 2.1.x | >=2.2.5 |
+| 2.0.x | 2.2.0-2.2.4 |
| 1.x.x | 2.1.x |
| None | 2.0.x |
@@ -39,5 +40,25 @@ There is no ETA for implementation, but here is the list in order of priority.
1. Multi-shipping address support
2. Stripe Radar
+## Testing and Local Development
+**WARNING**
+The docker setup included is intended for local development only.
+
+### Local Development
+`cd ./dev`
+`docker-compose up -d`
+`docker-compose exec app module-installer`
+`docker-compose exec app magento-installer`
+
+Create the host entry `127.0.0.1 stripe.docker`
+
+### Execute Tests
+ * Setup
+ `docker-compose -f dev/docker-compose.yml up -d`
+ `docker-compose -f dev/docker-compose.yml exec app module-installer`
+ * Unit - `docker-compose -f dev/docker-compose.yml exec app test-unit`
+ * Integration - `docker-compose -f dev/docker-compose.yml exec app test-integration`
+ * Acceptance - `docker-compose -f dev/docker-compose.yml exec app test-acceptance`
+
## License
Open Software License v3.0
diff --git a/Test/Integration/phpunit.xml.dist b/Test/Integration/phpunit.xml.dist
deleted file mode 100644
index 3d53322..0000000
--- a/Test/Integration/phpunit.xml.dist
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-
-
-
-
- ../../../vendor/pmclain/module-stripe/Test/Integration
-
-
-
-
-
- ../../../vendor/pmclain/module-stripe
-
- ../../../vendor/pmclain/module-stripe/Test
-
-
-
-
-
- .
- testsuite
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/composer.json b/composer.json
index 8c6ba4f..1e009ff 100755
--- a/composer.json
+++ b/composer.json
@@ -5,15 +5,15 @@
"license": "OSL-3.0",
"require": {
"php": "~7.0.0||~7.1.0||~7.2.0",
- "magento/framework": "~101.0.0||~100.3.0-dev",
+ "magento/framework": "~101.0.5||~100.3.0-dev",
"stripe/stripe-php": "~6.7.0"
},
"autoload": {
"files": [
- "registration.php"
+ "src/registration.php"
],
"psr-4": {
- "Pmclain\\Stripe\\": ""
+ "Pmclain\\Stripe\\": "src/"
}
}
}
diff --git a/dev/composer.env.sample b/dev/composer.env.sample
new file mode 100644
index 0000000..0187339
--- /dev/null
+++ b/dev/composer.env.sample
@@ -0,0 +1,3 @@
+COMPOSER_MAGENTO_USERNAME=0000
+COMPOSER_MAGENTO_PASSWORD=0000
+COMPOSER_GITHUB_TOKEN=0000
\ No newline at end of file
diff --git a/dev/docker-compose.yml b/dev/docker-compose.yml
new file mode 100644
index 0000000..70958bf
--- /dev/null
+++ b/dev/docker-compose.yml
@@ -0,0 +1,86 @@
+version: "3"
+services:
+ web:
+ build: ./nginx
+ ports:
+ - "80:80"
+ - "443:443"
+ links:
+ - app
+ networks:
+ default:
+ aliases:
+ - stripe.docker
+ volumes:
+ - ./magento:/var/www/magento
+ environment:
+ - VIRTUAL_HOST=stripe.docker
+
+ app:
+ build: ./php71
+ links:
+ - db
+ - redis
+ - amqp
+ - mailcatcher
+ - stripemock
+ volumes:
+ - ~/.composer/cache:/root/.composer/cache
+ - ./magento:/var/www/magento:cached
+ - ..:/module
+ env_file:
+ - ./composer.env
+ environment:
+ - PHP_IDE_CONFIG=serverName=stripe.docker
+ - XDEBUG_ENABLE=true
+ - MAGENTO_RUN_MODE=developer
+ - MAGENTO_VERSION=~2.2
+ - MAGENTO_URL=https://stripe.docker
+
+ db:
+ image: mariadb:10
+ user: mysql
+ ports:
+ - "9306:3306"
+ volumes:
+ - dbdata:/var/lib/mysql
+ environment:
+ - MYSQL_ROOT_PASSWORD=magento
+ - MYSQL_DATABASE=magento
+ - MYSQL_USER=magento
+ - MYSQL_PASSWORD=magento
+
+ redis:
+ image: redis
+ ports:
+ - 6379
+
+ amqp:
+ image: rabbitmq:3-management
+ ports:
+ - "15672:15672"
+ environment:
+ - RABBITMQ_DEFAULT_USER=guest
+ - RABBITMQ_DEFAULT_PASSWORD=guest
+
+ mailcatcher:
+ image: helder/mailcatcher
+ ports:
+ - "1080:80"
+
+ chrome:
+ image: selenium/standalone-chrome-debug
+ ports:
+ - "49338:5900"
+
+ stripemock:
+ image: stripemock/stripe-mock
+ ports:
+ - 12111
+ - 12112
+
+volumes:
+ dbdata:
+
+networks:
+ default:
\ No newline at end of file
diff --git a/dev/nginx/Dockerfile b/dev/nginx/Dockerfile
new file mode 100644
index 0000000..60bce8e
--- /dev/null
+++ b/dev/nginx/Dockerfile
@@ -0,0 +1,22 @@
+FROM nginx:1.9
+
+LABEL MAINTAINER="Patrick McLain "
+
+ADD etc/vhost.conf /etc/nginx/conf.d/default.conf
+COPY etc/certs/ /etc/nginx/ssl/
+ADD bin/* /usr/local/bin/
+
+EXPOSE 443
+
+ENV FPM_HOST app
+ENV FPM_PORT 9000
+ENV MAGENTO_ROOT /var/www/magento
+ENV MAGENTO_RUN_MODE developer
+ENV DEBUG false
+
+RUN ["sed", "-i", "s/user nginx;/user root;/", "/etc/nginx/nginx.conf"]
+
+RUN ["chmod", "+x", "/usr/local/bin/docker-environment"]
+
+ENTRYPOINT ["/usr/local/bin/docker-environment"]
+CMD ["nginx", "-g", "daemon off;"]
diff --git a/dev/nginx/bin/docker-environment b/dev/nginx/bin/docker-environment
new file mode 100644
index 0000000..b30a015
--- /dev/null
+++ b/dev/nginx/bin/docker-environment
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+[ "$DEBUG" = "true" ] && set -x
+
+VHOST_FILE="/etc/nginx/conf.d/default.conf"
+
+[ ! -z "${FPM_HOST}" ] && sed -i "s/!FPM_HOST!/${FPM_HOST}/" $VHOST_FILE
+[ ! -z "${FPM_PORT}" ] && sed -i "s/!FPM_PORT!/${FPM_PORT}/" $VHOST_FILE
+[ ! -z "${MAGENTO_ROOT}" ] && sed -i "s#!MAGENTO_ROOT!#${MAGENTO_ROOT}#" $VHOST_FILE
+[ ! -z "${MAGENTO_RUN_MODE}" ] && sed -i "s/!MAGENTO_RUN_MODE!/${MAGENTO_RUN_MODE}/" $VHOST_FILE
+[ ! -z "${UPLOAD_MAX_FILESIZE}" ] && sed -i "s/!UPLOAD_MAX_FILESIZE!/${UPLOAD_MAX_FILESIZE}/" $VHOST_FILE
+
+# Check if the nginx syntax is fine, then launch.
+nginx -t
+
+exec "$@"
\ No newline at end of file
diff --git a/dev/nginx/etc/certs/magento.crt b/dev/nginx/etc/certs/magento.crt
new file mode 100644
index 0000000..6aa8d0b
--- /dev/null
+++ b/dev/nginx/etc/certs/magento.crt
@@ -0,0 +1,21 @@
+-----BEGIN CERTIFICATE-----
+MIIDdDCCAlwCCQCkL06EvsPP2TANBgkqhkiG9w0BAQsFADB8MQswCQYDVQQGEwJH
+QjERMA8GA1UECBMIU29tZXJzZXQxDTALBgNVBAcTBEJhdGgxEDAOBgNVBAoTB01l
+YW5iZWUxFDASBgNVBAMTC21hZ2VudG8uZGV2MSMwIQYJKoZIhvcNAQkBFhRzeXNh
+ZG1pbkBleGFtcGxlLmNvbTAeFw0xNzA2MjgxMjEyMTZaFw0yNzA2MjYxMjEyMTZa
+MHwxCzAJBgNVBAYTAkdCMREwDwYDVQQIEwhTb21lcnNldDENMAsGA1UEBxMEQmF0
+aDEQMA4GA1UEChMHTWVhbmJlZTEUMBIGA1UEAxMLbWFnZW50by5kZXYxIzAhBgkq
+hkiG9w0BCQEWFHN5c2FkbWluQGV4YW1wbGUuY29tMIIBIjANBgkqhkiG9w0BAQEF
+AAOCAQ8AMIIBCgKCAQEA71Ar7riah4gVBY6AisU76n1qYNDhnKLZ6OAd2I+3ll+U
+zQPzb2B+Mn32zo1WURGmBODUMfvAsfPaW/XWODfaAzi+0x3+K/5h5t28Twkc3x4J
+5jFuJGhTqez30lxrG6KgAsKo61NL80Ey6wgC/G+EOOL/xrwOKi8veSKPcFWQCI5P
+Ctjhb1uW5n5UvelnZ4P8Q+o4gzjPGW0UgtZqdOBD9gUSF8gRtxwyqoJldyY+YWpv
+eQGmlj6bqMPR27EVPjmtXTdY7SASt8FwZviLlIb3d0MegEJOasAbbRqwKb8Frnuu
+xUG17ga0WoK939uAnL6F7dTfDBusE4AUfuHrmSzp2wIDAQABMA0GCSqGSIb3DQEB
+CwUAA4IBAQDM4Et6nCcAISR+J4rA4iF8mLi+1dj94KHcdmanm7Y06wFzt7g1Lf5u
+DjHbVzqqLNCNGIsxOA5f2ERQ2vqXR+0PkB85Yhgr2xyFnmpgo8qoroHnCEvdVPi0
+a96nb7LmhknC2zWHAufXy1vyNRWuGLHIUUw5xnTUhJkhybJiT/68F0uK/qmwbSGb
+bGKsR8Z5UeE7OPT+OEplpIVBo55ktQ4ehAxB3FCa8kZdpYNASsfcyHOYTVDXMlVL
+OT3VHhx7i0qh1mFm+SLST82Noq0bhbNRnd2HlkUrsSX8LAeI4YvSnvnbxs//Bm0d
+9BocWjDXr12xHdbS7SMoZPgBZ9Bn9koV
+-----END CERTIFICATE-----
\ No newline at end of file
diff --git a/dev/nginx/etc/certs/magento.key b/dev/nginx/etc/certs/magento.key
new file mode 100644
index 0000000..5edebf5
--- /dev/null
+++ b/dev/nginx/etc/certs/magento.key
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpQIBAAKCAQEA71Ar7riah4gVBY6AisU76n1qYNDhnKLZ6OAd2I+3ll+UzQPz
+b2B+Mn32zo1WURGmBODUMfvAsfPaW/XWODfaAzi+0x3+K/5h5t28Twkc3x4J5jFu
+JGhTqez30lxrG6KgAsKo61NL80Ey6wgC/G+EOOL/xrwOKi8veSKPcFWQCI5PCtjh
+b1uW5n5UvelnZ4P8Q+o4gzjPGW0UgtZqdOBD9gUSF8gRtxwyqoJldyY+YWpveQGm
+lj6bqMPR27EVPjmtXTdY7SASt8FwZviLlIb3d0MegEJOasAbbRqwKb8FrnuuxUG1
+7ga0WoK939uAnL6F7dTfDBusE4AUfuHrmSzp2wIDAQABAoIBACl/GV8Xm5QMwLhp
+8Vgewzjx7lRDZBupEWgUFJjMsuTcRg0WtkuFy9wtg3Jlh6YfDU6jPag9Izi4NBDm
+G/M7nA4a9Nvew4gVYByMLm72AY+ewdCsmZCulnNMp9xOMjRkiqJv5qKHmw/fKlke
+1oW3QJIsqnVnfn1KGU1D9ONhsswIq0x8u3NEt0Fc3zRjVm6dcXef6kNBZJQNynFG
+BbDfV0qkuiTmabvh04huhldtHYZmHXAHeeQ9k0SRkn9gVdSqjMe+DQ5odjaukotb
+P1qnG94AdkXuVDGNXFoQ8rNLZPXQ9UO/P81pN6og728u+OuwaSwYgJhia4j88zg/
+Ffptg6ECgYEA+aRh1iQFHGj5eT/dijgghnkK2fkoZlKGazeDdqME9ASpZPuLiPI0
+0ng+BEWA2ejLM/B0UuBm/VWy9cwT7F4d5ByCvrpclYA0Tn7d94K6YP0cwBYvHa54
+j6fkKgy/R1BjKCD2AKI2g0Hgh3QzgrgPwMdZcjEi4eWbLx9s6ocCLLcCgYEA9Why
+XB9FTQdK/ptGSAKye+VVXqXqYxFHHKes55b+ACbK2mYF9Xqp7z0fu56ZqCdxGbG2
+GmhFM8RnebsHGc38761+VrI73GQ6S2dMKt6PzCg7t+3NCaF7Z+t65kEV55w6Vmri
+eIw34hXTpbPemHXomcvifpY9ootqnP0BhjfYD/0CgYEArBZV3yEbaNcwShXtaM+C
+FFCyW0n3QHnY8WXmOMztqCzifJsuN+wG36NF1Pn4db6U/SvfdBX+yNnfsLLKdSD3
+5/yDYGjlU6V56TZpWqqCQkOZIwzn08UmlJi+nwIEhWtzvwDhs9QeUeMCnT1MGOs6
+6MBC94XJrwDxNc2q7gy9QgcCgYEAnBHrwNiGS0GbGScI4F0Ow6qKy2G7GXvwfLHK
+TZKCQPhqw9Bkc8Sp9CMsXja0Q/Opgwy44jxz3kNHB2zBTFDrTkZI9bvuQ/Bd/nxY
+PV9DljP0HroWTsyq3eEtTOgRlTWPCEx7cOzD0X3OFzC4HL/HyJ+YkKbd1dTSXbqt
+0H0NZMUCgYEA0Fdu0oZMMDDWFFEcRY5PVenxuj59cl6gARB86e5p3clIGwTx5/5C
+FJzp0zdfb9vE/cTlV3mKSFUskSUTFHaHjI1w3oRD/oDMkgImRpDvqye0PBpiSyRE
+Cz4N7ikKJRzxABkHtCqEG+VA/ah2obIpbzYSfGTAKlS/6u7FBgLSmn8=
+-----END RSA PRIVATE KEY-----
\ No newline at end of file
diff --git a/dev/nginx/etc/vhost.conf b/dev/nginx/etc/vhost.conf
new file mode 100644
index 0000000..ddec11e
--- /dev/null
+++ b/dev/nginx/etc/vhost.conf
@@ -0,0 +1,226 @@
+# This file is created automatically by the docker build
+
+upstream fastcgi_backend {
+ server !FPM_HOST!:!FPM_PORT!; # Variables: FPM_HOST and FPM_PORT
+}
+
+server {
+ listen 80;
+ listen 443 ssl;
+
+ server_name localhost;
+
+ set $MAGE_ROOT !MAGENTO_ROOT!; # Variable: MAGENTO_ROOT
+ set $MAGE_MODE !MAGENTO_RUN_MODE!; # Variable: MAGENTO_RUN_MODE
+
+ # Support for SSL termination.
+ set $my_http "http";
+ set $my_ssl "off";
+ set $my_port "80";
+ if ($http_x_forwarded_proto = "https") {
+ set $my_http "https";
+ set $my_ssl "on";
+ set $my_port "443";
+ }
+
+ ssl_certificate /etc/nginx/ssl/magento.crt;
+ ssl_certificate_key /etc/nginx/ssl/magento.key;
+
+ root $MAGE_ROOT/pub;
+
+ index index.php;
+ autoindex off;
+ charset UTF-8;
+ error_page 404 403 = /errors/404.php;
+ #add_header "X-UA-Compatible" "IE=Edge";
+
+ # PHP entry point for setup application
+ location ~* ^/setup($|/) {
+ root $MAGE_ROOT;
+ location ~ ^/setup/index.php {
+ fastcgi_pass fastcgi_backend;
+
+ fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
+ fastcgi_param PHP_VALUE "memory_limit=768M \n max_execution_time=600";
+ fastcgi_read_timeout 600s;
+ fastcgi_connect_timeout 600s;
+
+ fastcgi_index index.php;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include fastcgi_params;
+ }
+
+ location ~ ^/setup/(?!pub/). {
+ deny all;
+ }
+
+ location ~ ^/setup/pub/ {
+ add_header X-Frame-Options "SAMEORIGIN";
+ }
+ }
+
+ # PHP entry point for update application
+ location ~* ^/update($|/) {
+ root $MAGE_ROOT;
+
+ location ~ ^/update/index.php {
+ fastcgi_split_path_info ^(/update/index.php)(/.+)$;
+ fastcgi_pass fastcgi_backend;
+ fastcgi_index index.php;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ include fastcgi_params;
+ }
+
+ # Deny everything but index.php
+ location ~ ^/update/(?!pub/). {
+ deny all;
+ }
+
+ location ~ ^/update/pub/ {
+ add_header X-Frame-Options "SAMEORIGIN";
+ }
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php$is_args$args;
+ }
+
+ location /pub/ {
+ location ~ ^/pub/media/(downloadable|customer|import|theme_customization/.*\.xml) {
+ deny all;
+ }
+ alias $MAGE_ROOT/pub/;
+ add_header X-Frame-Options "SAMEORIGIN";
+ }
+
+ location /static/ {
+ if ($MAGE_MODE = "production") {
+ expires max;
+ }
+
+ # Remove signature of the static files that is used to overcome the browser cache
+ location ~ ^/static/version {
+ rewrite ^/static/(version\d*/)?(.*)$ /static/$2 last;
+ }
+
+ location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
+ add_header Cache-Control "public";
+ add_header X-Frame-Options "SAMEORIGIN";
+ expires +1y;
+
+ if (!-f $request_filename) {
+ rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
+ }
+ }
+ location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
+ add_header Cache-Control "no-store";
+ add_header X-Frame-Options "SAMEORIGIN";
+ expires off;
+
+ if (!-f $request_filename) {
+ rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
+ }
+ }
+ if (!-f $request_filename) {
+ rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
+ }
+ add_header X-Frame-Options "SAMEORIGIN";
+ }
+
+ location /media/ {
+ try_files $uri $uri/ /get.php$is_args$args;
+
+ location ~ ^/media/theme_customization/.*\.xml {
+ deny all;
+ }
+
+ location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
+ add_header Cache-Control "public";
+ add_header X-Frame-Options "SAMEORIGIN";
+ expires +1y;
+ try_files $uri $uri/ /get.php$is_args$args;
+ }
+ location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
+ add_header Cache-Control "no-store";
+ add_header X-Frame-Options "SAMEORIGIN";
+ expires off;
+ try_files $uri $uri/ /get.php$is_args$args;
+ }
+ add_header X-Frame-Options "SAMEORIGIN";
+ }
+
+ location /media/customer/ {
+ deny all;
+ }
+
+ location /media/downloadable/ {
+ deny all;
+ }
+
+ location /media/import/ {
+ deny all;
+ }
+
+ # PHP entry point for main application
+ location ~ (index|get|static|report|404|503)\.php$ {
+ try_files $uri =404;
+ fastcgi_pass fastcgi_backend;
+ fastcgi_buffers 1024 4k;
+
+ fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
+ fastcgi_param PHP_VALUE "memory_limit=768M \n max_execution_time=18000";
+ fastcgi_read_timeout 600s;
+ fastcgi_connect_timeout 600s;
+ fastcgi_param MAGE_MODE $MAGE_MODE;
+
+ # Magento uses the HTTPS env var to detrimine if it is using SSL or not.
+ fastcgi_param HTTPS $my_ssl;
+
+ fastcgi_index index.php;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include fastcgi_params;
+ }
+
+ # PHP entry point for main application
+ location ~ (index|get|static|report|404|503)\.php$ {
+ try_files $uri =404;
+ fastcgi_pass fastcgi_backend;
+ fastcgi_buffers 1024 4k;
+
+ fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
+ fastcgi_param PHP_VALUE "memory_limit=768M \n max_execution_time=18000";
+ fastcgi_read_timeout 600s;
+ fastcgi_connect_timeout 600s;
+
+ fastcgi_index index.php;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include fastcgi_params;
+ }
+
+ gzip on;
+ gzip_disable "msie6";
+
+ gzip_comp_level 6;
+ gzip_min_length 1100;
+ gzip_buffers 16 8k;
+ gzip_proxied any;
+ gzip_types
+ text/plain
+ text/css
+ text/js
+ text/xml
+ text/javascript
+ application/javascript
+ application/x-javascript
+ application/json
+ application/xml
+ application/xml+rss
+ image/svg+xml;
+ gzip_vary on;
+
+ # Banned locations (only reached if the earlier PHP entry point regexes don't match)
+ location ~* (\.php$|\.htaccess$|\.git) {
+ deny all;
+ }
+}
\ No newline at end of file
diff --git a/dev/php71/Dockerfile b/dev/php71/Dockerfile
new file mode 100644
index 0000000..9aaac9d
--- /dev/null
+++ b/dev/php71/Dockerfile
@@ -0,0 +1,75 @@
+FROM php:7.1-fpm
+
+LABEL MAINTAINER="Patrick McLain "
+
+# Install dependencies
+RUN apt-get update \
+ && apt-get install -y \
+ libfreetype6-dev \
+ libicu-dev \
+ libjpeg62-turbo-dev \
+ libmcrypt-dev \
+ libpng-dev \
+ libxslt1-dev \
+ openssl \
+ sudo \
+ cron \
+ rsyslog \
+ mysql-client \
+ git \
+ ssmtp \
+ unzip \
+ procps
+
+# Configure the gd library
+RUN docker-php-ext-configure \
+ gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
+
+# Install required PHP extensions
+
+RUN docker-php-ext-install \
+ dom \
+ gd \
+ intl \
+ mbstring \
+ pdo_mysql \
+ xsl \
+ zip \
+ soap \
+ bcmath \
+ mcrypt
+
+RUN pecl install -o -f xdebug
+
+VOLUME /root/.composer/cache
+RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
+
+ENV PHP_MEMORY_LIMIT 756M
+ENV XDEBUG_REMOTE_HOST docker.for.mac.localhost
+ENV MAGENTO_ROOT /var/www/magento
+ENV MAGENTO_CLEAN_DATABASE 0
+ENV XDEBUG_ENABLE false
+
+ADD etc/php-fpm.ini /usr/local/etc/php/conf.d/zz-magento.ini
+ADD etc/php-xdebug.ini /usr/local/etc/php/conf.d/zz-xdebug.ini
+RUN echo "sendmail_path = /usr/sbin/ssmtp -t" > /usr/local/etc/php/conf.d/zz-sendmail.ini
+RUN echo "mailhub=mailcatcher:25\nUseTLS=NO\nFromLineOverride=YES" > /etc/ssmtp/ssmtp.conf
+
+ADD bin/* /usr/local/bin/
+
+RUN ["chmod", "+x", "/usr/local/bin/magento"]
+RUN ["chmod", "+x", "/usr/local/bin/magento-installer"]
+RUN ["chmod", "+x", "/usr/local/bin/module-installer"]
+RUN ["chmod", "+x", "/usr/local/bin/test-unit"]
+RUN ["chmod", "+x", "/usr/local/bin/test-integration"]
+RUN ["chmod", "+x", "/usr/local/bin/test-acceptance"]
+
+ADD docker-entrypoint.sh /docker-entrypoint.sh
+
+RUN ["chmod", "+x", "/docker-entrypoint.sh"]
+
+ENTRYPOINT ["/docker-entrypoint.sh"]
+
+ADD etc/php-fpm.conf /usr/local/etc/
+
+CMD ["php-fpm", "-F", "-R"]
\ No newline at end of file
diff --git a/dev/php71/bin/magento b/dev/php71/bin/magento
new file mode 100644
index 0000000..a9dfe14
--- /dev/null
+++ b/dev/php71/bin/magento
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+MAGENTO_COMMAND="php $MAGENTO_ROOT/bin/magento"
+
+$MAGENTO_COMMAND "$@"
diff --git a/dev/php71/bin/magento-installer b/dev/php71/bin/magento-installer
new file mode 100644
index 0000000..4377e3b
--- /dev/null
+++ b/dev/php71/bin/magento-installer
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+MAGENTO_COMMAND="php $MAGENTO_ROOT/bin/magento"
+INSTALL_COMMAND="setup:install \
+ --admin-firstname admin \
+ --admin-lastname user \
+ --admin-email admin@mage2.docker \
+ --admin-user admin \
+ --admin-password passwd123 \
+ --base-url $MAGENTO_URL \
+ --backend-frontname admin \
+ --db-host db \
+ --db-name magento \
+ --db-user magento \
+ --db-password magento \
+ --use-rewrites 1 \
+ --use-secure 1 \
+ --base-url-secure $MAGENTO_URL \
+ --use-secure-admin 1 \
+ --admin-use-security-key 0 \
+ --session-save redis \
+ --session-save-redis-host redis \
+ --session-save-redis-db 0 \
+ --admin-use-security-key 0"
+
+$MAGENTO_COMMAND $INSTALL_COMMAND
diff --git a/dev/php71/bin/module-installer b/dev/php71/bin/module-installer
new file mode 100644
index 0000000..85ad2bf
--- /dev/null
+++ b/dev/php71/bin/module-installer
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+[ ! -f "${MAGENTO_ROOT}/index.php" ] && \
+ echo "Creating Magento composer project" && \
+ composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition:$MAGENTO_VERSION $MAGENTO_ROOT
+
+composer config minimum-stability dev -d $MAGENTO_ROOT
+composer config repositories.stripe path /module -d $MAGENTO_ROOT
+composer require pmclain/module-stripe:@dev -d $MAGENTO_ROOT
diff --git a/dev/php71/bin/test-acceptance b/dev/php71/bin/test-acceptance
new file mode 100644
index 0000000..27f9a2b
--- /dev/null
+++ b/dev/php71/bin/test-acceptance
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+cd $MAGENTO_ROOT
+
+[ -f "${MAGENTO_ROOT}/app/etc/env.php" ] && rm ${MAGENTO_ROOT}/app/etc/env.php
+
+# Prevent RSA check when installing MFTF :(
+mkdir -p ~/.ssh
+echo -e "Host *\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
+
+magento setup:install \
+ --admin-firstname admin \
+ --admin-lastname user \
+ --admin-email admin@mage2.docker \
+ --admin-user admin \
+ --admin-password passwd123 \
+ --base-url http://stripe.docker/ \
+ --backend-frontname admin \
+ --db-host db \
+ --db-name magento \
+ --db-user magento \
+ --db-password magento \
+ --use-rewrites 1 \
+ --use-secure 0 \
+ --use-secure-admin 0 \
+ --admin-use-security-key 0 \
+ --session-save redis \
+ --session-save-redis-host redis \
+ --session-save-redis-db 0 \
+ --admin-use-security-key 0
+
+php bin/magento deploy:mode:set production
+
+cp vendor/pmclain/module-stripe/src/Test/Acceptance/etc/.env.dist dev/tests/acceptance/.env
+
+cd dev/tests/acceptance
+composer install
+
+vendor/bin/robo build:project
+vendor/bin/robo generate:tests
+vendor/bin/codecept run functional --group pmclain_stripe
diff --git a/dev/php71/bin/test-integration b/dev/php71/bin/test-integration
new file mode 100644
index 0000000..ea3a05a
--- /dev/null
+++ b/dev/php71/bin/test-integration
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+cd $MAGENTO_ROOT
+
+cp vendor/pmclain/module-stripe/src/Test/Integration/phpunit.xml.dist dev/tests/integration/phpunit.xml
+cp vendor/pmclain/module-stripe/src/Test/Integration/etc/install-config-mysql.php.dist dev/tests/integration/etc/install-config-mysql.php
+
+cd dev/tests/integration
+
+../../../vendor/bin/phpunit
\ No newline at end of file
diff --git a/dev/php71/bin/test-unit b/dev/php71/bin/test-unit
new file mode 100644
index 0000000..de530fb
--- /dev/null
+++ b/dev/php71/bin/test-unit
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+cd $MAGENTO_ROOT
+
+cp vendor/pmclain/module-stripe/src/Test/Unit/phpunit.xml.dist dev/tests/unit/phpunit.xml
+cd dev/tests/unit
+
+../../../vendor/bin/phpunit
\ No newline at end of file
diff --git a/dev/php71/docker-entrypoint.sh b/dev/php71/docker-entrypoint.sh
new file mode 100644
index 0000000..31fdb38
--- /dev/null
+++ b/dev/php71/docker-entrypoint.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# Setup Magento cron
+echo "* * * * * www-data /usr/local/bin/php ${MAGENTO_ROOT}/bin/magento cron:run | grep -v \"Ran jobs by schedule\" >> ${MAGENTO_ROOT}/var/log/magento.cron.log" > /etc/cron.d/magento
+echo "* * * * * www-data /usr/local/bin/php ${MAGENTO_ROOT}/update/cron.php >> ${MAGENTO_ROOT}/var/log/update.cron.log" >> /etc/cron.d/magento
+echo "* * * * * www-data /usr/local/bin/php ${MAGENTO_ROOT}/bin/magento setup:cron:run >> ${MAGENTO_ROOT}/var/log/setup.cron.log" >> /etc/cron.d/magento
+
+# Substitute in php.ini values
+[ ! -z "${PHP_MEMORY_LIMIT}" ] && sed -i "s/!PHP_MEMORY_LIMIT!/${PHP_MEMORY_LIMIT}/" /usr/local/etc/php/conf.d/zz-magento.ini
+[ ! -z "${XDEBUG_REMOTE_HOST}" ] && sed -i "s/!XDEBUG_REMOTE_HOST!/${XDEBUG_REMOTE_HOST}/" /usr/local/etc/php/conf.d/zz-xdebug.ini
+
+# Configure PHP-FPM
+[ ! -z "${MAGENTO_RUN_MODE}" ] && sed -i "s/!MAGENTO_RUN_MODE!/${MAGENTO_RUN_MODE}/" /usr/local/etc/php-fpm.conf
+
+[ "$XDEBUG_ENABLE" = "true" ] && \
+ docker-php-ext-enable xdebug && \
+ echo "Xdebug is enabled"
+
+[ ! -z "${COMPOSER_MAGENTO_USERNAME}" ] && \
+ composer config --global http-basic.repo.magento.com \
+ $COMPOSER_MAGENTO_USERNAME $COMPOSER_MAGENTO_PASSWORD
+
+[ ! -z "${COMPOSER_GITHUB_TOKEN}" ] && \
+ composer config -g github-oauth.github.com $COMPOSER_GITHUB_TOKEN
+
+exec "$@"
diff --git a/dev/php71/etc/php-fpm.conf b/dev/php71/etc/php-fpm.conf
new file mode 100644
index 0000000..5a357a0
--- /dev/null
+++ b/dev/php71/etc/php-fpm.conf
@@ -0,0 +1,27 @@
+[global]
+
+error_log = /proc/self/fd/2
+daemonize = no
+
+[www]
+
+; if we send this to /proc/self/fd/1, it never appears
+access.log = /proc/self/fd/2
+
+user = root
+group = root
+
+listen = [::]:9000
+
+pm = dynamic
+pm.max_children = 10
+pm.start_servers = 4
+pm.min_spare_servers = 2
+pm.max_spare_servers = 6
+
+env[MAGE_MODE] = !MAGENTO_RUN_MODE!; # Variable: MAGENTO_RUN_MODE
+
+clear_env = no
+
+; Ensure worker stdout and stderr are sent to the main error log.
+catch_workers_output = yes
\ No newline at end of file
diff --git a/dev/php71/etc/php-fpm.ini b/dev/php71/etc/php-fpm.ini
new file mode 100644
index 0000000..10391e6
--- /dev/null
+++ b/dev/php71/etc/php-fpm.ini
@@ -0,0 +1,2 @@
+
+memory_limit = !PHP_MEMORY_LIMIT!
\ No newline at end of file
diff --git a/dev/php71/etc/php-xdebug.ini b/dev/php71/etc/php-xdebug.ini
new file mode 100644
index 0000000..ef8e2a9
--- /dev/null
+++ b/dev/php71/etc/php-xdebug.ini
@@ -0,0 +1,11 @@
+xdebug.remote_enable = 1
+xdebug.remote_autostart = 1
+xdebug.remote_host = !XDEBUG_REMOTE_HOST!
+xdebug.remote_port = 9100
+
+xdebug.scream = 0
+xdebug.show_local_vars = 1
+
+; xdebug.remote_log = /var/www/magento/xdebug.log
+
+xdebug.idekey = PHPSTORM
\ No newline at end of file
diff --git a/Block/Customer/CardRenderer.php b/src/Block/Customer/CardRenderer.php
similarity index 100%
rename from Block/Customer/CardRenderer.php
rename to src/Block/Customer/CardRenderer.php
diff --git a/Block/Form.php b/src/Block/Form.php
similarity index 100%
rename from Block/Form.php
rename to src/Block/Form.php
diff --git a/Block/Info.php b/src/Block/Info.php
similarity index 100%
rename from Block/Info.php
rename to src/Block/Info.php
diff --git a/Block/Payment.php b/src/Block/Payment.php
similarity index 100%
rename from Block/Payment.php
rename to src/Block/Payment.php
diff --git a/Controller/ThreeDSecure/Redirect.php b/src/Controller/ThreeDSecure/Redirect.php
similarity index 100%
rename from Controller/ThreeDSecure/Redirect.php
rename to src/Controller/ThreeDSecure/Redirect.php
diff --git a/Gateway/Command/CaptureStrategyCommand.php b/src/Gateway/Command/CaptureStrategyCommand.php
similarity index 100%
rename from Gateway/Command/CaptureStrategyCommand.php
rename to src/Gateway/Command/CaptureStrategyCommand.php
diff --git a/Gateway/Config/CanVoidHandler.php b/src/Gateway/Config/CanVoidHandler.php
similarity index 100%
rename from Gateway/Config/CanVoidHandler.php
rename to src/Gateway/Config/CanVoidHandler.php
diff --git a/Gateway/Config/Config.php b/src/Gateway/Config/Config.php
similarity index 100%
rename from Gateway/Config/Config.php
rename to src/Gateway/Config/Config.php
diff --git a/Gateway/Helper/SubjectReader.php b/src/Gateway/Helper/SubjectReader.php
similarity index 100%
rename from Gateway/Helper/SubjectReader.php
rename to src/Gateway/Helper/SubjectReader.php
diff --git a/Gateway/Http/Client/AbstractTransaction.php b/src/Gateway/Http/Client/AbstractTransaction.php
similarity index 100%
rename from Gateway/Http/Client/AbstractTransaction.php
rename to src/Gateway/Http/Client/AbstractTransaction.php
diff --git a/Gateway/Http/Client/TransactionRefund.php b/src/Gateway/Http/Client/TransactionRefund.php
similarity index 100%
rename from Gateway/Http/Client/TransactionRefund.php
rename to src/Gateway/Http/Client/TransactionRefund.php
diff --git a/Gateway/Http/Client/TransactionSale.php b/src/Gateway/Http/Client/TransactionSale.php
similarity index 100%
rename from Gateway/Http/Client/TransactionSale.php
rename to src/Gateway/Http/Client/TransactionSale.php
diff --git a/Gateway/Http/Client/TransactionSubmitForSettlement.php b/src/Gateway/Http/Client/TransactionSubmitForSettlement.php
similarity index 100%
rename from Gateway/Http/Client/TransactionSubmitForSettlement.php
rename to src/Gateway/Http/Client/TransactionSubmitForSettlement.php
diff --git a/Gateway/Http/Client/TransactionVoid.php b/src/Gateway/Http/Client/TransactionVoid.php
similarity index 100%
rename from Gateway/Http/Client/TransactionVoid.php
rename to src/Gateway/Http/Client/TransactionVoid.php
diff --git a/Gateway/Http/TransferFactory.php b/src/Gateway/Http/TransferFactory.php
similarity index 100%
rename from Gateway/Http/TransferFactory.php
rename to src/Gateway/Http/TransferFactory.php
diff --git a/Gateway/Request/AddressDataBuilder.php b/src/Gateway/Request/AddressDataBuilder.php
similarity index 100%
rename from Gateway/Request/AddressDataBuilder.php
rename to src/Gateway/Request/AddressDataBuilder.php
diff --git a/Gateway/Request/CaptureDataBuilder.php b/src/Gateway/Request/CaptureDataBuilder.php
similarity index 100%
rename from Gateway/Request/CaptureDataBuilder.php
rename to src/Gateway/Request/CaptureDataBuilder.php
diff --git a/Gateway/Request/CustomerDataBuilder.php b/src/Gateway/Request/CustomerDataBuilder.php
similarity index 100%
rename from Gateway/Request/CustomerDataBuilder.php
rename to src/Gateway/Request/CustomerDataBuilder.php
diff --git a/Gateway/Request/PaymentDataBuilder.php b/src/Gateway/Request/PaymentDataBuilder.php
similarity index 100%
rename from Gateway/Request/PaymentDataBuilder.php
rename to src/Gateway/Request/PaymentDataBuilder.php
diff --git a/Gateway/Request/PaymentDataBuilder/Admin.php b/src/Gateway/Request/PaymentDataBuilder/Admin.php
similarity index 100%
rename from Gateway/Request/PaymentDataBuilder/Admin.php
rename to src/Gateway/Request/PaymentDataBuilder/Admin.php
diff --git a/Gateway/Request/PaymentDataBuilder/Vault.php b/src/Gateway/Request/PaymentDataBuilder/Vault.php
similarity index 100%
rename from Gateway/Request/PaymentDataBuilder/Vault.php
rename to src/Gateway/Request/PaymentDataBuilder/Vault.php
diff --git a/Gateway/Request/PaymentDataBuilder/Vault/Admin.php b/src/Gateway/Request/PaymentDataBuilder/Vault/Admin.php
similarity index 100%
rename from Gateway/Request/PaymentDataBuilder/Vault/Admin.php
rename to src/Gateway/Request/PaymentDataBuilder/Vault/Admin.php
diff --git a/Gateway/Request/RefundDataBuilder.php b/src/Gateway/Request/RefundDataBuilder.php
similarity index 100%
rename from Gateway/Request/RefundDataBuilder.php
rename to src/Gateway/Request/RefundDataBuilder.php
diff --git a/Gateway/Request/SettlementDataBuilder.php b/src/Gateway/Request/SettlementDataBuilder.php
similarity index 100%
rename from Gateway/Request/SettlementDataBuilder.php
rename to src/Gateway/Request/SettlementDataBuilder.php
diff --git a/Gateway/Request/ThreeDSecureBuilder.php b/src/Gateway/Request/ThreeDSecureBuilder.php
similarity index 100%
rename from Gateway/Request/ThreeDSecureBuilder.php
rename to src/Gateway/Request/ThreeDSecureBuilder.php
diff --git a/Gateway/Request/VoidDataBuilder.php b/src/Gateway/Request/VoidDataBuilder.php
similarity index 100%
rename from Gateway/Request/VoidDataBuilder.php
rename to src/Gateway/Request/VoidDataBuilder.php
diff --git a/Gateway/Response/CardDetailsHandler.php b/src/Gateway/Response/CardDetailsHandler.php
similarity index 100%
rename from Gateway/Response/CardDetailsHandler.php
rename to src/Gateway/Response/CardDetailsHandler.php
diff --git a/Gateway/Response/PaymentDetailsHandler.php b/src/Gateway/Response/PaymentDetailsHandler.php
similarity index 100%
rename from Gateway/Response/PaymentDetailsHandler.php
rename to src/Gateway/Response/PaymentDetailsHandler.php
diff --git a/Gateway/Response/RefundHandler.php b/src/Gateway/Response/RefundHandler.php
similarity index 100%
rename from Gateway/Response/RefundHandler.php
rename to src/Gateway/Response/RefundHandler.php
diff --git a/Gateway/Response/TransactionIdHandler.php b/src/Gateway/Response/TransactionIdHandler.php
similarity index 100%
rename from Gateway/Response/TransactionIdHandler.php
rename to src/Gateway/Response/TransactionIdHandler.php
diff --git a/Gateway/Response/VaultDetailsHandler.php b/src/Gateway/Response/VaultDetailsHandler.php
similarity index 100%
rename from Gateway/Response/VaultDetailsHandler.php
rename to src/Gateway/Response/VaultDetailsHandler.php
diff --git a/Gateway/Response/VoidHandler.php b/src/Gateway/Response/VoidHandler.php
similarity index 100%
rename from Gateway/Response/VoidHandler.php
rename to src/Gateway/Response/VoidHandler.php
diff --git a/Gateway/Validator/GeneralResponseValidator.php b/src/Gateway/Validator/GeneralResponseValidator.php
similarity index 100%
rename from Gateway/Validator/GeneralResponseValidator.php
rename to src/Gateway/Validator/GeneralResponseValidator.php
diff --git a/Gateway/Validator/ResponseValidator.php b/src/Gateway/Validator/ResponseValidator.php
similarity index 100%
rename from Gateway/Validator/ResponseValidator.php
rename to src/Gateway/Validator/ResponseValidator.php
diff --git a/Gateway/Validator/ResponseValidator/Authorize.php b/src/Gateway/Validator/ResponseValidator/Authorize.php
similarity index 100%
rename from Gateway/Validator/ResponseValidator/Authorize.php
rename to src/Gateway/Validator/ResponseValidator/Authorize.php
diff --git a/Helper/CcType.php b/src/Helper/CcType.php
similarity index 100%
rename from Helper/CcType.php
rename to src/Helper/CcType.php
diff --git a/Helper/Payment/Formatter.php b/src/Helper/Payment/Formatter.php
similarity index 100%
rename from Helper/Payment/Formatter.php
rename to src/Helper/Payment/Formatter.php
diff --git a/Model/Adapter/StripeAdapter.php b/src/Model/Adapter/StripeAdapter.php
similarity index 100%
rename from Model/Adapter/StripeAdapter.php
rename to src/Model/Adapter/StripeAdapter.php
diff --git a/Model/Adapter/StripeSearchAdapter.php b/src/Model/Adapter/StripeSearchAdapter.php
similarity index 100%
rename from Model/Adapter/StripeSearchAdapter.php
rename to src/Model/Adapter/StripeSearchAdapter.php
diff --git a/Model/Adminhtml/Source/Cctype.php b/src/Model/Adminhtml/Source/Cctype.php
similarity index 100%
rename from Model/Adminhtml/Source/Cctype.php
rename to src/Model/Adminhtml/Source/Cctype.php
diff --git a/Model/Adminhtml/Source/PaymentAction.php b/src/Model/Adminhtml/Source/PaymentAction.php
similarity index 100%
rename from Model/Adminhtml/Source/PaymentAction.php
rename to src/Model/Adminhtml/Source/PaymentAction.php
diff --git a/Model/Helper/OrderPlace.php b/src/Model/Helper/OrderPlace.php
similarity index 100%
rename from Model/Helper/OrderPlace.php
rename to src/Model/Helper/OrderPlace.php
diff --git a/Model/InstantPurchase/CreditCard/TokenFormatter.php b/src/Model/InstantPurchase/CreditCard/TokenFormatter.php
similarity index 100%
rename from Model/InstantPurchase/CreditCard/TokenFormatter.php
rename to src/Model/InstantPurchase/CreditCard/TokenFormatter.php
diff --git a/Model/Ui/Adminhtml/TokenUiComponentProvider.php b/src/Model/Ui/Adminhtml/TokenUiComponentProvider.php
similarity index 100%
rename from Model/Ui/Adminhtml/TokenUiComponentProvider.php
rename to src/Model/Ui/Adminhtml/TokenUiComponentProvider.php
diff --git a/Model/Ui/ConfigProvider.php b/src/Model/Ui/ConfigProvider.php
similarity index 100%
rename from Model/Ui/ConfigProvider.php
rename to src/Model/Ui/ConfigProvider.php
diff --git a/Model/Ui/TokenUiComponentProvider.php b/src/Model/Ui/TokenUiComponentProvider.php
similarity index 100%
rename from Model/Ui/TokenUiComponentProvider.php
rename to src/Model/Ui/TokenUiComponentProvider.php
diff --git a/Observer/DataAssignObserver.php b/src/Observer/DataAssignObserver.php
similarity index 100%
rename from Observer/DataAssignObserver.php
rename to src/Observer/DataAssignObserver.php
diff --git a/Observer/VaultTokenObserver.php b/src/Observer/VaultTokenObserver.php
similarity index 100%
rename from Observer/VaultTokenObserver.php
rename to src/Observer/VaultTokenObserver.php
diff --git a/Setup/InstallData.php b/src/Setup/InstallData.php
similarity index 100%
rename from Setup/InstallData.php
rename to src/Setup/InstallData.php
diff --git a/Setup/UpgradeData.php b/src/Setup/UpgradeData.php
similarity index 100%
rename from Setup/UpgradeData.php
rename to src/Setup/UpgradeData.php
diff --git a/Test/Acceptance/ActionGroup/CompleteGuestAddressFormActionGroup.xml b/src/Test/Acceptance/ActionGroup/CompleteGuestAddressFormActionGroup.xml
similarity index 100%
rename from Test/Acceptance/ActionGroup/CompleteGuestAddressFormActionGroup.xml
rename to src/Test/Acceptance/ActionGroup/CompleteGuestAddressFormActionGroup.xml
diff --git a/Test/Acceptance/ActionGroup/CompleteStripePaymentFormActionGroup.xml b/src/Test/Acceptance/ActionGroup/CompleteStripePaymentFormActionGroup.xml
similarity index 100%
rename from Test/Acceptance/ActionGroup/CompleteStripePaymentFormActionGroup.xml
rename to src/Test/Acceptance/ActionGroup/CompleteStripePaymentFormActionGroup.xml
diff --git a/Test/Acceptance/ActionGroup/GetToCheckoutActionGroup.xml b/src/Test/Acceptance/ActionGroup/GetToCheckoutActionGroup.xml
similarity index 100%
rename from Test/Acceptance/ActionGroup/GetToCheckoutActionGroup.xml
rename to src/Test/Acceptance/ActionGroup/GetToCheckoutActionGroup.xml
diff --git a/Test/Acceptance/ActionGroup/ValidateOrderActionGroup.xml b/src/Test/Acceptance/ActionGroup/ValidateOrderActionGroup.xml
similarity index 100%
rename from Test/Acceptance/ActionGroup/ValidateOrderActionGroup.xml
rename to src/Test/Acceptance/ActionGroup/ValidateOrderActionGroup.xml
diff --git a/Test/Acceptance/Data/CardData.xml b/src/Test/Acceptance/Data/CardData.xml
similarity index 100%
rename from Test/Acceptance/Data/CardData.xml
rename to src/Test/Acceptance/Data/CardData.xml
diff --git a/Test/Acceptance/Data/StripeConfigData.xml b/src/Test/Acceptance/Data/StripeConfigData.xml
similarity index 100%
rename from Test/Acceptance/Data/StripeConfigData.xml
rename to src/Test/Acceptance/Data/StripeConfigData.xml
diff --git a/Test/Acceptance/Metadata/stripe_config-meta.xml b/src/Test/Acceptance/Metadata/stripe_config-meta.xml
similarity index 100%
rename from Test/Acceptance/Metadata/stripe_config-meta.xml
rename to src/Test/Acceptance/Metadata/stripe_config-meta.xml
diff --git a/Test/Acceptance/Section/CheckoutPaymentSection.xml b/src/Test/Acceptance/Section/CheckoutPaymentSection.xml
similarity index 98%
rename from Test/Acceptance/Section/CheckoutPaymentSection.xml
rename to src/Test/Acceptance/Section/CheckoutPaymentSection.xml
index 63d6291..c4f3538 100644
--- a/Test/Acceptance/Section/CheckoutPaymentSection.xml
+++ b/src/Test/Acceptance/Section/CheckoutPaymentSection.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/Test/Acceptance/Section/StripeIframeSection.xml b/src/Test/Acceptance/Section/StripeIframeSection.xml
similarity index 100%
rename from Test/Acceptance/Section/StripeIframeSection.xml
rename to src/Test/Acceptance/Section/StripeIframeSection.xml
diff --git a/Test/Acceptance/Section/ThreeDConfirmationSection.xml b/src/Test/Acceptance/Section/ThreeDConfirmationSection.xml
similarity index 89%
rename from Test/Acceptance/Section/ThreeDConfirmationSection.xml
rename to src/Test/Acceptance/Section/ThreeDConfirmationSection.xml
index 08028b0..c875c0d 100644
--- a/Test/Acceptance/Section/ThreeDConfirmationSection.xml
+++ b/src/Test/Acceptance/Section/ThreeDConfirmationSection.xml
@@ -18,6 +18,6 @@
diff --git a/Test/Acceptance/Test/StorefrontStripeCustomerCheckoutTest.xml b/src/Test/Acceptance/Test/StorefrontStripeCustomerCheckoutTest.xml
similarity index 94%
rename from Test/Acceptance/Test/StorefrontStripeCustomerCheckoutTest.xml
rename to src/Test/Acceptance/Test/StorefrontStripeCustomerCheckoutTest.xml
index f7420e3..7284fa6 100644
--- a/Test/Acceptance/Test/StorefrontStripeCustomerCheckoutTest.xml
+++ b/src/Test/Acceptance/Test/StorefrontStripeCustomerCheckoutTest.xml
@@ -16,7 +16,7 @@
*/
-->
+ xsi:noNamespaceSchemaLocation="../../../../dev/magento/dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
diff --git a/Test/Acceptance/Test/StorefrontStripeCustomerSaveVault3dSecureCheckoutTest.xml b/src/Test/Acceptance/Test/StorefrontStripeCustomerSaveVault3dSecureCheckoutTest.xml
similarity index 96%
rename from Test/Acceptance/Test/StorefrontStripeCustomerSaveVault3dSecureCheckoutTest.xml
rename to src/Test/Acceptance/Test/StorefrontStripeCustomerSaveVault3dSecureCheckoutTest.xml
index 233a57c..c4c98df 100644
--- a/Test/Acceptance/Test/StorefrontStripeCustomerSaveVault3dSecureCheckoutTest.xml
+++ b/src/Test/Acceptance/Test/StorefrontStripeCustomerSaveVault3dSecureCheckoutTest.xml
@@ -16,7 +16,7 @@
*/
-->
+ xsi:noNamespaceSchemaLocation="../../../../dev/magento/dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
diff --git a/Test/Acceptance/Test/StorefrontStripeCustomerSaveVaultCheckoutTest.xml b/src/Test/Acceptance/Test/StorefrontStripeCustomerSaveVaultCheckoutTest.xml
similarity index 96%
rename from Test/Acceptance/Test/StorefrontStripeCustomerSaveVaultCheckoutTest.xml
rename to src/Test/Acceptance/Test/StorefrontStripeCustomerSaveVaultCheckoutTest.xml
index 7549a36..e4f8fb8 100644
--- a/Test/Acceptance/Test/StorefrontStripeCustomerSaveVaultCheckoutTest.xml
+++ b/src/Test/Acceptance/Test/StorefrontStripeCustomerSaveVaultCheckoutTest.xml
@@ -16,7 +16,7 @@
*/
-->
+ xsi:noNamespaceSchemaLocation="../../../../dev/magento/dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
diff --git a/Test/Acceptance/Test/StorefrontStripeGuestCheckout3dSecureTest.xml b/src/Test/Acceptance/Test/StorefrontStripeGuestCheckout3dSecureTest.xml
similarity index 95%
rename from Test/Acceptance/Test/StorefrontStripeGuestCheckout3dSecureTest.xml
rename to src/Test/Acceptance/Test/StorefrontStripeGuestCheckout3dSecureTest.xml
index bda79ea..705e7fe 100644
--- a/Test/Acceptance/Test/StorefrontStripeGuestCheckout3dSecureTest.xml
+++ b/src/Test/Acceptance/Test/StorefrontStripeGuestCheckout3dSecureTest.xml
@@ -16,7 +16,7 @@
*/
-->
+ xsi:noNamespaceSchemaLocation="../../../../dev/magento/dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
diff --git a/Test/Acceptance/Test/StorefrontStripeGuestCheckoutTest.xml b/src/Test/Acceptance/Test/StorefrontStripeGuestCheckoutTest.xml
similarity index 94%
rename from Test/Acceptance/Test/StorefrontStripeGuestCheckoutTest.xml
rename to src/Test/Acceptance/Test/StorefrontStripeGuestCheckoutTest.xml
index 9adba33..105c95a 100644
--- a/Test/Acceptance/Test/StorefrontStripeGuestCheckoutTest.xml
+++ b/src/Test/Acceptance/Test/StorefrontStripeGuestCheckoutTest.xml
@@ -16,7 +16,7 @@
*/
-->
+ xsi:noNamespaceSchemaLocation="../../../../dev/magento/dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
diff --git a/src/Test/Acceptance/etc/.env.dist b/src/Test/Acceptance/etc/.env.dist
new file mode 100644
index 0000000..d79c999
--- /dev/null
+++ b/src/Test/Acceptance/etc/.env.dist
@@ -0,0 +1,14 @@
+MAGENTO_BASE_URL=http://stripe.docker/
+
+MAGENTO_BACKEND_NAME=admin
+MAGENTO_ADMIN_USERNAME=admin
+MAGENTO_ADMIN_PASSWORD=passwd123
+
+SELENIUM_HOST=chrome
+SELENIUM_PORT=4444
+SELENIUM_PROTOCOL=http
+SELENIUM_PATH=/wd/hub
+
+CUSTOM_MODULE_PATHS=/module/src/Test/Acceptance
+
+#MFTF_DEBUG=true
diff --git a/Test/Integration/Model/StripeAdapterTest.php b/src/Test/Integration/Model/StripeAdapterTest.php
similarity index 98%
rename from Test/Integration/Model/StripeAdapterTest.php
rename to src/Test/Integration/Model/StripeAdapterTest.php
index 3770877..6d64b65 100644
--- a/Test/Integration/Model/StripeAdapterTest.php
+++ b/src/Test/Integration/Model/StripeAdapterTest.php
@@ -29,7 +29,7 @@ class StripeAdapterTest extends TestCase
{
use Formatter;
- const STRIPE_MOCK_URL = 'http://localhost:12111';
+ const STRIPE_MOCK_URL = 'http://stripemock:12111';
const STRIPE_MOCK_API_KEY = 'sk_test_123';
/**
diff --git a/src/Test/Integration/etc/install-config-mysql.php.dist b/src/Test/Integration/etc/install-config-mysql.php.dist
new file mode 100644
index 0000000..f29831a
--- /dev/null
+++ b/src/Test/Integration/etc/install-config-mysql.php.dist
@@ -0,0 +1,23 @@
+ 'db',
+ 'db-user' => 'magento',
+ 'db-password' => 'magento',
+ 'db-name' => 'magento',
+ 'db-prefix' => '',
+ 'backend-frontname' => 'backend',
+ 'admin-user' => \Magento\TestFramework\Bootstrap::ADMIN_NAME,
+ 'admin-password' => \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD,
+ 'admin-email' => \Magento\TestFramework\Bootstrap::ADMIN_EMAIL,
+ 'admin-firstname' => \Magento\TestFramework\Bootstrap::ADMIN_FIRSTNAME,
+ 'admin-lastname' => \Magento\TestFramework\Bootstrap::ADMIN_LASTNAME,
+ 'session-save' => 'redis',
+ 'session-save-redis-host' => 'redis',
+ 'session-save-redis-db' => '0',
+ 'admin-use-security-key' => '0',
+];
diff --git a/src/Test/Integration/phpunit.xml.dist b/src/Test/Integration/phpunit.xml.dist
new file mode 100644
index 0000000..8b6df81
--- /dev/null
+++ b/src/Test/Integration/phpunit.xml.dist
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+ ../../../vendor/pmclain/module-stripe/src/Test/Integration
+
+
+
+
+
+ ../../../vendor/pmclain/module-stripe/src
+
+ ../../../vendor/pmclain/module-stripe/src/Test
+
+
+
+
+
+ .
+ testsuite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Test/Unit/Block/Customer/CardRendererTest.php b/src/Test/Unit/Block/Customer/CardRendererTest.php
similarity index 100%
rename from Test/Unit/Block/Customer/CardRendererTest.php
rename to src/Test/Unit/Block/Customer/CardRendererTest.php
diff --git a/Test/Unit/Block/FormTest.php b/src/Test/Unit/Block/FormTest.php
similarity index 100%
rename from Test/Unit/Block/FormTest.php
rename to src/Test/Unit/Block/FormTest.php
diff --git a/Test/Unit/Block/InfoTest.php b/src/Test/Unit/Block/InfoTest.php
similarity index 100%
rename from Test/Unit/Block/InfoTest.php
rename to src/Test/Unit/Block/InfoTest.php
diff --git a/Test/Unit/Block/PaymentTest.php b/src/Test/Unit/Block/PaymentTest.php
similarity index 100%
rename from Test/Unit/Block/PaymentTest.php
rename to src/Test/Unit/Block/PaymentTest.php
diff --git a/Test/Unit/Gateway/Command/CaptureStrategyCommandTest.php b/src/Test/Unit/Gateway/Command/CaptureStrategyCommandTest.php
similarity index 100%
rename from Test/Unit/Gateway/Command/CaptureStrategyCommandTest.php
rename to src/Test/Unit/Gateway/Command/CaptureStrategyCommandTest.php
diff --git a/Test/Unit/Gateway/Config/CanVoidHandlerTest.php b/src/Test/Unit/Gateway/Config/CanVoidHandlerTest.php
similarity index 100%
rename from Test/Unit/Gateway/Config/CanVoidHandlerTest.php
rename to src/Test/Unit/Gateway/Config/CanVoidHandlerTest.php
diff --git a/Test/Unit/Gateway/Config/ConfigTest.php b/src/Test/Unit/Gateway/Config/ConfigTest.php
similarity index 100%
rename from Test/Unit/Gateway/Config/ConfigTest.php
rename to src/Test/Unit/Gateway/Config/ConfigTest.php
diff --git a/Test/Unit/Gateway/Helper/SubjectReaderTest.php b/src/Test/Unit/Gateway/Helper/SubjectReaderTest.php
similarity index 100%
rename from Test/Unit/Gateway/Helper/SubjectReaderTest.php
rename to src/Test/Unit/Gateway/Helper/SubjectReaderTest.php
diff --git a/Test/Unit/Gateway/Http/Client/TransactionSaleTest.php b/src/Test/Unit/Gateway/Http/Client/TransactionSaleTest.php
similarity index 100%
rename from Test/Unit/Gateway/Http/Client/TransactionSaleTest.php
rename to src/Test/Unit/Gateway/Http/Client/TransactionSaleTest.php
diff --git a/Test/Unit/Gateway/Http/Client/TransactionSubmitForSettlementTest.php b/src/Test/Unit/Gateway/Http/Client/TransactionSubmitForSettlementTest.php
similarity index 100%
rename from Test/Unit/Gateway/Http/Client/TransactionSubmitForSettlementTest.php
rename to src/Test/Unit/Gateway/Http/Client/TransactionSubmitForSettlementTest.php
diff --git a/Test/Unit/Gateway/Http/TransferFactoryTest.php b/src/Test/Unit/Gateway/Http/TransferFactoryTest.php
similarity index 100%
rename from Test/Unit/Gateway/Http/TransferFactoryTest.php
rename to src/Test/Unit/Gateway/Http/TransferFactoryTest.php
diff --git a/Test/Unit/Gateway/Request/AddressDataBuilderTest.php b/src/Test/Unit/Gateway/Request/AddressDataBuilderTest.php
similarity index 100%
rename from Test/Unit/Gateway/Request/AddressDataBuilderTest.php
rename to src/Test/Unit/Gateway/Request/AddressDataBuilderTest.php
diff --git a/Test/Unit/Gateway/Request/CaptureDataBuilderTest.php b/src/Test/Unit/Gateway/Request/CaptureDataBuilderTest.php
similarity index 100%
rename from Test/Unit/Gateway/Request/CaptureDataBuilderTest.php
rename to src/Test/Unit/Gateway/Request/CaptureDataBuilderTest.php
diff --git a/Test/Unit/Gateway/Request/PaymentDataBuilder/VaultTest.php b/src/Test/Unit/Gateway/Request/PaymentDataBuilder/VaultTest.php
similarity index 100%
rename from Test/Unit/Gateway/Request/PaymentDataBuilder/VaultTest.php
rename to src/Test/Unit/Gateway/Request/PaymentDataBuilder/VaultTest.php
diff --git a/Test/Unit/Gateway/Request/PaymentDataBuilderTest.php b/src/Test/Unit/Gateway/Request/PaymentDataBuilderTest.php
similarity index 100%
rename from Test/Unit/Gateway/Request/PaymentDataBuilderTest.php
rename to src/Test/Unit/Gateway/Request/PaymentDataBuilderTest.php
diff --git a/Test/Unit/Gateway/Request/RefundDataBuilderTest.php b/src/Test/Unit/Gateway/Request/RefundDataBuilderTest.php
similarity index 100%
rename from Test/Unit/Gateway/Request/RefundDataBuilderTest.php
rename to src/Test/Unit/Gateway/Request/RefundDataBuilderTest.php
diff --git a/Test/Unit/Gateway/Request/SettlementDataBuilderTest.php b/src/Test/Unit/Gateway/Request/SettlementDataBuilderTest.php
similarity index 100%
rename from Test/Unit/Gateway/Request/SettlementDataBuilderTest.php
rename to src/Test/Unit/Gateway/Request/SettlementDataBuilderTest.php
diff --git a/Test/Unit/Gateway/Request/VoidDataBuilderTest.php b/src/Test/Unit/Gateway/Request/VoidDataBuilderTest.php
similarity index 100%
rename from Test/Unit/Gateway/Request/VoidDataBuilderTest.php
rename to src/Test/Unit/Gateway/Request/VoidDataBuilderTest.php
diff --git a/Test/Unit/Gateway/Response/CardDetailsHandlerTest.php b/src/Test/Unit/Gateway/Response/CardDetailsHandlerTest.php
similarity index 100%
rename from Test/Unit/Gateway/Response/CardDetailsHandlerTest.php
rename to src/Test/Unit/Gateway/Response/CardDetailsHandlerTest.php
diff --git a/Test/Unit/Gateway/Response/PaymentDetailsHandlerTest.php b/src/Test/Unit/Gateway/Response/PaymentDetailsHandlerTest.php
similarity index 100%
rename from Test/Unit/Gateway/Response/PaymentDetailsHandlerTest.php
rename to src/Test/Unit/Gateway/Response/PaymentDetailsHandlerTest.php
diff --git a/Test/Unit/Gateway/Response/RefundHandlerTest.php b/src/Test/Unit/Gateway/Response/RefundHandlerTest.php
similarity index 100%
rename from Test/Unit/Gateway/Response/RefundHandlerTest.php
rename to src/Test/Unit/Gateway/Response/RefundHandlerTest.php
diff --git a/Test/Unit/Gateway/Response/TransactionHandlerTest.php b/src/Test/Unit/Gateway/Response/TransactionHandlerTest.php
similarity index 100%
rename from Test/Unit/Gateway/Response/TransactionHandlerTest.php
rename to src/Test/Unit/Gateway/Response/TransactionHandlerTest.php
diff --git a/Test/Unit/Gateway/Response/VaultDetailsHandlerTest.php b/src/Test/Unit/Gateway/Response/VaultDetailsHandlerTest.php
similarity index 100%
rename from Test/Unit/Gateway/Response/VaultDetailsHandlerTest.php
rename to src/Test/Unit/Gateway/Response/VaultDetailsHandlerTest.php
diff --git a/Test/Unit/Gateway/Response/VoidHandlerTest.php b/src/Test/Unit/Gateway/Response/VoidHandlerTest.php
similarity index 100%
rename from Test/Unit/Gateway/Response/VoidHandlerTest.php
rename to src/Test/Unit/Gateway/Response/VoidHandlerTest.php
diff --git a/Test/Unit/Gateway/Validator/GeneralResponseValidatorTest.php b/src/Test/Unit/Gateway/Validator/GeneralResponseValidatorTest.php
similarity index 100%
rename from Test/Unit/Gateway/Validator/GeneralResponseValidatorTest.php
rename to src/Test/Unit/Gateway/Validator/GeneralResponseValidatorTest.php
diff --git a/Test/Unit/Gateway/Validator/ResponseValidator/AuthorizeTest.php b/src/Test/Unit/Gateway/Validator/ResponseValidator/AuthorizeTest.php
similarity index 100%
rename from Test/Unit/Gateway/Validator/ResponseValidator/AuthorizeTest.php
rename to src/Test/Unit/Gateway/Validator/ResponseValidator/AuthorizeTest.php
diff --git a/Test/Unit/Gateway/Validator/ResponseValidatorTest.php b/src/Test/Unit/Gateway/Validator/ResponseValidatorTest.php
similarity index 100%
rename from Test/Unit/Gateway/Validator/ResponseValidatorTest.php
rename to src/Test/Unit/Gateway/Validator/ResponseValidatorTest.php
diff --git a/Test/Unit/Helper/CcTypeTest.php b/src/Test/Unit/Helper/CcTypeTest.php
similarity index 100%
rename from Test/Unit/Helper/CcTypeTest.php
rename to src/Test/Unit/Helper/CcTypeTest.php
diff --git a/Test/Unit/Helper/Payment/FormatterTest.php b/src/Test/Unit/Helper/Payment/FormatterTest.php
similarity index 100%
rename from Test/Unit/Helper/Payment/FormatterTest.php
rename to src/Test/Unit/Helper/Payment/FormatterTest.php
diff --git a/Test/Unit/phpunit.xml.dist b/src/Test/Unit/phpunit.xml.dist
similarity index 95%
rename from Test/Unit/phpunit.xml.dist
rename to src/Test/Unit/phpunit.xml.dist
index 0333e63..abb7bf7 100644
--- a/Test/Unit/phpunit.xml.dist
+++ b/src/Test/Unit/phpunit.xml.dist
@@ -14,7 +14,7 @@
- ../../../vendor/pmclain/module-stripe/Test/Unit
+ ../../../vendor/pmclain/module-stripe/src/Test/Unit
@@ -23,9 +23,9 @@
- ../../../vendor/pmclain/module-stripe
+ ../../../vendor/pmclain/module-stripe/src
- ../../../vendor/pmclain/module-stripe/Test
+ ../../../vendor/pmclain/module-stripe/src/Test
diff --git a/etc/adminhtml/di.xml b/src/etc/adminhtml/di.xml
similarity index 100%
rename from etc/adminhtml/di.xml
rename to src/etc/adminhtml/di.xml
diff --git a/etc/adminhtml/system.xml b/src/etc/adminhtml/system.xml
similarity index 100%
rename from etc/adminhtml/system.xml
rename to src/etc/adminhtml/system.xml
diff --git a/etc/config.xml b/src/etc/config.xml
similarity index 100%
rename from etc/config.xml
rename to src/etc/config.xml
diff --git a/etc/di.xml b/src/etc/di.xml
similarity index 100%
rename from etc/di.xml
rename to src/etc/di.xml
diff --git a/etc/events.xml b/src/etc/events.xml
similarity index 100%
rename from etc/events.xml
rename to src/etc/events.xml
diff --git a/etc/frontend/di.xml b/src/etc/frontend/di.xml
similarity index 100%
rename from etc/frontend/di.xml
rename to src/etc/frontend/di.xml
diff --git a/etc/frontend/routes.xml b/src/etc/frontend/routes.xml
similarity index 100%
rename from etc/frontend/routes.xml
rename to src/etc/frontend/routes.xml
diff --git a/etc/module.xml b/src/etc/module.xml
similarity index 100%
rename from etc/module.xml
rename to src/etc/module.xml
diff --git a/registration.php b/src/registration.php
similarity index 100%
rename from registration.php
rename to src/registration.php
diff --git a/view/adminhtml/layout/sales_order_create_index.xml b/src/view/adminhtml/layout/sales_order_create_index.xml
similarity index 100%
rename from view/adminhtml/layout/sales_order_create_index.xml
rename to src/view/adminhtml/layout/sales_order_create_index.xml
diff --git a/view/adminhtml/layout/sales_order_create_load_block_billing_method.xml b/src/view/adminhtml/layout/sales_order_create_load_block_billing_method.xml
similarity index 100%
rename from view/adminhtml/layout/sales_order_create_load_block_billing_method.xml
rename to src/view/adminhtml/layout/sales_order_create_load_block_billing_method.xml
diff --git a/view/adminhtml/templates/form/cc.phtml b/src/view/adminhtml/templates/form/cc.phtml
similarity index 100%
rename from view/adminhtml/templates/form/cc.phtml
rename to src/view/adminhtml/templates/form/cc.phtml
diff --git a/view/adminhtml/templates/form/vault.phtml b/src/view/adminhtml/templates/form/vault.phtml
similarity index 100%
rename from view/adminhtml/templates/form/vault.phtml
rename to src/view/adminhtml/templates/form/vault.phtml
diff --git a/view/adminhtml/templates/payment/script.phtml b/src/view/adminhtml/templates/payment/script.phtml
similarity index 100%
rename from view/adminhtml/templates/payment/script.phtml
rename to src/view/adminhtml/templates/payment/script.phtml
diff --git a/view/adminhtml/web/js/stripe.js b/src/view/adminhtml/web/js/stripe.js
similarity index 100%
rename from view/adminhtml/web/js/stripe.js
rename to src/view/adminhtml/web/js/stripe.js
diff --git a/view/adminhtml/web/js/vault.js b/src/view/adminhtml/web/js/vault.js
similarity index 100%
rename from view/adminhtml/web/js/vault.js
rename to src/view/adminhtml/web/js/vault.js
diff --git a/view/frontend/layout/checkout_index_index.xml b/src/view/frontend/layout/checkout_index_index.xml
similarity index 100%
rename from view/frontend/layout/checkout_index_index.xml
rename to src/view/frontend/layout/checkout_index_index.xml
diff --git a/view/frontend/layout/vault_cards_listaction.xml b/src/view/frontend/layout/vault_cards_listaction.xml
similarity index 100%
rename from view/frontend/layout/vault_cards_listaction.xml
rename to src/view/frontend/layout/vault_cards_listaction.xml
diff --git a/view/frontend/web/js/action/save-payment-information.js b/src/view/frontend/web/js/action/save-payment-information.js
similarity index 100%
rename from view/frontend/web/js/action/save-payment-information.js
rename to src/view/frontend/web/js/action/save-payment-information.js
diff --git a/view/frontend/web/js/model/save-payment-information.js b/src/view/frontend/web/js/model/save-payment-information.js
similarity index 100%
rename from view/frontend/web/js/model/save-payment-information.js
rename to src/view/frontend/web/js/model/save-payment-information.js
diff --git a/view/frontend/web/js/view/payment/method-renderer/pmclain_stripe.js b/src/view/frontend/web/js/view/payment/method-renderer/pmclain_stripe.js
similarity index 100%
rename from view/frontend/web/js/view/payment/method-renderer/pmclain_stripe.js
rename to src/view/frontend/web/js/view/payment/method-renderer/pmclain_stripe.js
diff --git a/view/frontend/web/js/view/payment/method-renderer/vault.js b/src/view/frontend/web/js/view/payment/method-renderer/vault.js
similarity index 100%
rename from view/frontend/web/js/view/payment/method-renderer/vault.js
rename to src/view/frontend/web/js/view/payment/method-renderer/vault.js
diff --git a/view/frontend/web/js/view/payment/pmclain_stripe.js b/src/view/frontend/web/js/view/payment/pmclain_stripe.js
similarity index 100%
rename from view/frontend/web/js/view/payment/pmclain_stripe.js
rename to src/view/frontend/web/js/view/payment/pmclain_stripe.js
diff --git a/view/frontend/web/template/payment/form.html b/src/view/frontend/web/template/payment/form.html
similarity index 100%
rename from view/frontend/web/template/payment/form.html
rename to src/view/frontend/web/template/payment/form.html