b4payment/b4pay-php-client

B4Payment Client for PHP

Installs: 13 012

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 1

Open Issues: 1

Type:project

v1.0.1 2017-10-05 07:28 UTC

This package is not auto-updated.

Last update: 2023-09-02 20:41:11 UTC


README

  1. Instantiate the "PaymentGateway\Client\Client" with your credentials.
$client = new Client("username", "password", "apiKey", "sharedSecret");

$customer = new Customer();
$customer->setBillingCountry("AT")
	->setEmail("customer@email.test");

$debit = new Debit();
$debit->setTransactionId("uniqueTransactionReference")
	->setSuccessUrl($redirectUrl)
	->setCancelUrl($redirectUrl)
	->setCallbackUrl($callbackUrl)
	->setAmount(10.00)
	->setCurrency('EUR')
	->setCustomer($customer);

$result = $client->debit($debit);

if ($result->isSuccess()) {
	//act depending on $result->getReturnType()
}