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 / Recurring #108

Open
lintangtimur opened this issue Jan 14, 2025 · 0 comments
Open

Subscription / Recurring #108

lintangtimur opened this issue Jan 14, 2025 · 0 comments

Comments

@lintangtimur
Copy link

$arrayVar = [
                "name" => "MONTHLY_2019",
                "amount" => $request->input('amount'),
                "currency" => "IDR",
                "payment_type" => "credit_card",
                "token" => $snapToken,
                "schedule" => [
                    "interval" => 1,
                    "interval_unit" => "month",
                    "max_interval" => 12,
                    "start_time" => "2025-01-15 07:25:01 +0700",
                ],
                "retry_schedule" => [
                    "interval" => 1,
                    "interval_unit" => "day",
                    "max_interval" => 3,
                ],
                "metadata" => ["description" => "Recurring payment for A"],
                "customer_details" => [
                    "first_name" => "John",
                    "last_name" => "Doe",
                    "email" => "[email protected]",
                    "phone" => "+628xxxxx",
                ],
            ];
            
            // $paymentUrl = \Midtrans\Snap::createTransaction($params)->redirect_url;
            $paymentUrl = CoreApi::createSubscription($arrayVar);

di doc untuk subs, payment hanya bisa CC dan gopay, tapi hasil dari coding diatas keluarnya banyak metode pembayaran
image

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