@@ -33,7 +33,7 @@ Add Facade in `config/app.php`:
3333```
3434
3535Add env configuration:
36- ```
36+ ``` env
3737
3838...
3939STRIPE_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@@ -47,27 +47,27 @@ Reference url: https://stripe.com/docs/api
4747
4848- Stripe One Time Payment
4949
50- ```
50+ ``` php
5151
52- $customer => [
52+ $customer = [
5353 'name' => 'xxxxxx',
54545555 ];
5656
57- $card => [
57+ $card = [
5858 'number' => 'xxxx-xxxx-xxxx-xxxx',
5959 'exp_month' => '01', // 01-12
6060 'exp_year' => '2021',
6161 'cvc' => 'xxx'
6262 ];
6363
64- $package => [
64+ $package = [
6565 'currency' => 'usd', // usd / USD
6666 'amount' => '01',
6767 'description' => 'xxxxxx'
6868 ];
6969
70- $address => [
70+ $address = [
7171 'city' => 'xxxxxx', // optional
7272 'country' => 'xxxxxx',
7373 'line1' => 'xxxxxx',
@@ -76,7 +76,7 @@ Reference url: https://stripe.com/docs/api
7676 'state' => 'xxxxxx' // optional
7777 ];
7878
79- $return_url // URL to redirect your customer back to after they authenticate or cancel their payment
79+ $return_url = ""; // URL to redirect your customer back to after they authenticate or cancel their payment
8080
8181 \VaahStripe::pay($customer, $card, $package, $address, $return_url);
8282
@@ -85,19 +85,19 @@ Reference url: https://stripe.com/docs/api
8585- Stripe Subscription
8686``` php
8787
88- $customer => [
88+ $customer = [
8989 'name' => 'xxxxxx',
90909191 ];
9292
93- $card => [
93+ $card = [
9494 'number' => 'xxxx-xxxx-xxxx-xxxx',
9595 'exp_month' => '01', // 01-12
9696 'exp_year' => '2021',
9797 'cvc' => 'xxx'
9898 ];
9999
100- $address => [
100+ $address = [
101101 'city' => 'xxxxxx', // optional
102102 'country' => 'xxxxxx',
103103 'line1' => 'xxxxxx',
@@ -106,9 +106,9 @@ Reference url: https://stripe.com/docs/api
106106 'state' => 'xxxxxx' // optional
107107 ];
108108
109- $price_id // Price define the unit cost, currency, and (optional) billing cycle for Subcription
109+ $price_id = 50; // Price define the unit cost, currency, and (optional) billing cycle for Subcription
110110
111- $return_url // URL to redirect your customer back to after they authenticate or cancel their payment
111+ $return_url = ""; // URL to redirect your customer back to after they authenticate or cancel their payment
112112
113113 \VaahStripe::subscription($customer, $card, $address, $price_id, $return_url);
114114
@@ -117,7 +117,7 @@ Reference url: https://stripe.com/docs/api
117117- Create Product
118118``` php
119119
120- $request => [
120+ $request = [
121121 'name' => 'xxxxxx',
122122 'description' => 'xxxxxx'
123123 ];
@@ -129,7 +129,7 @@ Reference url: https://stripe.com/docs/api
129129- Create Price
130130``` php
131131
132- $request => [
132+ $request = [
133133 'product_id' => 'xxxxxx',
134134 'currency' => 'usd',
135135 'amount' => '01',
@@ -151,11 +151,11 @@ Reference url: https://stripe.com/docs/api
151151- Find Price
152152``` php
153153
154- $product_id
154+ $product_id = 1;
155155
156- $value //optional
156+ $value = ""; //optional
157157
158- $by //optional default = amount amount/currency/interval
158+ $by = ""; //optional default = amount amount/currency/interval
159159
160160 \VaahStripe::getProductPrice($product_id, $value, $by);
161161
0 commit comments