What's new
Xen Factory

Register today to become a member! Once signed in, you'll be able to start purchasing our products, ask questions, request support and suggest new ideas!

  • We are aware that a no permission error was shown when you tried to purchase in the last 2 days, this is now fixed.

XF1 XF2 RM MarketPlace & Forum Sales

Status
Not open for further replies.

Clement

Freaky Coder
Staff member
Paypal API credentials retrieval

Two possibilities, either you have a Business account or a Standard account.

Business Account

If you have a business paypal account, connect to your paypal account and go to the tools page:
Tools.png
On the new opening page, select the API credentials:
CREDENTIALS_–PayPal.png
Then click on the Add or edit API permissions button:
API_Access_-_PayPal.png
For this tutorial, we will assume that no API credentials are available, so you should be seeing a Request API credentials link on the right side, click it:
Request_API_Credentials_-_PayPal.png

As we are using a library that only supports signature, only signature certificates will work with RM MarketPlace.

Once you click on Agree and Submit, you will get a new page with 3 credentials that you have to note, we will see later how to use them:
View_or_Remove_API_Signature_-_PayPal.png
Standard Account

UPDATE 2019/08/01: Apparently, as of now, API account setting is not available anymore for standard accounts.


If you have a standard paypal account, connect to your paypal account and go to the seller preferences page:
PayPal__Home.png
On the new opening page, click on the Update link next to the API access part:
My_Profile_-_PayPal.png
For this tutorial, we will assume that no API credentials are available, so you should be seeing a Request API credentials link on the right side, click it:
API_Access_-_PayPal.png

As we are using a library that only supports signature, only signature certificates will work with our API.
Request_API_Credentials_-_PayPal.png

Once you click on Agree and Submit, you will get a new page with 3 credentials that you have to note, we will see later how to use them:
View_or_Remove_API_Signature_-_PayPal.png
 
Last edited:

Clement

Freaky Coder
Staff member
Payment API configuration

Now that we have either retrieved the credentials, you can configure the payment API.

[XF1]
Nothing simpler, rename the file library/XFA/ThirdParty/AngellEye/paypal-php-library/PPConfiguration.php.txt into library/XFA/ThirdParty/AngellEye/paypal-php-library/PPConfiguration.php and edit it.
Then fill the 3 lines with the information you retrieved in the previous step (see screenshot below).​

[XF2]
Nothing simpler, copy the file src/addons/XFA/Core/PPConfiguration.php.txt file into the internal_data folder from your forum root and remove the .txt extension. Then fill the 3 lines with the information you retrieved in the previous step (see screenshot below).​

Untitled9.png
 

Clement

Freaky Coder
Staff member
Usergroup permissions [RM Marketplace]

RM Marketplace has some complex behavior regarding permissions.

Indeed to access the View Sales / Manage Licences pages, permissions are global.
So what if you only want some user or usergroup to be only able to sell in one dedicated category ?

Nothing simpler:
  • At a global user or usergroup level, set the permissions to sell in the marketplace to yes.
  • In all other categories but the one(s) you want the usergroup or user to be able to sell in, set the permissions to revoke.
 

Clement

Freaky Coder
Staff member
Invoicing [RM Marketplace] for version 3.8.0 to 4.2.2

Since version 3.8.0, invoicing feature has been included in RM Marketplace.
However, due to licensing rights, the PHP class we use is not included inside our product.
This section will guide you through the steps necessary to get it working.

As a pre-requisite, you must ensure that you have the php intl extension installed, this would be done by adding following line to the php.ini of your site:
extension=ext/php_intl.dll

Download and install pdf-invoicr

Go to the following page github page HERE.

Then download it as by clicking on the Clone or download menu > Download ZIP:
download_on_github.png
Unzip the downloaded archive on your computer.

[XF1]
Then connect to the FTP of your forum, go to library/XFA/ThirdParty and create a folder called pdf-invoicr.​
Upload the content of the unzipped archive inside the created folder.​
Its content should look like the screenshot below once done.​
[XF2]
Then connect to the FTP of your forum, go to src/addons/XFA/RMMarketplace/vendor and create a folder called pdf-invoicr.​
Upload the content of the unzipped archive inside the created folder.​
Its content should look like the screenshot below once done.​
Capture d’écran 2017-03-04 à 11.39.23.png
If you want you can remove the examples folder as well as the README.md file.

Update FPDF version

Now that pdf-invoicr is installed, an additional step is needed in order to upgrade the version of the FPDF library it uses as it is deprecated.

Go to the official website of FDPF: HERE.

Download the latest version zip file, preferably 1.8.1 as it was tested with that particular version:
FPDF.png

Unzip the downloaded archive.

Connect to your ftp and go in library/XFA/ThirdParty/pdf-invoicr/inc/fpdf [XF1] or src/addons/XFA/RMMarketplace/vendor [XF2].
Replace the fdpf.php file and the font directory by the ones from the archive you just unzipped.

Once this done, edit the phpinvoice.php file.

On line 55, change:
PHP:
$this->('P','mm',array($this->document['w'],$this->document['h']));

By:
PHP:
parent::__construct('P','mm',array($this->document['w'],$this->document['h']));

On line 258:
PHP:
$this->Cell(0,5,iconv("UTF-8", "ISO-8859-1",strtoupper($this->title)),0,1,'R');

By:
PHP:
$this->Cell(0,5,iconv("UTF-8", "ISO-8859-1",strtoupper($this->metadata['title'])),0,1,'R');
 
Last edited:

Clement

Freaky Coder
Staff member
Invoicing [RM Marketplace] for version 4.3.0 and above

Since version 3.8.0, invoicing feature has been included in RM Marketplace.
However, due to licensing rights, the PHP class we use is not included inside our product.
This section will guide you through the steps necessary to get it working.

As a pre-requisite, you must ensure that you have the php intl extension installed, this would be done by adding following line to the php.ini of your site:
extension=ext/php_intl.dll

Download and install FPDF

Go to the following page HERE.

Then download it by clicking on the ZIP link near version 1.8.2:
Capture_d’écran_2020-04-04_à_15_49_38.png

Unzip the downloaded archive on your computer.

Then connect to the FTP of your forum, go to src/addons/XFA/RMMarketplace/vendor and create a folder called fpdf.
Upload the fpdf.php file and the font folder of the unzipped archive inside the created folder.

Modify fpdf

Now that you have uploaded fpdf, go to the src/addons/XFA/RMMarketplace/vendor/fpdf folder and edit the file FPDF.php.

Before:
PHP:
define('FPDF_VERSION','1.82');

Add:
PHP:
namespace XFA\RMMarketplace\vendor\fpdf;
use Exception;

Download and install pdf-invoice

Go to the following page github page HERE.

Then download it by clicking on the Clone or download menu > Download ZIP:
Capture_d’écran_2020-04-04_à_15_21_25.png

Unzip the downloaded archive on your computer.

Then connect to the FTP of your forum, go to src/addons/XFA/RMMarketplace/vendor and create a folder called pdfinvoice.
Upload the src and inc folders of the unzipped archive inside the created folder.

Modify pdf-invoice

Now that you have uploaded pdf-invoice, go to the src/addons/XFA/RMMarketplace/vendor/pdfinvoice/src folder and edit the file InvoicePrinter.php.

Replace:
PHP:
namespace Konekt\PdfInvoice;

By:
PHP:
namespace XFA\RMMarketplace\vendor\pdfinvoice\src;

Add the following after:
PHP:
use XFA\RMMarketplace\vendor\fpdf\fpdf;

Remove the line:
PHP:
use FPDF;
 
Last edited:
Status
Not open for further replies.
Top