Examples

Examples

Each of the following examples will create a different Payforit window. Please note that you must replace the  company and password parameters with your own details to pass validation.

  • Create a large Payforit window to charge the end user 5.00 GBP
https://payforit.txtnation.com/api/?company=mycompany&password=XXXXX&value=5.00¤cy=GBP&name=My+first+Payforit+product&description=My+first+Payforit+test+dislogue&window=large&success_url=http%3A%2F%2Fwww.txtnation.com%2F&cancel_url=http%3A%2F%2Fwww.mfusion.com%2F&callback_url=http%3A%2F%2Ftxtnation.com
  • Create a small Payforit window to charge the end user 1.00 GBP
https://payforit.txtnation.com/api/?company=mycompany&password=XXXXX&value=1.00¤cy=GBP&name=My+redirecting+Payforit+window&description=Another+test+from+my+Payforit+dislogue&window=small&success_url=http%3A%2F%2Fwww.txtnation.com%2F&cancel_url=http%3A%2F%2Fwww.mfusion.com%2F&callback_url=http%3A%2F%2Ftxtnation.com

Callback URL

For a simple one time payment, the Callback URL will receive the following variables by HTTP POST from the MessageCloud Gateway server, which represent the progress/status each payment attempt.

[key] => da787950b76abXXXX2fdeee4d3ac7427da046bc429    
[billed] => 1    
[transactionId] => 1481485429996291    
[status] => OK    
[msisdn] => 447777777777    
[network] => ORANGEUK

These variables should be extracted from the HTTP $_POST variable and stored to a database for your own records and further processing.

For full details of the notifications see  PayforIt Notifications

Success URL

Upon successful payment the consumer will be re-directed to URL defined for this variable

Cancel URL

When the consumer selects cancel during the payment process they will be re-directed to URL defined for this variable