Package to allow integration with Peach Payments using PHP
There are three ways to configure the client.
$config = new \FlickerLeap\PeachPayments\Configuration(
'set_your_user_id',
'set_your_password',
'set_your_entity_id'
);
$client = new \FlickerLeap\PeachPayments\Client($config);
$client = new \FlickerLeap\PeachPayments\Client([
'set_your_user_id',
'set_your_password',
'set_your_entity_id']
);
$client = new \FlickerLeap\PeachPayments\Client(
'set_your_user_id',
'set_your_password',
'set_your_entity_id'
);
If you wish to use the test server.
$client->setTestMode(true);
All responses will contain an isSuccess method to check if the result was successful
if ($response->isSuccess()) {
// was successful
}
Get Checkout ID for Storing a card.
$storeCard = new \FlickerLeap\PeachPayments\Cards\Store($client, $shopperResultUrl, $notificationUrl);
$response = $storeCard->process();
Get Checkout ID for payment.
$debitPayment = new \FlickerLeap\PeachPayments\Payments\Debit($client, $amount);
$response = $debitPayment->process();
Get Payment status.
$paymentStatus = new \FlickerLeap\PeachPayments\Payments\Status($client, $checkoutId);
$response = $paymentStatus->process();