\PBFastURL
Privat24 fast payments URL helper
Synopsis
class PBFastURL
{
- // constants
- const BASE_URL = 'https://next.privat24.ua/payments/form/';
- const OPTION_TOKEN = 'PB_FASTURL_TOKEN';
- const OPTION_PRICES = 'PB_FASTURL_PRICES';
- const OPTION_TEMPLATE = 'PB_FASTURL_TEMPLATE';
- const OPTION_SHORTENER = 'PB_FASTURL_SHORTENER';
- const OPTION_CURRENCY = 'TEMPLATE_CURRENCY';
- const OPTION_SENDDOG = 'SENDDOG_ENABLED';
- const OPTION_PREVIEW = 'PB_FASTURL_PREVIEW';
- const OPTION_MOBILE_PREFIX = 'REMINDER_PREFIX';
- const AGENT_PREFIX = 'UbillingPBFastURL';
- const PROUTE_PAYID = 'pbfupaymentid';
- const PROUTE_AMOUNT = 'pbfuamount';
- const PROUTE_CUST_AMOUNT = 'pbfucustomamount';
- const PROUTE_PREVIEW = 'pbfonlypreview';
- const PROUTE_PHONE = 'pbfuphonenumber';
- const STYLE_PATH = 'skins/pbfu.css';
- // members
- protected string $token = '';
- protected array $pricesAvail = ;
- protected string $template = '';
- protected string $shortener = '';
- protected $messages = '';
- protected string $currency = '';
- protected integer $sendDogFlag = 0;
- protected integer $previewFlag = 0;
- protected string $mobilePrefix = '';
- protected string $userLogin = '';
- // methods
- public void __construct()
- protected void setOptions()
- protected void setLogin()
- protected void initMessages()
- public string getUrl()
- protected string|void renderLinkPreview()
- protected string|void catchSMSRequest()
- public string renderForm()
Constants
| Name | Value |
|---|---|
| BASE_URL | 'https://next.privat24.ua/payments/form/' |
| OPTION_TOKEN | 'PB_FASTURL_TOKEN' |
| OPTION_PRICES | 'PB_FASTURL_PRICES' |
| OPTION_TEMPLATE | 'PB_FASTURL_TEMPLATE' |
| OPTION_SHORTENER | 'PB_FASTURL_SHORTENER' |
| OPTION_CURRENCY | 'TEMPLATE_CURRENCY' |
| OPTION_SENDDOG | 'SENDDOG_ENABLED' |
| OPTION_PREVIEW | 'PB_FASTURL_PREVIEW' |
| OPTION_MOBILE_PREFIX | 'REMINDER_PREFIX' |
| AGENT_PREFIX | 'UbillingPBFastURL' |
| PROUTE_PAYID | 'pbfupaymentid' |
| PROUTE_AMOUNT | 'pbfuamount' |
| PROUTE_CUST_AMOUNT | 'pbfucustomamount' |
| PROUTE_PREVIEW | 'pbfonlypreview' |
| PROUTE_PHONE | 'pbfuphonenumber' |
| STYLE_PATH | 'skins/pbfu.css' |
Members
protected
- $currency
—
string
Contains user currency - $messages
—
System message helper instance - $mobilePrefix
—
string
Contains default mobile numbers prefix - $previewFlag
—
int
Is preview checkbox enabled? - $pricesAvail
—
array
Contains available prices listed in config option - $sendDogFlag
—
int
SendDog enabled/disabled flag - $shortener
—
string
Full shortener service URL - $template
—
string
Contains basic SMS text template placed before URL - $token
—
string
Contains ISP payment token - $userLogin
—
string
Contains optional user login
Methods
protected
- catchSMSRequest() — Catches SMS sending request and stores SMS into SendDog sending queue
- initMessages() — Inits message helper for further usage
- renderLinkPreview() — Renders link preview
- setLogin() — Sets user login property
- setOptions() — Sets the options for the current instance using global configuration parameters.
public
- __construct()
- getUrl() — Generates a payment URL based on the provided payment ID and sum.
- renderForm() — Renders a form for processing a payment URL sending to user.