PHPackages                             begateway/begateway-api-php - 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. [API Development](/categories/api)
4. /
5. begateway/begateway-api-php

ActiveLibrary[API Development](/categories/api)

begateway/begateway-api-php
===========================

BeGateway PHP API library

5.1.1(1y ago)2364.0k—1.7%12[1 issues](https://github.com/begateway/begateway-api-php/issues)2MITPHPPHP &gt;=7.3.0

Since Sep 15Pushed 1y ago16 watchersCompare

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

READMEChangelogDependencies (3)Versions (33)Used By (2)

BeGateway payment system API integration library
================================================

[](#begateway-payment-system-api-integration-library)

Requirements
------------

[](#requirements)

PHP &gt;=7.3

Test data
---------

[](#test-data)

### Shop without 3-D Secure

[](#shop-without-3-d-secure)

- Shop Id **361**
- Shop secret key **b8647b68898b084b836474ed8d61ffe117c9a01168d867f24953b776ddcb134d**

### Shop with 3-D Secure

[](#shop-with-3-d-secure)

- Shop Id **362**
- Shop secret key **9ad8ad735945919845b9a1996af72d886ab43d3375502256dbf8dd16bca59a4e**

### Test data set

[](#test-data-set)

- Card name **John Doe**
- Card expiry month **01** to get a success payment
- Card expiry month **10** to get a failed payment
- CVC **123**

### Test card numbers

[](#test-card-numbers)

Refer to the documentation  for valid test card numbers.

Getting started
---------------

[](#getting-started)

### Setup

[](#setup)

Before to use the library classes you must configure it. You have to setup values of variables as follows:

- `shopId`
- `shopKey`
- `gatewayBase`
- `checkoutBase`

This data you will receive from your payment processor.

```
BeGateway\Settings::$shopId  = 361;
BeGateway\Settings::$shopKey = 'b8647b68898b084b836474ed8d61ffe117c9a01168d867f24953b776ddcb134d';
BeGateway\Settings::$gatewayBase = 'https://demo-gateway.begateway.com';
BeGateway\Settings::$checkoutBase = 'https://checkout.begateway.com';
```

### Hosted payment page

[](#hosted-payment-page)

Simple usage looks like:

```
