❓ Technical KB - xFans

Wondering how to configure the payment gateway on your site? Or would you like to know how to use Google Analytics to understand your web performance and user session metrics?

There’s all this and more below. Check out guides to help you set things up when/after going live and answers to those nagging (but important) questions you will ever have.

And if you can't find what you're looking for, let us know and we’d be happy to add that. You know where to find us


Index


Configuring Email

Use the below two sections in the Admin settings to configure email in xFans.

  • Email tab

    • Admin email: Email address where system notifications and and contact form emails should be delivered

    • Sender email: Mailbox from where system emails to users will be sent from.

  • SMTP tab

    • Host: enter SMTP host eg smtp.google.com

    • Port: SMTP port eg 465

    • Auth user: SMTP username

    • Auth password: SMTP password

    • Secure option: Enable if use port 465

  • You can use format “your name” <email-address> to admin email and sender email. Eg

  • xFans provides SMTP method for email only, almost services provide SMTP config, please check with your service and common list in our document.

Setup SMTP

SendGrid

  • Host: smtp.sendgrid.net

  • Port: 465 / 587

  • Auth user: the string apikey. This setting is the exact string "apikey" and not the API key itself.

  • Auth password: your Sendgrid API key eg: SG.xxxxx

Gmail

M3 service

  • Host: M3 host URL, eg: v2010004s.m3xs.net

  • Port: 587

  • Auth user: email username account or M3 FTP master account

  • Auth password: your email password or M3 FTP master password

  • Go to M3 control panel and register your email address, then fill to SMTP form

  • For Linode user, SMTP restrictions are in place by default for Linodes on accounts created after November 5th 2019. You'll need to configure rDNS for your instance and open a Support ticket confirming CAN-SPAM compliance, and Support should lift the restrictions pretty quickly. Check here for more details.

Utilizing Google Analytics

Go to Admin panel > Settings > System settings > Google Analytics and enter your GA code.

GA code is usually in the format GA-xxxx

Adding Custom Script

Go to Admin panel > Settings > System settings > Custom.

There are 2 section you can enter your custom script

  • Custom header script: Website will render this content in the <head> tag

  • Custom body script: Website will render this content before </body> tag

You can enter your GA script to one of these sections

Make sure you entered valid HTML or JavaScript. Otherwise it might break the system

Update/Change Style

xFans does not provide option to change layout or style in the admin panel. However if you want to custom there are 2 solutions.

  • Change style from source code (recommended)

  • Or inspect element in xFans HTML code and get CSS class name or section then update your style to “Custom header script” section.

Configuring Payment Gateways

xFans supports the following payment gateways.

CCBill

  • Go to Admin > Settings > System settings > CCBill and enter CCBill information in the form

  • CCBill webhook URL: https://[xFans-v2-api-domain]/payment/ccbill/callhook (eg https://api.xFans.info/payment/ccbill/callhook)

  • Approval URL: redirect link to your website after purchased successfully. You can enter https://[xFans-front-office-domain]/payment/success (eg https://xfans.info/payment/success)

  • Cancel URL: Redirect link after user cancelled or purchased unsuccessfully. You can enter https://[xFans-front-office-domain] (eg https://xfans.info/)

  • Check for CCBill setup here

  • In CCBill, you need 2 sub accounts for each model - one for recurring payment and one for single payment

  • You have to select correct payment type for that sub account when creating.

  • Check with CCBill support team to enable your sub account before setup in admin panel

Configure model-level CCBill settings in Admin panel

  1. Login xFans admin panel

  2. Select performer Menu in the left

  3. Click edit button on performer you want to update

  4. Enter following information

    1. Salt key (if have)

    2. Sub account number

    3. Pricing

Verotel Flexpay (since v2.1.4)

  • Verotel Flexpay doesn’t support split payment. Admin has to pay performer manually via payout request module

  • By default Verotel doesn’t enable yearly subscription. Please contact with them and get approval for this option.

  • Cancel subscription is not available on Verotel Flexpay for now (v2.1.4)

For integrating other payment gateways, please contact for customization.

Customizing Footer Menu

Go to Admin panel > FE Menu. Here you can see the list and create or update existing menu.

xFans provides only option to change footer menu, for now.

  • From system page: FE will reload custom script file if it is system URL. if enable you can select list of static pages too

  • Is new tab: open link in a new tab once clicking on

  • Title: menu text

  • Path: link to the page (you can enter full URL here if it is not system page)

  • Section: where we will show the menu

  • Ordering: enter sort number of menu item in the list

eCommerce Product Types

Both digital and physical products can be sold in xFans.

  • Physical products are physical items such as mobile device, DVD disk, sex toys, and so on.

    • model has to ship to user once having an order

    • model is able to update shipping code, delivery status is needed in the control panel

  • Digital products are items such as photos, videos or audio files

    • user purchases digital item will receive email notification with download link of digital item

    • model doesn’t need to manage order status, it is completed once user purchased successfully.

Cancelling Subscriptions

Our system supports to cancel CCBill subscription for now.

  • In user: Login and check subscription tab and click on Cancel subscription button

  • In admin panel

    • Setup CCBill Datalink Service username and Datalink Service password in the Settings > CCBill

    • username could be found in the Log in to CCbill admin panel -> Account Info -> Data link services suite

    • password could be found in the link https://admin.ccbill.com/megamenus/ccbillHome.html#AccountInfo/DataLinkServicesSuite(234)

Miscellaneous Qs

1. How does xFans storage asset files such as videos and images?

xFans supports Local storage (single machine) for now. We use Nginx http_auth_module to protect assets. The download link usually is available in 4h, and have integrated business rules in our application.

2. Does xFans support S3 (Simple Storage Service) services like AWS S3 or Digital Ocean Space?

xFans supports local storage for now. If need S3 service you can customize our File module or contact for customization

3. Does xFans support FTP file server?

xFans supports local storage for now. If need FTP service you can customize our File module or contact for customization

4. Can we deploy xFans to AWS EC2?

Yes, xFans is able to be deployed to any VPS server, include AWC EC2

5. Does xFans support Kubernetes?

We have not supported for application container image in our script yet. So you have to create image eg with Docker and deploy application to Kubernetes. Or contact us for customization.

6. Does xFans support Docker?

For now xFans does not provide Docker image. We will provide in future release.

7. Is xFans using CI/CD in our dev process?

Yes, we are using Jenkins for this purpose

8. How can we deliver the update efficiently?

We provide full source code, so you can do implementation if you want. Or we can provide Docker image for your customizations

9. How can we change style (CSS)?

We use less (https://lesscss.org/ ) to manage stylesheet. From source code you can

  • Check style folder, here we define common style rules in the global.less, responsive.less, vars.less

  • For separate component you can check related files in the components > component name > .less file. example to manage header, you can check components > common > layout > header.less

Not recommend to change style in the built .css