Skip to content

[WIP] new implementation #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

[WIP] new implementation #1

wants to merge 1 commit into from

Conversation

youbs
Copy link

@youbs youbs commented Apr 14, 2016

Hi,

I started working on an http client agnostic implementation with PSR-4 namespaces.
Let me know if you're interested to use it as a base for the official client :)

I would like to release it under the MIT license, but we can discuss it if you want.
Next steps are:

  • Missing methods
  • Model classes instead of php array as reponses
  • Unit tests
  • symfony/options-resolver 2.8 (or previous) compatibility check (I think I used a method only available in 3.0)
  • Symfony Bundle (I'll release it as another package)

I used Httplug (http://docs.php-http.org/en/latest/index.html) as the client agnostic library, I'm aware that it brings a lot of dependencies but in the end I think it's worth it, you can use curl, or guzzle (the most used http client in the php world) or any other implementation that follows PSR-7.

I added a composer.json file to be able to register the package to Packagist, I took the liberty of using paylike as the vendor if you want to use it (if not, I'll continue to develop my fork under another vendor name of course). In case you're willing to go with it, you will have to register it yourself on packagist and add the webhook on github.

I saw in the previous todo file that you left the php world a while ago, so feel free to ask if you have any question regarding my choices :)

This is of course a work in progress, I didn't test it yet against a live application, so any feedback is appreciated

@Hakadel
Copy link

Hakadel commented Apr 14, 2016

👍

@youbs youbs force-pushed the feat-base branch 7 times, most recently from 3ba4872 to 435a27f Compare April 17, 2016 15:13
$apiKey = 'your-api-key';

$paylike = new Paylike(HttpClientFactory::create($apiKey));
$transaction = $paylike->transaction()->fetch($transactionId);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should by findOne right?

@tjconcept
Copy link
Member

This is high quality, I love it.

@youbs
Copy link
Author

youbs commented Apr 20, 2016

Thanks!
I'll keep you posted when it's ready then :)

@youbs youbs force-pushed the feat-base branch 4 times, most recently from a97cead to ab8cd3d Compare April 20, 2016 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants