# ENVATO/Codecanyon integration
<!-- Output copied to clipboard! -->
<!-----
NEW: Check the "Suppress top comment" option to remove this info from the output.
Conversion time: 1.726 seconds.
Using this Markdown file:
1. Paste this output into your source file.
2. See the notes and action items below regarding this conversion run.
3. Check the rendered output (headings, lists, code blocks, tables) for proper
formatting and use a linkchecker before you publish this page.
Conversion notes:
* HTML and Markdown from Docs version 1.0
* Wed Oct 20 2021 10:29:48 GMT-0000 (UTC)
* Source doc: ENVATO/Codecanyon integration
* This document has images: check for >>>>> gd2md-html alert: inline image link in generated source and store images to your server. NOTE: Images in exported zip file from Google Docs may not appear in the same order as they do in your doc. Please check the images!
WARNING:
You have 9 H1 headings. You may want to use the "H1 -> H2" option to demote all headings by one level.
----->
# ENVATO/Codecanyon integration
# BEN’S TESTING NOTES 2/17/20
Tested on local wordpress installation.
* Gutenberg blocks don’t seem to be working, I don’t see any POWr blocks added and there is error in console:
#

* POWr Plugins link shows a blank page. Isn’t this supposed to show users/me?

# Description:
**[Envato](https://envato.com/)** is a digital assets marketplace, where you can buy many kinds of digital assets, ranging from WordPress themes or plugins to audio and video footage you can use in your creative projects.
[Codecanyon](https://codecanyon.net/) is a division of Envato which works as a paid repository for PHP Scripts, WordPress, eCommerce, JavaScript, CSS, Mobile, HTML5, Skins, WP Themes, etc. Envato also uses [Envato Elements](https://elements.envato.com/wordpress/plugins) as a marketplace for Wordpress plugins.
**These specs describe the integration workflow of our plugins into Codecanyon.**
The PLACE to submit: [https://codecanyon.net](https://codecanyon.net/)
# Epic g**oal**:
We want to get on CodeCanyon with a bunch of super-cheap products to try to acquire users (and eventually upsell them to other products)
# **Background**:
CodeCanyon is a listing marketplace. We want to sell our WordPress integrations in this marketplace. We will tweak our existing WordPress integration to make this functional without much work
# Actual goal - Get listed in Marketplace
---
## Prepare one-time purchase based pricing politics for WordPress plugin
So that every installation from Codecanyon should create POWr Business subscription onto the chosen plugin
**[Regular License](https://codecanyon.net/licenses/terms/regular)**
_Use, by you or one client, in a single end product which end users are not charged for. The total price includes the item price and a buyer fee._
**[Extended License](https://codecanyon.net/licenses/terms/extended)**
_Use, by you or one client, in a single end product which end users can be charged for. The total price includes the item price and a buyer fee._
[Click here](https://codecanyon.net/licenses/standard) to see the licensing short specs.
##
[Mockup](https://www.figma.com/file/EGUtYXVysMzjERBOGWVtX1/Untitled?node-id=0%3A1)
## Make CORE of our Wordpress plugins appear on this [page](https://codecanyon.net/category/wordpress/add-ons).
##
Create astonishing preview pages for that CORE plugins, available at Codecanyon pressing a button "Live preview" like here in [this example](https://elements.envato.com/revolution-multimedia-gallery-wordpress-plugin-XTCE3VP) where user can see possibilities of this plugin
---
**Apps that should be listed first: **Comments, Countdown Timer, FAQ, Form Builder, Galleries, PayPal Button, Popup, Sliders, Social Feed, eCommerce/Digital Download
**Scenario: **
### POWr Plugins published on Codecanyon should correspond to these guides
**WHEN** upload a new plugin onto CodeCanyon
**THEN** It should correspond to [this guide](https://help.author.envato.com/hc/en-us/articles/360000471583-CodeCanyon-General-File-Preparation-Guidelines)** \
AND should not **be rejected due to [this reasons](https://help.author.envato.com/hc/en-us/articles/360000536823-Common-Rejection-Factors-CodeCanyon)
**Scenario**:
### Update WordPress generator to generate multiple apps that work with Gutenberg
**GIVEN **we started integration and have to upload ZIPs with plugins onto Codecanyon site \
**WHEN** user clicking download button **any** of ZIPs with **any** POWr plugin \
**THEN **this ZIP should be installed onto WordPress with no errors \
**AND** this plugin **should** correspond to whatever plugin cc-user have chosen \
**AND** this plugin **should** work with Gutenberg \
**AND** this plugin should work with wordpress 5.3.x(
**Scenario:**
### Installing **any** POWr App from CodeCanyon should give CodeCanyon user the Business level of subscription
**GIVEN** user has installed **any** POWr App for CodeCanyon
**WHEN** installing in WordPress
**THEN** user should be given a Business subscription for this plugin only
**AND** user should NOT have Business level access to other POWr plugin
**Scenario**:
###
Update powr.js?external-type=codecanyon for files generated for CodeCanyon
**Scenario: **
### ** \
**When a CodeCanyon user has installed an app, they should have a ProSubscription of subscription_type = lifetime deal so data team can record the value of these users
**Scenario:**
###
When create_transactions and charge_transactions are called for a CodeCanyon subscription, they should not crash
**GIVEN** user has an active form builder subscription for CodeCanyon
**WHEN** a year has passed and our daily rake tasks have run
**THEN** a Transaction should be properly recorded for the subscription \
- price: $29 \
- status: charged \
- subscritption_type: lifetime
**Developer notes**
We already have a wordpress installation to test with:
* [https://wordpress.powr-staging.io/wp-login.php](https://wordpress.powr-staging.io/wp-login.php)
* **Password is in LastPass, please check your emails**
TODO: Please parse jwt token
* If user is signed in
* Create subscription
* eg: Woocommerce module
* save plan to session
* redirect to standalone with business plan
* after user signin, create subscription as accordingly
Puru’s Note
---
* After discussing with Ben, here are few things to keep in mind as far as flow is concerned.
* Create JWT token with { plan: ‘business’ }, hardcode pricing to $29/mo for now. (may change later)
* When user install this plugin
* Create ProSubscription with plan: ‘business’ (JWT token), appType: ‘appType’ on params.
* If logged in
* Take user to user/me if they have existing plugins of same appType
* Take user to standalone/appType with business subscription
* If they are not logged in
* Take user to standalone/appType with business subscription
* They will edit, click on save/publish, and will be asked to login/signup. Tie that subscription (newly created) with this new/existing user.
* Do not create transaction
#
# Pricing
I sent the testing app to the codecanyon, asking them to review my pricing, so then will come up with an answer, but for now it looks like there is no hardcoded top limit for the prices.


**PLEASE IGNORE EVERYTHING BELOW THIS LINE**
# II iteration - [mockup](https://www.figma.com/file/EGUtYXVysMzjERBOGWVtX1/Untitled?node-id=0%3A1)
---
## Prepare one-time purchase based pricing politics for POWr WordPress Pack[^1] plugin
**This PWP must include all the WP plugins we have for a year**
**[Regular License](https://codecanyon.net/licenses/terms/regular)**
_Use, by you or one client, in a single end product which end users are not charged for. The total price includes the item price and a buyer fee._
**[Extended License](https://codecanyon.net/licenses/terms/extended)**
_Use, by you or one client, in a single end product which end users can be charged for. The total price includes the item price and a buyer fee._
[Click here](https://codecanyon.net/licenses/standard) to see the licensing short specs.
## Make all of our Wordpress plugins appear on this[ page](https://codecanyon.net/category/wordpress/add-ons).
###
Create an astonishing preview pages for that plugins, available at Codecanyon pressing a button "Live preview" like here in [this example](https://elements.envato.com/revolution-multimedia-gallery-wordpress-plugin-XTCE3VP) where user can see possibilities of this plugin
**This landings must be visually divided into two sides one for live preview of that plugin and a second one for admin page for that plugin**
**Scenario:**
###
Codecanyon user clicks on Preview button on a POWr WordPress Pack plugin's page on a Codecanyon
**GIVEN **a user with an Envato account, who possibly wants to buy POWr Pack for WordPress
**WHEN** a users clicks on Preview button
**THEN** a link should land them on a preview page
**Scenario:**
###
Buying _POWr WordPress Pack_ on a Codecanyon site should create a “POWr Business subscription” on a user's account.[^2]
**GIVEN** a user with an Envato account, who [buys POWr Pack for WordPress](https://build.envato.com/api#market_NewFilesFromUser)
**WHEN** user checkout from Codecanyon with positive result and started OAuth procedure
**THEN** we have to create that special subscription for that [user's account](https://build.envato.com/api#market_User)
**Scenario:**
###
_POWr WordPress Pack** **_should support WordPress version from 5.3.x
**GIVEN** a user has WordPress version from 5.3.x \
**WHEN **user installs _POWr WordPress Pack_
**THEN** it should install successfully
<!-- Footnotes themselves at the bottom. -->
## Notes
[^1]:
PWP
[^2]:
To make that happen we need to integrate with [Codecanyon Market API](https://build.envato.com/api)