### Install Verotel FlexPay Laravel Package via Composer Source: https://github.com/pipisco/laravel-verotel-flexpay/blob/master/README.md This command installs the Verotel FlexPay Laravel package into your project using Composer, the PHP dependency manager. It fetches the package and its dependencies, making them available for use in your application. ```bash composer require pipisco/laravel-verotel-flexpay ``` -------------------------------- ### Create Recurring Verotel FlexPay Subscription Order (PHP) Source: https://github.com/pipisco/laravel-verotel-flexpay/blob/master/README.md This PHP method illustrates how to set up a recurring subscription order using Verotel FlexPay. Similar to the one-time example, it initializes a `FlexPayClient` and specifies mandatory parameters, but sets the `SUBSCRIPTION_TYPE` to `RECURRING` before redirecting to the Verotel order page. ```php /** * @param Request $request * @return RedirectResponse * @throws \Exception * @throws \Pipisco\Verotel\FlexPay\FlexPayException */ public function subscribe(Request $request) : RedirectResponse { $flexpay = new FlexPayClient(); return redirect($flexpay->processor()->subscription([ UrlParameter::NAME => 'Order name', UrlParameter::SUBSCRIPTION_TYPE => SubscriptionType::RECURRING, UrlParameter::PRICE_AMOUNT => 99.99, UrlParameter::PRICE_CURRENCY => Currency::USD, UrlParameter::PERIOD => 'P1M', ])); } ``` -------------------------------- ### Create One-Time Verotel FlexPay Subscription Order (PHP) Source: https://github.com/pipisco/laravel-verotel-flexpay/blob/master/README.md This PHP method demonstrates how to initiate a one-time subscription order with Verotel FlexPay. It uses the `FlexPayClient` to configure mandatory parameters such as order name, subscription type (one-time), price, currency (USD), and period (1 month), then redirects the user to the Verotel order page. ```php /** * @param Request $request * @return RedirectResponse * @throws \Exception * @throws \Pipisco\Verotel\FlexPay\FlexPayException */ public function subscribe(Request $request) : RedirectResponse { $flexpay = new FlexPayClient(); return redirect($flexpay->processor()->subscription([ UrlParameter::NAME => 'Order name', UrlParameter::SUBSCRIPTION_TYPE => SubscriptionType::ONE_TIME, UrlParameter::PRICE_AMOUNT => 99.99, UrlParameter::PRICE_CURRENCY => Currency::USD, UrlParameter::PERIOD => 'P1M', ])); } ``` -------------------------------- ### Verotel FlexPay Subscription URL Parameters (APIDOC) Source: https://github.com/pipisco/laravel-verotel-flexpay/blob/master/README.md This section details the available URL parameters for configuring Verotel FlexPay subscription requests. It provides information on each parameter's name, associated enum helper class, data type, requirement status (mandatory/optional), and a comprehensive description, including supported values and constraints. ```APIDOC Verotel FlexPay Subscription Parameters: - Parameter: priceAmount Enum Helper Class: UrlParameter::PRICE_AMOUNT Type: Float Required: mandatory Description: priceAmount amount to be processed in nnn.nn format Notes: You can use Currency enum class and choose right currency from then: Currency::USD, Currency::EUR, Currency::GBP, Currency::AUD, Currency::CAD, Currency::CHF, Currency::DKK, Currency::NOK, Currency::SEK - Parameter: priceCurrency Enum Helper Class: UrlParameter::PRICE_CURRENCY Type: String Required: mandatory Description: priceCurrency 3 char ISO code, must be one of the Sale currencies (USD EUR GBP AUD CAD CHF DKK NOK SEK) Notes: only EUR is can be used for DDEU payment method system - Parameter: period Enum Helper Class: UrlParameter::PERIOD Type: String Required: mandatory Description: Duration in ISO8601 format, for example: P30D, minimum is 7 days for recurring and 2 days for on-time - Parameter: subscriptionType Enum Helper Class: UrlParameter::SUBSCRIPTION_TYPE Type: String Required: mandatory Description: NOTE: DDEU and BTC only support one-time Notes: You can use SubscriptionType enum class and choose subscription type as bellow: SubscriptionType::ONE_TIME, SubscriptionType::RECURRING - Parameter: trialAmount Enum Helper Class: UrlParameter::TRIAL_AMOUNT Type: Number Required: optional Description: Amount to be processed in nnn.nn format for the initial trial period, minimum is 2 days - Parameter: trialPeriod Enum Helper Class: UrlParameter::TRIAL_PERIOD Type: String Required: optional Description: Duration in ISO8601 format, for example: P30D - Parameter: name Enum Helper Class: UrlParameter::NAME Type: String Required: optional Description: Name of the product. Text is displayed on the order page - max 100 printable characters - Parameter: paymentMethod Enum Helper Class: UrlParameter::PAYMENT_METHOD Type: String Required: optional Description: Payment method, CC, DDEU or BTC (if not set then buyers can choose from available payment methods) Notes: It's a perfect params because yourself choose payment method. For helpful, you can use my PaymentMethod enum class as: Credit card payment PaymentMethod::CREDIT_CARD, PaymentMethod::BTC to Bitcoin payment and PaymentMethod::DIGITAL_DATA_ENTRY_UTIL. NOTE: DDEU is available only in DE, AT, CH, BE, IT, NL, ES and FR - Parameter: referenceID Enum Helper Class: UrlParameter::REFERENCE_ID Type: String Required: optional Description: Merchant's reference identifier. It must be unique if provided - Parameter: custom1 Enum Helper Class: UrlParameter::CUSTOM_1 Type: String Required: optional Description: Pass-through variable - max 255 printable characters - Parameter: custom2 Enum Helper Class: UrlParameter::CUSTOM_2 Type: String Required: optional Description: Pass-through variable - max 255 printable characters - Parameter: custom3 Enum Helper Class: UrlParameter::CUSTOM_3 Type: String Required: optional Description: Pass-through variable - max 255 printable characters - Parameter: backURL Enum Helper Class: UrlParameter::BACK_URL Type: String Required: optional Description: URL for redirect after successful transaction - max 255 characters ``` -------------------------------- ### Configure Verotel FlexPay Credentials in .env Source: https://github.com/pipisco/laravel-verotel-flexpay/blob/master/README.md This code snippet demonstrates how to set the necessary Verotel FlexPay credentials within your Laravel application's .env configuration file. These environment variables are crucial for authenticating with the Verotel FlexPay service. ```php VEROTEL_FLEXPAY_ID= VEROTEL_FLEXPAY_SECRET= VEROTEL_FLEXPAY_MERCHANT_ID= VEROTEL_FLEXPAY_API_VERSION=3.4 ``` -------------------------------- ### Verotel Flexpay URL Parameters Source: https://github.com/pipisco/laravel-verotel-flexpay/blob/master/README.md Defines the available URL parameters for configuring Verotel Flexpay transactions, including their types, optionality, and purpose. These parameters are used to control aspects like redirection after a transaction or pre-filling buyer information. ```APIDOC Parameter: declineURL Constant: UrlParameter::DECLINE_URL Type: String Optional: true Description: URL for redirect after declined transaction - max 255 characters Parameter: email Constant: UrlParameter::EMAIL Type: String Optional: true Description: Email of the buyer. If not set, it will be collected on the Order Page ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.