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
Requires
- php: >=5.5.0
- ext-curl: *
- psr/log: 1.*
Requires (Dev)
- phpunit/phpunit: ~4.0
This package is not auto-updated.
Last update: 2023-09-02 20:41:11 UTC
README
- 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()
}