@@ -190,18 +190,25 @@ public function startSession()
190190 }
191191
192192 /**
193- * Retorna a transação da notoficação .
193+ * Retorna a transação da notificação .
194194 *
195195 * @param string $notificationCode
196196 *
197197 * @return \SimpleXMLElement
198198 */
199- public function notification ($ notificationCode )
199+ public function notification ($ notificationCode, $ notificationType = ' transaction ' )
200200 {
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+ }
205212 }
206213
207214 /**
0 commit comments