β 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
- 1 Configuring Email
- 2 Setup SMTP
- 2.1 SendGrid
- 2.2 Gmail
- 2.3 M3 service
- 3 Utilizing Google Analytics
- 4 Adding Custom Script
- 5 Update/Change Style
- 6 Configuring Payment Gateways
- 7 Customizing Footer Menu
- 8 eCommerce Product Types
- 9 Cancelling Subscriptions
- 10 Miscellaneous Qs
- 10.1 1. How does xFans storage asset files such as videos and images?
- 10.2 2. Does xFans support S3 (Simple Storage Service) services like AWS S3 or Digital Ocean Space?
- 10.3 3. Does xFans support FTP file server?
- 10.4 4. Can we deploy xFans to AWS EC2?
- 10.5 5. Does xFans support Kubernetes?
- 10.6 6. Does xFans support Docker?
- 10.7 7. Is xFans using CI/CD in our dev process?
- 10.8 8. How can we deliver the update efficiently?
- 10.9 9. How can we change style (CSS)?
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
Admin email: βxFans Adminβ <admin@myxFans.info>
Sender email: βxFans Supportβ <noreply@myxFans.info
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
Sender email in Email tab must valid with domain you verified in Sendgrid dashboard
Have to verify sender domain in SendGrid dashboard before using https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/
More details about SendGrid SMTP, please read here
Gmail
Host: smtp.google.com
Port: 465 / 587
Auth user: your full email address eg: youremail@gmail.com
Auth password: your Gmail password
Sender email in Email tab must be same your Gmail address
Please enable less secure option here https://www.google.com/settings/u/2/security/lesssecureapps
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
Login xFans admin panel
Select performer Menu in the left
Click edit button on performer you want to update
Enter following information
Salt key (if have)
Sub account number
Pricing
Verotel Flexpay (since v2.1.4)
Go to Admin > Settings > System settings > Payment settings and enter Verotel credentials there
Verotel webhook URL: https://[xFans-v2-api-domain]/payment/verotel/callhook (eg https://api.xFans.info/payment/verotel/callhook)
Success URL: It is redirect pay after payment successful. You can enter https://[xFans-front-office-domain]/payment/success (eg https://xfans.info/payment/success)
Check for Verotel setup here
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
andDatalink Service password
in the Settings > CCBillusername
could be found in theLog in to CCbill admin panel -> Account Info -> Data link services suite
password
could be found in the linkhttps://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 theglobal.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 checkcomponents > common > layout > header.less
Not recommend to change style in the built .css