You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 15, 2020. It is now read-only.
Or add the following line to the require block of your `composer.json` file.
35
33
36
34
```
37
-
"unicodeveloper/laravel-cloudinary": "1.0.*"
35
+
"unicodeveloper/laravel-cloudinary": "1.0.0-beta"
38
36
```
39
37
40
38
You'll then need to run `composer install` or `composer update` to download it and have the autoloader updated.
41
39
42
40
43
-
44
-
Once Laravel Paystack is installed, you need to register the service provider. Open up `config/app.php` and add the following to the `providers` key.
41
+
Once Laravel Cloudinary is installed, you need to register the service provider. Open up `config/app.php` and add the following to the `providers` key.
> If you use **Laravel >= 5.5** you can skip this step and go to [**`configuration`**](https://github.com/unicodeveloper/laravel-cloudinary#configuration)
Though there are multiple ways to pay an order, most payment gateways expect you to follow the following flow in your checkout process:
114
-
115
-
### 1. The customer is redirected to the payment provider
116
-
After the customer has gone through the checkout process and is ready to pay, the customer must be redirected to site of the payment provider.
117
-
118
-
The redirection is accomplished by submitting a form with some hidden fields. The form must send a POST request to the site of the payment provider. The hidden fields minimally specify the amount that must be paid, the order id and a hash.
119
-
120
-
The hash is calculated using the hidden form fields and a non-public secret. The hash used by the payment provider to verify if the request is valid.
121
-
122
-
123
-
### 2. The customer pays on the site of the payment provider
124
-
The customer arrives on the site of the payment provider and gets to choose a payment method. All steps necessary to pay the order are taken care of by the payment provider.
125
-
126
-
### 3. The customer gets redirected back to your site
127
-
After having paid the order the customer is redirected back. In the redirection request to the shop-site some values are returned. The values are usually the order id, a paymentresult and a hash.
128
-
129
-
The hash is calculated out of some of the fields returned and a secret non-public value. This hash is used to verify if the request is valid and comes from the payment provider. It is paramount that this hash is thoroughly checked.
130
-
131
-
132
115
## Usage
133
116
134
-
Open your .env file and add your public key, secret key, merchant email and payment url like so:
117
+
Open your .env file and add your Cloudinary cloud name, api key, api secret, and upload preset like so:
135
118
136
119
```php
137
-
PAYSTACK_PUBLIC_KEY=xxxxxxxxxxxxx
138
-
PAYSTACK_SECRET_KEY=xxxxxxxxxxxxx
139
-
PAYSTACK_PAYMENT_URL=https://api.paystack.co
140
-
MERCHANT_EMAIL=unicodeveloper@gmail.com
120
+
CLOUDINARY_CLOUD_NAME=xxxxxxxxxxxxx
121
+
CLOUDINARY_API_KEY=xxxxxxxxxxxxx
122
+
CLOUDINARY_API_SECRET=xxxxxxxxxxxxx
123
+
CLOUDINARY_UPLOAD_PRESET=xxxxxxxxxxxxx
124
+
CLOUDINARY_NOTIFICATION_URL=
141
125
```
142
-
*If you are using a hosting service like heroku, ensure to add the above details to your configuration variables.*
126
+
127
+
***Note:** You need to get these credentials from your [Cloudinary Dashboard](https://cloudinary.com/console)*
128
+
129
+
*If you are using a hosting service like heroku,forge,digital ocean, etc, please ensure to add the above details to your configuration variables.*
0 commit comments