GithubHelp home page GithubHelp logo

zfr-stripe's People

Contributors

adrienbrault avatar bakura10 avatar dominikto avatar gsteel avatar rosantoz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

zfr-stripe's Issues

Document the use of Stripe Connect access tokens

I would love to get cracking with this lib, as it seems better structured than the native PHP SDK. One thing I am missing in the docs/examples is the use of access tokens for requests made on behalf of Connected users.

Spring cleaning

Hi,

I'd like to release a v2 of the library, with the following goals:

  • Bump minimum PHP dependency to 5.4 (5.3 is end of life now).
  • Removing the oldest descriptors and only keep the latest 3.
  • I've realized that Stripe releases a lot of new versions, and copy-pasting the whole descriptor just to change a new property takes a lot of spaces. The ServiceDescriptor folder is already nearly 1 Mb! What I'd like to do instead is only modifying the things that have changed. For instance, the latest descriptor is a BC break because it returns additional info but does not change anything to the request, so I did this: https://github.com/zf-fr/zfr-stripe/blob/master/src/ZfrStripe/Client/ServiceDescription/Stripe-2014-07-22.php

Wrong encoding of boolean parameters

Hi,

I discovered that Guzzle converts boolean parameters as `for false and`1`for true, e.g.`at_period_end=1`for setting it to`true with command execution.

I don't know if there are any other ways to handle this, but I think this can be fixed by adding extra command.before_send listener:

$boolParams = array(
    'capture',
    'refund_application_fee',
    'at_period_end',
    'prorate',
    'closed',
    'verified',
);
$command = $event['command'];
$request = $command->getRequest();
foreach ($request->getQuery()->getKeys() as $key) {
    if (in_array($key, $boolParams)) {
        $request->getQuery()->set(
            $key,
            $request->getQuery()->get($key) === true ? 'true' : 'false'
        );
    }
}

Another option is to set those parameter types to string in service description and assume that library user will provide valid "true" or "false".

integration stripe avec zf2

j'ai essayé d’intégré stripe stripe avec ZF2.
le problème comment je veux intégrer token et customer
ci-dessous mon code :

if(isset($_POST) && !empty($_POST)){
$token = $_POST['stripeToken'];

        $client   = new StripeClient('sk_test_ePj4j8ZGIRZM8PFQ3tkznV8y', '2015-10-16');
        $details = $client->createCharge([
                'amount'   => 500,
                'currency' => 'EUR',
                'customer' =>  ?
            ]);

        pr($details);die;
   Merci.


    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.