-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathnotification.php
More file actions
35 lines (23 loc) · 816 Bytes
/
notification.php
File metadata and controls
35 lines (23 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/* Simples integração com PicPay
* Arquivo de Notificação
* @author: Luan Alves
*/
/* Este arquivo deve estar configurado em sua callback url
* para o PicPay posso enviar as requisições aqui.
* O picpay irá esperar uma resposta HTTP 200 do seu site
* Acesse a documentação do PicPay para ver mais detalhes.
* https://ecommerce.picpay.com/doc/
*/
// class PicPay
require_once 'src/paymentPicPay.php';
$picpay = new PicPay;
// função que verifica a requisição
$notification = $picpay->notificationPayment();
if($notification){
$status = $notification->status;
$authorizationId = $notification->authorizationId;
$referenceId = $notification->referenceId;
/* -- Tratar dados -- */
}
?>