Download the PHP package atpay/atpay_php without Composer

On this page you can find all versions of the php package atpay/atpay_php. 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 atpay_php

@Pay PHP Bindings

PHP implementation of @Pay's Token Protocol. See the @Pay Developer Site for additional information.

A Token is a value that contains information about a financial transaction (an invoice or a product sales offer, for instance). When a Token is sent to [email protected] from an address associated with a Payment Method, it will create a Transaction.

There are two classes of Token @Pay processes - the Targeted Token, which should be used for sending invoices or transactions applicable to a single recipient, and the Bulk Token, which is suitable for email marketing lists.

An Email Button is a link embedded in an email message. When activated, this link opens a new outgoing email with a recipient, subject, and message body prefilled. By default this email contains one of the two token types. Clicking 'Send' delivers the email to @Pay and triggers Transaction processing. The sender will receive a receipt or further instructions.

Installation

This library requires that the PHP Sodium Extension be installed.

PHP Archive

Then require atpay_php in your application:

Composer

Configuration

All Token generation functions require a Session object. Grab your API credentials from https://dashboard.atpay.com/ (API Settings):

Targeted Tokens

A targeted token is ideal for sending invoices or for transactions that are only applicable to a single recipient (specialized offers, etc).

The following creates a token for a 20 dollar transaction specifically for the credit card @Pay has associated with '[email protected]':

Note: Targeted tokens used to be known as Invoice tokens. Please use Targeted tokens, as Invoice tokens will be deprecated.

Bulk Tokens

Most merchants will be fine generating Bulk Email Buttons manually on the @Pay Merchant Dashboard, but for cases where you need to automate the generation of these messages, you can create Bulk Tokens without communicating directly with @Pay's servers.

A Bulk Token is designed for large mailing lists. You can send the same token to any number of recipients. It's ideal for 'deal of the day' type offers, or general marketing.

To create a Bulk Token for a 30 dollar blender:

If a recipient of this token attempts to purchase the product via email but hasn't configured a credit card, they'll receive a message asking them to complete their transaction. You should integrate the @Pay JS SDK on that page if you want to allow them to create a two-click email transaction in the future.

General Token Attributes

Auth Only

A Token will trigger a funds authorization and a funds capture simultaneously. If you're shipping a physical good, or for some other reason want to delay the capture, use the auth_only! method to adjust this behavior:

Expiration

A Token expires in 2 weeks unless otherwise specified. Trying to use the Token after the expiration results in a polite error message being sent to the sender. To adjust the expiration:

Signup Page

When a new Customer or a Customer with expired or invalid credit card details attempts to purchase from an Email, they will be redirected to a Token's Signup Page, where they can enter new Credit Card details. By default @Pay will host the Signup Page, but you may wish to direct the Customer to a product page on your own site (Enable @Pay Card tokenization on your own page with the @Pay JS SDK). To specify a custom URL:

Requesting Custom Information on a Hosted Signup Page

If you opt to use the Hosted Payment Capture Page (by not specifying a URL above), you can request further information from your Customer during the purchase on the Web. For instance, the following requests an optional Gift Message:

Requesting the URL of a Hosted Signup Page

The Hosted Payment Capture Page is related directly to a Token. It is created when the token is first received at [email protected] or when the URL is requested from @Pay prior to the first use. To request the URL, you must contact @Pay's server:

NOTE: For high traffic this solution may be inadequate. Contact @Pay for consultation.

Item Name

You can set an item name that will display on the Hosted Payment Capture Page

Item Details

You can set an item details that will display on the Hosted Payment Capture Page

Address Collection

Request the Hosted Payment Capture Page collect any combination of shipping or billing address with requires_shipping_address(true) and requires_billing_address(true):

Set Item Quantity

If you are using @Pay's webhook for inventory control, you can specify an initial quantity for the offer you are creating.

Fulfillment Time

Transaction Details from @Pay may include an Estimated Fulfillment Time. @Pay expects Auth Only transactions when fulfillment is required. A Transaction should be Captured only when fulfillment is completed.

Custom User Data

Custom User Data is a token attribute that contains any string that you wish to get back in @Pay’s response on processing the token. It has a limit of 2500 characters.

Button Generation

The PHP client does not currently support button generation.

Full Example


All versions of atpay_php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
ext-sodium 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 atpay/atpay_php contains the following files

Loading the files please wait ....