1. Automatic SMS payments inDofus using PayGolYou will learn how to:● Create a multi-price service for Dofus● Receive automatic payments● Update users points● Test your service● Download file from https://sourceforge.net/projects/sms-dofus/files
2. You will learn how to receive automatic smspayments in Dofus without doing anything manual.Users can enjoy their points right away withoutwaiting hours or even days.If you still dont have a PayGol account please startby creating one from this link www.paygol.com/registerIntroduction
3. Follow these steps:●Download the file from●https://sourceforge.net/projects/sms-dofus/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
4. Here you can see a picture about how yourservice creator will look like:Dont forget tosave (click on theyellow savebutton) allchanges for theseoptions button
5. On field URL Background add the fullpath 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.
6. 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";
7. 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.
8. Adding the pay buttonClick on the tool button you see below and paste thepiece of HTML code into your web page.
9. 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.
10. On this section you will see 2 different waysto use your service, with Pop-up and Post.For this example we will use Pop-up. Copyall the code into a HTML page.... test.htmlfor example.
11. Trying your serviceBy clicking yourservice button youwill now see yourservice working
12. Testing your serviceGo to My services and change the status of yourservice from Testing
13. 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.
14. Thats all!At this point your Dofus game would be fully workingaccepting automatic sms payments with PayGol.Have Fun !!!