@@ -190,18 +190,25 @@ public function startSession()
190
190
}
191
191
192
192
/**
193
- * Retorna a transação da notoficação .
193
+ * Retorna a transação da notificação .
194
194
*
195
195
* @param string $notificationCode
196
196
*
197
197
* @return \SimpleXMLElement
198
198
*/
199
- public function notification ($ notificationCode )
199
+ public function notification ($ notificationCode, $ notificationType = ' transaction ' )
200
200
{
201
- return $ this ->sendTransaction ([
202
- 'email ' => $ this ->email ,
203
- 'token ' => $ this ->token ,
204
- ], $ this ->url ['notifications ' ].$ notificationCode , false );
201
+ if ($ notificationType == 'transaction ' ) {
202
+ return $ this ->sendTransaction ([
203
+ 'email ' => $ this ->email ,
204
+ 'token ' => $ this ->token ,
205
+ ], $ this ->url ['notifications ' ].$ notificationCode , false );
206
+ } elseif ($ notificationType == 'preApproval ' ) {
207
+ return $ this ->sendTransaction ([
208
+ 'email ' => $ this ->email ,
209
+ 'token ' => $ this ->token ,
210
+ ], $ this ->url ['preApprovalNotifications ' ].$ notificationCode , false );
211
+ }
205
212
}
206
213
207
214
/**
0 commit comments