diff --git a/.env b/.env index 33fda83..2e46c27 100644 --- a/.env +++ b/.env @@ -1,6 +1,6 @@ WORDPRESS_HOST= NGROK_TOKEN= -PLUGIN_URL=https://github.com/qenta-cee/woocommerce-qcs.git +PLUGIN_URL= PLUGIN_VERSION= WORDPRESS_ADMIN_USER= WORDPRESS_ADMIN_PASS= diff --git a/.github/workflows/plugin-test.yml b/.github/workflows/plugin-test.yml index fa52338..e9a6269 100644 --- a/.github/workflows/plugin-test.yml +++ b/.github/workflows/plugin-test.yml @@ -9,13 +9,21 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 7.4 + tools: composer - name: Get Branch Name shell: bash run: echo "::set-output name=name::$(bash docker/branchname.sh)" id: branch - name: Start NGROK shell: bash - run: echo "::set-output name=host::$(timeout 1m bash docker/wordpress/ngrok.sh)" + run: | + NGROK_HOST=$(timeout 5m bash docker/wordpress/ngrok.sh) + echo "ngrok hostname: ${NGROK_HOST}" + echo "::set-output name=host::${NGROK_HOST}" id: ngrok env: NGROK_TOKEN: ${{ secrets.NGROK_TOKEN }} @@ -31,3 +39,14 @@ jobs: env: WP_URL: ${{ steps.ngrok.outputs.host }} run: curl https://${{ steps.ngrok.outputs.host }} + - name: Prepare Artifact + run: | + mkdir -p /tmp/artifact + cp -r woocommerce-qenta-checkout-seamless composer.* /tmp/artifact/ + cd /tmp/artifact && composer install && rm composer.* + - name: Upload Artifact + id: upload_artifact + uses: actions/upload-artifact@v2 + with: + name: woocommerce-qenta-checkout-seamless + path: /tmp/artifact diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ab7c329..358fd8c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,6 +12,11 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 7.4 + tools: composer - name: Install Dependencies run: composer install - name: Pack Release zip diff --git a/docker/wordpress/init.sh b/docker/wordpress/init.sh index ff109ff..bb13804 100644 --- a/docker/wordpress/init.sh +++ b/docker/wordpress/init.sh @@ -2,6 +2,8 @@ set -e +touch /tmp/shop.log + # If we are in Github plugin repo CI environment CI_REPO_URL=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} if [[ ${CI_REPO_URL} == ${PLUGIN_URL//.git/} ]]; then @@ -80,16 +82,21 @@ function setup_store() { wp option set woocommerce_default_country "AT" wp_set_array woocommerce_onboarding_profile skipped 1 wp wc --user=admin tool run install_pages + wp option update page_on_front 5 + wp option update show_on_front page + wp option update blogdescription "QENTA Plugin DEMO" + wp theme install twentytwenty --activate + wp post delete 2 --force + wp post delete 1 --force } function print_info() { echo echo '####################################' echo - echo "URL: https://${WORDPRESS_URL}" - echo "Shop: https://${WORDPRESS_URL}/?post_type=product" - echo "Panel: https://${WORDPRESS_URL}/wp-admin/" - echo "Plugin Config: https://${WORDPRESS_URL}/wp-admin/admin.php?page=wc-settings&tab=checkout" + echo "Shop: https://${WORDPRESS_URL}" + echo "Admin Panel: https://${WORDPRESS_URL}/wp-admin/" + echo "Plugin Config: https://${WORDPRESS_URL}/wp-admin/admin.php?page=wc-settings&tab=checkout§ion=woocommerce_wcs" echo "User: ${WORDPRESS_ADMIN_USER}" echo "Password: ${WORDPRESS_ADMIN_PASS}" echo diff --git a/docker/wordpress/ngrok.sh b/docker/wordpress/ngrok.sh index 01d24d4..0ab690f 100644 --- a/docker/wordpress/ngrok.sh +++ b/docker/wordpress/ngrok.sh @@ -1,15 +1,13 @@ #!/bin/bash -set -e - which ngrok >/dev/null if [[ $? == 0 ]]; then NGROK_BINARY="$(which ngrok)" else >&2 echo "Installing NGROK" cd ~/ - npm install ngrok - NGROK_BINARY="~/node_modules/ngrok/bin/ngrok" + npm install ngrok >&2 + NGROK_BINARY="./node_modules/ngrok/bin/ngrok" fi function get_ngrok_url() { diff --git a/woocommerce-qenta-checkout-seamless/assets/scripts/admin.js b/woocommerce-qenta-checkout-seamless/assets/scripts/admin.js index 6cce0cb..2f6c60a 100644 --- a/woocommerce-qenta-checkout-seamless/assets/scripts/admin.js +++ b/woocommerce-qenta-checkout-seamless/assets/scripts/admin.js @@ -46,4 +46,9 @@ wpOnload = function () { tabPane.className = tabPane.className + ' active'; }); } -} \ No newline at end of file +} + +function goToWctPage(page) { + start = "?page=qenta_transactions_page&transaction_start=" + page; + window.location.href = start; +} diff --git a/woocommerce-qenta-checkout-seamless/classes/class-qenta-admin.php b/woocommerce-qenta-checkout-seamless/classes/class-qenta-admin.php index da2272d..df2ba7b 100644 --- a/woocommerce-qenta-checkout-seamless/classes/class-qenta-admin.php +++ b/woocommerce-qenta-checkout-seamless/classes/class-qenta-admin.php @@ -69,75 +69,73 @@ public function __construct( $settings ) { public function print_admin_form_fields( $gateway ) { ?>
= __( 'Qenta - Your Full Service Payment Provider - Comprehensive solutions from one single source', - 'woocommerce-qenta-checkout-seamless' ) ?>
+ + -= __( 'Qenta is one of the world´s leading providers of outsourcing and white label solutions for electronic payment transactions.', - 'woocommerce-qenta-checkout-seamless' ) ?>
+ -= __( 'As independent provider of payment solutions, we accompany our customers along the entire business development. Our payment solutions are perfectly tailored to suit e-Commerce requirements and have made us Austria´s leading payment service provider. Customization, competence, and commitment.', - 'woocommerce-qenta-checkout-seamless' ) ?>
+' . __( 'Order', 'woocommerce-qenta-checkout-seamless' ) . ' | -id_order ) ) . '&action=edit">' . $data->id_order . ' | +' . esc_html(__( 'Order', 'woocommerce-qenta-checkout-seamless' )) . ' | +id_order ) )) . '&action=edit">' . esc_html($data->id_order) . ' |
---|---|---|---|
' . __( 'Payment method', 'woocommerce-qenta-checkout-seamless' ) . ' | -' . $data->payment_method . ' | +' . esc_html(__( 'Payment method', 'woocommerce-qenta-checkout-seamless' )) . ' | +' . esc_html($data->payment_method) . ' |
' . __( 'Payment state', 'woocommerce-qenta-checkout-seamless' ) . ' | -' . $data->payment_state . ' | +' . esc_html(__( 'Payment state', 'woocommerce-qenta-checkout-seamless' )) . ' | +' . esc_html($data->payment_state) . ' |
' . __( 'Amount', 'woocommerce-qenta-checkout-seamless' ) . ' | -' . $data->amount . ' | +' . esc_html(__( 'Amount', 'woocommerce-qenta-checkout-seamless' )) . ' | +' . esc_html($data->amount) . ' |
' . __( 'Currency', 'woocommerce-qenta-checkout-seamless' ) . ' | -' . $data->currency . ' | +' . esc_html(__( 'Currency', 'woocommerce-qenta-checkout-seamless' )) . ' | +' . esc_html($data->currency) . ' |
' . __( 'Gateway reference number', 'woocommerce-qenta-checkout-seamless' ) . ' | -' . $data->gateway_reference . ' | +' . esc_html(__( 'Gateway reference number', 'woocommerce-qenta-checkout-seamless' )) . ' | +' . esc_html($data->gateway_reference) . ' |
' . __( 'Qenta order number', 'woocommerce-qenta-checkout-seamless' ) . ' | -' . $data->order_number . ' | +' . esc_html(__( 'Qenta order number', 'woocommerce-qenta-checkout-seamless' )) . ' | +' . esc_html($data->order_number) . ' |
$key | $value |
---|---|
" . esc_html($key) . " | " . esc_html($value) . " |
' . __( 'Number', 'woocommerce-qenta-checkout-seamless' ) . ' | -' . __( 'Date', 'woocommerce-qenta-checkout-seamless' ) . ' | -' . __( 'Gateway reference', 'woocommerce-qenta-checkout-seamless' ) . ' | -' . __( 'Payment state', 'woocommerce-qenta-checkout-seamless' ) . ' | -' . __( 'Approved', 'woocommerce-qenta-checkout-seamless' ) . ' | -' . __( 'Deposited', 'woocommerce-qenta-checkout-seamless' ) . ' | -' . __( 'Currency', 'woocommerce-qenta-checkout-seamless' ) . ' | -' . __( 'Operations', 'woocommerce-qenta-checkout-seamless' ) . ' | +' . esc_html(__( 'Number', 'woocommerce-qenta-checkout-seamless' )) . ' | +' . esc_html(__( 'Date', 'woocommerce-qenta-checkout-seamless' )) . ' | +' . esc_html(__( 'Gateway reference', 'woocommerce-qenta-checkout-seamless' )) . ' | +' . esc_html(__( 'Payment state', 'woocommerce-qenta-checkout-seamless' )) . ' | +' . esc_html(__( 'Approved', 'woocommerce-qenta-checkout-seamless' )) . ' | +' . esc_html(__( 'Deposited', 'woocommerce-qenta-checkout-seamless' )) . ' | +' . esc_html(__( 'Currency', 'woocommerce-qenta-checkout-seamless' )) . ' | +' . esc_html(__( 'Operations', 'woocommerce-qenta-checkout-seamless' )) . ' |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
- " . __( 'No payments available', 'woocommerce-qenta-checkout-seamless' ) . " + " . esc_html(__( 'No payments available', 'woocommerce-qenta-checkout-seamless' )) . " |
{$payment['paymentNumber']} | -{$payment['timeCreated']} | -{$payment['gatewayReferenceNumber']} | -{$payment['state']} | -{$payment['approveAmount']} | -{$payment['depositAmount']} | -{$payment['currency']} | + echo "" . esc_html($payment['paymentNumber']) . " | +" . esc_html($payment['timeCreated']) . " | +" . esc_html($payment['gatewayReferenceNumber']) ." | +" . esc_html($payment['state']) . " | +" . esc_html($payment['approveAmount']) . " | +" . esc_html($payment['depositAmount']) . " | +" . esc_html($payment['currency']) . " |