PHPackages                             amazonpaymentservices/aps-php-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. amazonpaymentservices/aps-php-sdk

ActiveLibrary[Payment Processing](/categories/payments)

amazonpaymentservices/aps-php-sdk
=================================

Amazon Payment Services PHP SDK

2.0.0(2y ago)3114.6k↓26.4%42[6 PRs](https://github.com/payfort/payfort-php-sdk/pulls)MITPHPPHP ^8.1

Since Jun 8Pushed 2y ago10 watchersCompare

[ Source](https://github.com/payfort/payfort-php-sdk)[ Packagist](https://packagist.org/packages/amazonpaymentservices/aps-php-sdk)[ RSS](/packages/amazonpaymentservices-aps-php-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

Amazon Payment Services PHP SDK
===============================

[](#amazon-payment-services-php-sdk)

[Amazon Payment Services](https://paymentservices.amazon.com/) SDK offers seamless payments for PHP platform merchants. If you don't have an APS account click [here](https://paymentservices.amazon.com/) to sign up for Amazon Payment Services account.

Getting Started
---------------

[](#getting-started)

We know that payment processing is critical to your business. With this plugin we aim to increase your payment processing capabilities. Do you have a business-critical questions? View our quick reference [documentation](https://paymentservices.amazon.com/docs/EN/index.html) for key insights covering payment acceptance, integration, and reporting. For SDK Guide refer [wiki](https://github.com/payfort/payfort-php-sdk/wiki)

Payment Options
---------------

[](#payment-options)

- Integration Types

    - Redirection
    - Merchant Page
    - Hosted Merchant Page
    - Apple Pay
    - Installments
    - Recurring
    - MOTO
    - Trusted
- Maintenance Operations

    - Signature Calculation and Validation
    - Refund
    - Capture
    - Void
    - Check Status
    - Feedback Notification handling

Integrations steps
==================

[](#integrations-steps)

Install PHP SDK Package
-----------------------

[](#install-php-sdk-package)

Install the PHP SDK Package of your solution with composer or download it from the GitHub repository and then run the composer update command in terminal to install all the dependencies.

Merchant configuration
----------------------

[](#merchant-configuration)

As a merchant you need to send to the gateway some properties. These properties must be put into an array and set with the following method. If you want integration with Apple Pay all the properties that contains "Apple\_" must be added, otherwise those properties are not required.

Properties sample```
php  
return [     'merchant_identifier'       => '**********',    
 'access_code'               => '**********',    
'SHARequestPhrase'          => '**********',    
 'SHAResponsePhrase'         => '**********',    
'SHAType'                   => '**********',    
 'sandbox_mode'              => true,     
 'Apple_AccessCode'          => '**********',    
 'Apple_SHARequestPhrase'    => '**********',    
 'Apple_SHAResponsePhrase'   => '**********',    
'Apple_SHAType'             => '**********',    
'Apple_DisplayName'         => 'Test Apple store',    
 'Apple_DomainName'          => 'https://store.local.com',    
'Apple_SupportedNetworks'   => ["visa", "masterCard", "amex", "mada"],    
'Apple_SupportedCountries'  => [],    
 'Apple_CertificatePath'     => '**path**to**certificate**',    
 'Apple_CertificateKeyPath'  => '**path**to**certificate**key**',    
 'Apple_CertificateKeyPass'  => 'apple*certificate*password',     
 // folder must be created before    
'log_path'                  => __DIR__ . '/tmp/aps.log',    
'3ds_modal'                 => true,    
'debug_mode'                => false,    
'locale'                    => 'en', ];
```

All the merchant configuration properties

```
// load merchant configuration
$merchantParams = include 'merchant_config.php';

// set merchant configuration one time
APSMerchant::setMerchantParams($merchantParams);

```

Payment data configuration
--------------------------

[](#payment-data-configuration)

As a merchant you need to send to the gateway the payment details. These details must be put into an array and set within the "setPaymentData" method below. The "merchant\_reference" is the customer order number.

```
