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

Subscription plan #856

Open
fabianoroberto opened this issue May 14, 2020 · 0 comments
Open

Subscription plan #856

fabianoroberto opened this issue May 14, 2020 · 0 comments

Comments

@fabianoroberto
Copy link

fabianoroberto commented May 14, 2020

https://github.com/Payum/Payum/blob/master/docs/stripe/subscription-billing.md

That syntax now is invalid:

use Payum\Stripe\Request\Api\CreatePlan;

$plan = new \ArrayObject([
    "amount" => 2000,
    "interval" => "month",
    "name" => "Amazing Gold Plan",
    "currency" => "usd",
    "id" => "gold"
]);

/** @var \Payum\Core\Payum $payum */
$payum->getGateway('gatewayName')->execute(new CreatePlan($plan));

New syntax according with https://stripe.com/docs/api/plans/create should be:

$plan = new \ArrayObject([
    'amount' => 2000,
    'currency' => 'usd',
    'interval' => 'month',
    'product' => [
        'id' => 'gold',
        'name' => 'Amazing Gold Plan',
    ]
]);
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

1 participant