-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Implement limited functionality for Split pay/split refund and linked account transfers #12
Conversation
CardPaymentService::authorize and CardPaymentService::settlement
composer.json
Outdated
@@ -1,6 +1,5 @@ | |||
{ | |||
"name": "paysafegroup/paysafe_sdk_php", | |||
"version": "1.0.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not include a specific version in composer.json
, as I didn't want to potentially conflict with the release/tag name. Related: 2ba031d#commitcomment-22631188
@@ -15,12 +14,17 @@ | |||
|
|||
], | |||
"require": { | |||
"php": ">=5.3.0", | |||
"php": ">=5.6", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe any of my changes in the actual SDK code that requires 5.6. However, I believe the PHPUnit tests I added do. Perhaps that requirement would be better served w/ a require-dev. Although, Paysafe may wish to consider dropping official support for 5.3 since PHP doesn't even release security updates for that version anymore.
source/paysafe.php
Outdated
$classPath = strtolower(str_replace("\\", DIRECTORY_SEPARATOR, $className)); | ||
// lc first will make the P in the Paysafe root namespace lower case | ||
// the remainder of the path/file should match case of the namespace/class | ||
$classPath = str_replace("\\", DIRECTORY_SEPARATOR, lcfirst($className)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the minor autoloader change I mentioned, with comments explaining. This change was inspired by this: #11 (comment)
{ | ||
$this->expectException(PHPUnit_Framework_Error::class); | ||
$this->expectExceptionMessage('Undefined variable: return'); | ||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, this and a few other tests make reference to #13
Adding a new service to the SDK for Account Management. This commit includes the functions ping, transferCredit, and transferDebit. Transfer functions can be used to move money between PaySafe master and sub-accounts. The ping function can be used to determine if the Account Management service is available.
split-pay Add AccountManagementService / transfer capability to SDK
Split refund
This PR implements some basic functionality related to linked merchant accounts and split pay. Specifically, it:
I added a number of unit tests for my new code. So, phpunit is now listed as a dev-only dependency.