A few updates to remove standarize the nullability across a number of methods. Deprecated in PHP 8.4.
Laravel 12 support.
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 tonullif 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-urlencodedtoapplication/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_confirmationattribute with a false value.
- Fixed a bug where the
setRecurringAmountmethod on theTransactionclass 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 fromprotectedtopublic.
- The
PayfastResponseclass has been renamed toPayFastResponse(uppercase "F"). - The
PayFastResponse->payfastPaymentId()method has been renamed topayFastPaymentId().
- Added a
billingDatemethod toPayFastResponse.
- Documentation updated.
- Changed the
Merchantconstructor now takes 3 parameters. The third being the required passphrase. - Changed the
PayFastconstructor 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
Signatureconstructor will now accept an array of attributes as the first parameter instead of aTransactioninstance. - Changed the
generatemethod on theSignatureclass now accepts a boolean parameter to sort the attributes (required by PayFast API). - Changed some dependency updates.
- Added a
Subscriptionclass to represent a PayFast subscription object. - Added a
subscriptionmethod to theTransactionclass to set a transaction as recurring. - Added a
recurringAmountmethod toTransaction. - Added a
merchantmethod toTransactionto get the set merchant instance. - Added a
merchantId()method toMerchantclass to get the set ID. - Added a
merchantKey()method toMerchantclass to get the set key. - Added a
passphrase()method toMerchantclass to get the set passphase. - Added a
token()method to theItnValidatorand thePayfastResponseclasses for when tokens are returned from PayFast. - Added a new
PayfastExceptionfor errors returned by PayFast.
- Remove the paused check when unpausing a subscription.
- Added method to be able to fetch customer data from a
Customerinstance. There are newfirstName(),lastName(),emailAddress()andcellNumber()methods. - Added the
ItnValidatorclass. Call thevalidate()method to validate the response from PayFast. - Added a
PayfastResponseclass to represent the response from the processor. - Added a
PaymentStatusclass 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::paymentIdmember tomerchantPaymentId.
- Project setup