forked from anvargear/LaravelPayuLatam
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0a9e024
commit 23ef255
Showing
2 changed files
with
38 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
# Migration | ||
|
||
Please copy the migration from the migrations folder in this package to your app and run `php artisan:migrate` | ||
|
||
# Web Checkout Class | ||
|
||
This class will alow you to generate the signature and will hold all the informtion needed to build a form for the web checkout endpoint in PayU Latam. | ||
This class will alow you to generate the signature and will hold all the information needed to build a form for the web checkout endpoint in PayU Latam. | ||
|
||
## Env file | ||
|
||
|
@@ -34,4 +38,36 @@ This class will alow you to generate the signature and will hold all the informt | |
$webCheckout->init('[email protected]', 'Description', 'Reference', 35000, 0, 0)->process(); | ||
$form = new PayuLatamForm($webCheckout); | ||
echo $form->getForm(); | ||
``` | ||
``` | ||
Don't forget to add this endpoint to the except property in the VerifyCsfrToken Middleware | ||
|
||
``` | ||
'payu/confirmation' | ||
``` | ||
|
||
Something like this | ||
|
||
```php | ||
|
||
namespace App\Http\Middleware; | ||
|
||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier; | ||
|
||
class VerifyCsrfToken extends BaseVerifier | ||
{ | ||
/** | ||
* The URIs that should be excluded from CSRF verification. | ||
* | ||
* @var array | ||
*/ | ||
protected $except = [ | ||
'payu/confirmation' | ||
]; | ||
} | ||
|
||
``` | ||
|
||
#Events | ||
|
||
The package fires 2 events in the confirmation post request `AnvarCO\PayuLatam\Events\ConfirmationArrived` once the post arrives and `AnvarCO\PayuLatam\Events\ConfirmationSaved` once the confirmation information has been added to the database. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters