Download the PHP package nimah79/f3-zarinpal without Composer

On this page you can find all versions of the php package nimah79/f3-zarinpal. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package f3-zarinpal

F3 Zarinpal

This is a Zarinpal plugin for the PHP Fat-Free Framework.

Features

Installation

Using Composer

composer require nimah79/f3-zarinpal 

Config sample

Add these lines to your F3 config:

Quick Start

Request Authority (and redirecting user)

Verifying transaction

More!

Set uesr information

You can pass user information to Zarinpal. This is recommended to have more control on your transactions:

Using Sandbox

You can use sandbox mode when you want to do some test transactions with custom result (succeeded or failed):

Using Zaringate

By default, users will redirect to Zarinpal Webgate page, but you can transfer your users to payment gateway directly. Notice that you need to activate necessary service for using Zaringate (call Zarinpal supports):

Shared payoff

This method is suitable for those sellers whose benefit from entered price must be distributed in a special way. For example, you own a website that presents ceremony services and you have some contributions with several contractors. In this way you would keep some money and settle the rest of it to the contractors' account.

You can also add multiple items for shared payoff:

Long time authority

By default, an authority will expire at 15 minutes after generating, but you can set your custom lifetime for your generated authority by using expireIn() method (between 1800 to 3888000 seconds). You should use it before request():

Notice that you need to activate necessary service for using thins method (call Zarinpal supports).

Get redirect URL

Sometimes, you need to have gateway URL instead of redirecting:

Pay attention to use this method after $zarinpal->request(). Look at to this example:

Get generated authority

Normally you don't need this method, but it's possible to get pure generated authority. It also need to run after request():

Refresh Authority

If you want to refresh your authority lifetime, use refreshAuthority(). It does the same thing that expireIn() does. but refreshAuthority() can be used when you generated an authority in past and expireIn() will help you to set your authority life span before generating:

Get list of unverified transactions

This method return a list of transactions that you didn't verify() them, so it sound that all transactions on this list should be uncompleted:

Response

All responses from the API will return a Response object. This object contains these datas:

You can check if the request was successful or not using ok, get returned status in status and get translated status message in message. Also, you can access to api result in body.


All versions of f3-zarinpal with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
ext-curl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nimah79/f3-zarinpal contains the following files

Loading the files please wait ....