Skip to content
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

How to set application_fee to Stripe #466

Open
mikebase opened this issue Jun 10, 2018 · 1 comment
Open

How to set application_fee to Stripe #466

mikebase opened this issue Jun 10, 2018 · 1 comment

Comments

@mikebase
Copy link

Hi! I am trying to set application_fee. Stripe docs say:

$charge = \Stripe\Charge::create(array(
  "amount" => 1000,
  "currency" => "eur",
  "source" => "tok_visa",
  "application_fee" => 123,
), array("stripe_account" => "{CONNECTED_STRIPE_ACCOUNT_ID}"));

In my app, I am setting additional stripe's fields with setDetails:

$storage = $this->get('payum')->getStorage('AppBundle\Entity\Payment');

$payment = $storage->create();
...
$payment->setDetails([
  'application_fee' => 123,
]);

But I have no idea how to set stripe_account (I have generated CONNECTED_STRIPE_ACCOUNT_ID correctly). Any combinations of setting Stripe's values return an error from api.

Thanks.

@yurguis
Copy link

yurguis commented Dec 3, 2019

I'm trying to use connected account from Stripe but I see that Payum's Stripe integration is not ready for it.
This is stripe-php's method signature for create:
protected static function _create($params = null, $options = null)
and stripe bundle is not passing any options, thus no way so far to use this method.
I'm trying to create a custom action, which seems to be working fine, but what I need to do is this action to use a custom api, is this possible at all with Payum?
So far I haven't been able to make this work without overwriting Stripe bundle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants