Skip to content

Commit

Permalink
ready
Browse files Browse the repository at this point in the history
  • Loading branch information
0xBeycan committed Feb 1, 2025
1 parent 9ac5942 commit 2e3b713
Show file tree
Hide file tree
Showing 11 changed files with 103 additions and 24 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/publish-to-wordpres.org.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Publish to WordPress.org

on:
workflow_run:
workflows:
- Create auto release
types:
- completed

env:
PLUGIN_SLUG: cryptopay-gateway-for-armember

jobs:
deploy_to_wp_org:
permissions: write-all
name: WordPress.org Plugin Deploy
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master

- name: Get upload url & and release version
id: get_release_info
run: |
latest_release=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/releases/latest")
latest_release_id=$(echo "$latest_release" | jq -r '.id')
latest_release_version=$(echo "$latest_release" | jq -r '.tag_name')
upload_url=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/json" \
"https://api.github.com/repos/${{ github.repository }}/releases/${latest_release_id}" | jq -r '.upload_url')
echo "UPLOAD_URL=$upload_url" >> $GITHUB_ENV
echo "RELEASE_ID=$latest_release_id" >> $GITHUB_ENV
echo "RELEASE_VERSION=$latest_release_version" >> $GITHUB_ENV
- name: Install Subversion (SVN)
run: sudo apt-get update && sudo apt-get install -y subversion

- name: WordPress Plugin Deploy
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
with:
generate-zip: true
env:
SVN_PASSWORD: ${{ secrets.WORDPRESS_ORG_PASSWORD }}
SVN_USERNAME: ${{ secrets.WORDPRESS_ORG_USERNAME }}
SLUG: ${{ env.PLUGIN_SLUG }}
VERSION: ${{ env.RELEASE_VERSION }}

- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: ${{ steps.deploy.outputs.zip-path }}
asset_name: ${{ env.PLUGIN_SLUG }}.zip
asset_content_type: application/zip
Binary file added .wordpress-org/banner-1544x500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/banner-772x250.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/icon-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/icon-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 12 additions & 4 deletions app/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function paymentFinished(object $data): object
return $data;
}

global $arm_payment_gateways, $arm_subscription_plans, $wpdb, $ARMemberLite;
global $arm_payment_gateways, $arm_subscription_plans, $wpdb, $ARMemberLite, $arm_member_forms;

$userId = $data->getUserId();
$amount = $data->getOrder()->getAmount();
Expand All @@ -58,7 +58,15 @@ public function paymentFinished(object $data): object

$currency = $arm_payment_gateways->arm_get_global_currency();
$entryData = $arm_payment_gateways->arm_get_entry_data_by_id($entryId);
$userId = $entryData['arm_user_id'];
$userId = $entryData['arm_user_id'];

if (isset($postedData['arm_action']) && 'please-signup' === $postedData['arm_action']) {
$form = new \ARM_Form_Lite( 'id', absint($postedData['arm_form_id'])); // phpcs:ignore
if (in_array($form->type, ['registration'])) {
$postedData['arm_update_user_from_profile'] = 0;
$userId = $arm_member_forms->arm_register_new_member($postedData, $form);
}
}

if (isset($postedData['first_name']) && isset($postedData['last_name'])) {
$firstName = $postedData['first_name'];
Expand Down Expand Up @@ -128,7 +136,7 @@ public function paymentFinished(object $data): object
$plan = new \ARM_Plan_Lite($planId);
$oldPlan = new \ARM_Plan_Lite($oldPlanId);

$payment = $wpdb->get_row($wpdb->prepare("SELECT arm_log_id FROM {$ARMemberLite->tbl_arm_payment_log} WHERE arm_plan_id = %d AND arm_user_id = %d AND arm_old_plan_id = %d ORDER BY arm_log_id DESC", $paymentData['arm_plan_id'], $paymentData['arm_user_id'], $paymentData['arm_old_plan_id'])); // phpcs:ignore
$payment = $wpdb->get_row($wpdb->prepare("SELECT arm_log_id FROM %s WHERE arm_plan_id = %d AND arm_user_id = %d AND arm_old_plan_id = %d ORDER BY arm_log_id DESC", $ARMemberLite->tbl_arm_payment_log, $paymentData['arm_plan_id'], $paymentData['arm_user_id'], $paymentData['arm_old_plan_id'])); // phpcs:ignore

if (!$payment) {
$wpdb->insert($ARMemberLite->tbl_arm_payment_log, $paymentData);
Expand Down Expand Up @@ -189,7 +197,7 @@ public function paymentFinished(object $data): object
}
}

$lastPaymentStatus = $wpdb->get_var($wpdb->prepare('SELECT `arm_transaction_status` FROM `' . $ARMemberLite->tbl_arm_payment_log . '` WHERE `arm_user_id`=%d AND `arm_plan_id`=%d AND `arm_created_date`<=%s ORDER BY `arm_log_id` DESC LIMIT 0,1', $userId, $planId, current_time('mysql'))); // phpcs:ignore
$lastPaymentStatus = $wpdb->get_var($wpdb->prepare('SELECT `arm_transaction_status` FROM %s WHERE `arm_user_id`=%d AND `arm_plan_id`=%d AND `arm_created_date`<=%s ORDER BY `arm_log_id` DESC LIMIT 0,1', $ARMemberLite->tbl_arm_payment_log, $userId, $planId, current_time('mysql'))); // phpcs:ignore

if ($isUpdatePlan) {
$arm_subscription_plans->arm_update_user_subscription($userId, $planId, '', true, $lastPaymentStatus);
Expand Down
23 changes: 10 additions & 13 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
## Cryptocurrency Payment Gateway for ARMember by CryptoPay
## Cryptocurrency Payment Gateway Plugin for ARMember by CryptoPay

First of all, we would like to point out that this plugin is not a standalone plugin. This plugin is a **<a href="https://beycanpress.com/cryptopay/?utm_source=github&utm_medium=cryptopay_arm">cryptocurrency payment gateway for ARMember</a>**. In other words, users who want to sell courses with cryptocurrency payments can use WordPress and ARMember. However, this plugin is a plugin for CryptoPay and a cryptocurrency payment gateway for ARMember. So it's actually CryptoPay, which is the main plugin that handles cryptocurrency payments for WordPress. Therefore, users must have both plugins.
### What does this plugin do?

Thanks to this plugin, you can receive **<a href="https://beycanpress.com/cryptopay/?utm_source=github&utm_medium=cryptopay_arm">cryptocurrency payments</a>** from many Blockchain networks, especially Bitcoin, Ethereum, Solana, and sell paid courses with cryptocurrencies on your WordPress site with the ARMember plugin.
The blockchain and cryptocurrency ecosystem is expanding rapidly. Many entrepreneurs in this field build communities, offer educational content, and create platforms. If you've set up a membership platform using ARMember on WordPress and need a seamless way to accept crypto payments, you're in the right place.

What is CryptoPay? (Click and watch video)
With CryptoPay, you can integrate a commission-free, peer-to-peer cryptocurrency payment gateway into ARMember effortlessly.

[![Cryptocurrency payment gateway for WordPress](https://img.youtube.com/vi/3vaoFL4XG10/0.jpg)](https://www.youtube.com/watch?v=3vaoFL4XG10)
<br>
### How does it work?

Review CryptoPay Lite: **<a href="https://wordpress.org/plugins/cryptopay-wc-lite/">Cryptocurrency payment gateway for ARMember</a>**
To use this plugin, you need to have either the Lite or Premium version of CryptoPay, as it functions as an integration module. Additionally, ARMember must be installed on your WordPress site. Once CryptoPay is activated, navigate to the payment settings in ARMember and add CryptoPay as a payment method.

Review CryptoPay Premium: **<a href="https://beycanpress.com/cryptopay/?utm_source=github&utm_medium=cryptopay_arm">Cryptocurrency payments for WooCommerce</a>**
As shown in the images below, you can start accepting cryptocurrency payments directly through ARMember with ease.

Review ARMember: **<a href="https://wordpress.org/plugins/armember-membership/">ARMember</a>**

See **<a href="https://cryptopay.beycanpress.net/" target="_blank">Demo</a>**

Bitcoin, Ethereum, Binance, Solana, Tron, Avalanche, Polygon, MetaMask, TrustWallet, WalletConnect, Phantom Cryptocurrency payments gateway plugin for WordPress & WooCommerce, cryptocurrency wordpress, cryptocurrency woocommerce, cryptocurrency payments, cryptocurrency payments gateway, cryptocurrency payments for woocommerce, cryptocurrency payments for wordpress, bitcoin payment for wordpress, woocommerce crypto payments, wordpress crypto payments, wordPress cryptocurrency payment plugin, woocommerce cryptocurrency payment gateway, cryptocurrency payment gateway for woocommerce, crypto payments woocommerce, accept cryptocurrency payments
![Screenshot 1](https://i.hizliresim.com/q0kv8h7.png)
![Screenshot 2](https://i.hizliresim.com/fwj3k0t.png)
![Screenshot 3](https://i.hizliresim.com/cnqo3hn.png)
27 changes: 20 additions & 7 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,27 @@ Cryptocurrency Payment Gateway Plugin for ARMember, Cryptocurrency payments for

### Cryptocurrency Payment Gateway Plugin for ARMember by CryptoPay

First of all, we would like to point out that this plugin is not a standalone plugin. This plugin is a **<a href="https://beycanpress.com/cryptopay/?utm_source=wporg_readme&utm_medium=cryptopay_arm">cryptocurrency payment gateway for ARMember</a>**. In other words, users who want to sell courses with cryptocurrency payments can use WordPress and ARMember. However, this plugin is a plugin for CryptoPay and a cryptocurrency payment gateway for ARMember. So it's actually CryptoPay, which is the main plugin that handles cryptocurrency payments for WordPress. Therefore, users must have both plugins.
It looks like you're looking for a plugin to accept cryptocurrency payments on ARMember. What if we told you that you have come to the right place for this?

Thanks to this plugin, you can receive **<a href="https://beycanpress.com/cryptopay/?utm_source=wporg_readme&utm_medium=cryptopay_arm">cryptocurrency payments</a>** from many Blockchain networks, especially Bitcoin, Ethereum, Solana, and sell paid courses with cryptocurrencies on your WordPress site with the ARMember plugin.
Our product called CryptoPay is a wonderful plugin developed entirely for the WordPress ecosystem that allows you to receive peer-to-peer and commission-free cryptocurrency payments.

This integration add-on allows you to use CryptoPay with ARMember and sell your ARMember memberships completely commission-free and with peer-to-peer cryptocurrency payments.

### What is CryptoPay?

What is CryptoPay?
<iframe width="560" height="315" src="https://www.youtube.com/embed/3vaoFL4XG10" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

Review CryptoPay Lite: **<a href="https://wordpress.org/plugins/cryptopay-wc-lite/">Cryptocurrency payment gateway for ARMember</a>**
See **<a href="https://cryptopay.beycanpress.net/" target="_blank">Demo</a>**

Review CryptoPay Premium: **<a href="https://beycanpress.com/cryptopay/?utm_source=wporg_readme&utm_medium=cryptopay_arm">Cryptocurrency payments for WooCommerce</a>**
#### This plugin is an integration plugin. So basically you need to have the following two plugins.

Review ARMember: **<a href="https://wordpress.org/plugins/armember-membership/">ARMember</a>**
**<a href="https://wordpress.org/plugins/cryptopay-wc-lite/">Review CryptoPay Lite</a>**

See **<a href="https://cryptopay.beycanpress.net/" target="_blank">Demo</a>**
**<a href="https://beycanpress.com/cryptopay/?utm_source=wporg_readme&utm_medium=cryptopay_memberpress">Review CryptoPay Premium</a>**

**<a href="https://wordpress.org/plugins/armember-membership">Review ARMember</a>**

See CryptoPay Demo **<a href="https://cryptopay.beycanpress.net/register/test-membership/" target="_blank">Demo</a>**

= Privacy notices =

Expand All @@ -42,6 +49,12 @@ With the default configuration, this plugin, in itself, does not:

You can easily translate with Loco translate.

== Screenshots ==

1. Screen shot 1
2. Screen shot 2
3. Screen shot 3

== Installation ==

1. Upload the entire `/cryptopay-gateway-for-armember` directory to the `/wp-content/plugins/` directory.
Expand Down

0 comments on commit 2e3b713

Please sign in to comment.