Automatic SMS payments inSilkroad Online using PayGolYou will learn how to:● Create a multi-price service for Silkroad Online● Receive automatic payments● Update users points● Test your service● Download file from https://sourceforge.net/projects/sms-silkroad/files
You will learn how to receive automatic smspayments in Silkroad without doing anythingmanual. Users can enjoy their points right awaywithout waiting hours or even days.If you still dont have a PayGol account please startby creating one from this link www.paygol.com/registerIntroduction
Follow these steps:●Download the file from https://sourceforge.net/projects/sms-silkroad/files●Upload the paygol.php file to your server.●Create a new service of type Multi-price and fill all the fields.For this example we will create the following options:-An input field where player can enter his character orusername-And the next prices with their web points:100 web points = €1200 web points = €2300 web points = €3
Here you can see a picture about how yourservice creator will look like:Dont forget tosave (click on theyellow savebutton) allchanges for theseoptions button
On field URL Background add the full path where the paygol.php file is located (e.g.:http://www.myserver.com/paygol.php).This file will be called after every payment has beenprocessed, sending you several parameters to make all theprocess automatic.Save all changes and set your service as Testing and testyour service until you are sure is working as you want.
Edit your paygol.php file and replace the "xxxx" by thereal data to connect to your database, you will seesomething like this://set host, username and password for DB$dbhost = "xxxx";$dbuser = "xxxx";$dbpass = "xxxx";$dbname = "xxxx";
Pay attention on the lines:$custom = $_GET[custom];$points = $_GET[points];$custom is the variable where the username or characterof the payer will be stored.$points is the total of web points that user paid for.
Adding the pay buttonClick on the tool button you see below and paste thepiece of HTML code into your web page.
Adding the pay buttonClick on the tool button you see below and paste thepiece of HTML code into your web page. Normally thisbutton goes in the Credits section.
On this section you will see 2 different ways to use your service, with Pop-up and Post. For this example we will use Pop-up. Copy all the code into aHTML page.... test.html for example.
Trying your serviceBy clicking yourservice button youwill now see yourservice working
Testing your serviceGo to My services and change the status of yourservice from Testing
Now press the small red arrow, choosedemo using post or popup mode.Payment screen will display now in testmode (Blue tube indicates test mode)Notice the name of the payment screenis the one you entered when youcreated the service.We used Test Service as our servicename.Test Service £1.00, instruction states:Send GOL 813725 to phone number88080You are supposed to send this andreceive a pin code , you dont need todo this in test mode.Your test pin code will be 123456, youmust enter this pin on the field andpress OKWait for valid confirmation, after thisyou will be redirected to yourdesignated Success URL. When you are sure everything is working as you wantthen go back to your service and set it as Enabled.
Thats all!At this point your Silkroad game would be fully workingaccepting automatic sms payments with PayGol.Have Fun !!!