Really just a few dependency updates. Nothing else.
PayFast frustrates me somewhat. Anyway...
- Dropped support for PHP before v8.1.
- PayFast appear to be throwing errors when including an empty JSON string. The
Request->make()
method has been updated to set the body tonull
if no array is provided. This does away with the error from PayFast
- Laravel 10 support.
- Dropped support for PHP 7.4.
- [Bug] Fixed a bug in the request that was not including the body parameters in the signature.
- [Change] Changed the request body from
application/x-www-form-urlencoded
toapplication/json
.
- Updated the PayFast validation hostname to include the "www." prefix.
- Error when making subscription API requests. The endpoint is incorrect.
- Updated to support Laravel 9.
- Exception thrown when using
ItnValidator->validate()
without callingtesting()
. The validator will now assume testing isfalse
.
- When posting to PayFast in production, the url should be
www.payfast.co.za
(with the "www" bit).
- If no email confirmation is required, don't include the
email_confirmation
attribute with a false value.
- Fixed a bug where the
setRecurringAmount
method on theTransaction
class had a missing return value. - Updated the
Subscription->request()
method to include the thrown exception when not able to communicate with PayFast.
- The
ItnValidator->getParamString()
method's visibility has been changed fromprotected
topublic
.
- The
PayfastResponse
class has been renamed toPayFastResponse
(uppercase "F"). - The
PayFastResponse->payfastPaymentId()
method has been renamed topayFastPaymentId()
.
- Added a
billingDate
method toPayFastResponse
.
- Documentation updated.
- Changed the
Merchant
constructor now takes 3 parameters. The third being the required passphrase. - Changed the
PayFast
constructor will no longer accept the passphrase as the second parameter. - Changed attributes will be included if they're specifically NULL and not falsy.
- Changed the
Signature
constructor will now accept an array of attributes as the first parameter instead of aTransaction
instance. - Changed the
generate
method on theSignature
class now accepts a boolean parameter to sort the attributes (required by PayFast API). - Changed some dependency updates.
- Added a
Subscription
class to represent a PayFast subscription object. - Added a
subscription
method to theTransaction
class to set a transaction as recurring. - Added a
recurringAmount
method toTransaction
. - Added a
merchant
method toTransaction
to get the set merchant instance. - Added a
merchantId()
method toMerchant
class to get the set ID. - Added a
merchantKey()
method toMerchant
class to get the set key. - Added a
passphrase()
method toMerchant
class to get the set passphase. - Added a
token()
method to theItnValidator
and thePayfastResponse
classes for when tokens are returned from PayFast. - Added a new
PayfastException
for errors returned by PayFast.
- Remove the paused check when unpausing a subscription.
- Added method to be able to fetch customer data from a
Customer
instance. There are newfirstName()
,lastName()
,emailAddress()
andcellNumber()
methods. - Added the
ItnValidator
class. Call thevalidate()
method to validate the response from PayFast. - Added a
PayfastResponse
class to represent the response from the processor. - Added a
PaymentStatus
class which just has some useful class constants. - Added a
Transaction::amount()
method to return the transaction total amount.
- The first parameter of the
Customer->setName()
method is now optional. - Changes to the README file to reflect usage changes.
- Renamed the
Transaction::paymentId
member tomerchantPaymentId
.
- Project setup