selimppc

END Point URL for zipMoney

May 15th, 2017
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.76 KB | None | 0 0
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: sr9
  5. * Date: 5/15/17
  6. * Time: 12:53 PM
  7. */
  8.  
  9. namespace App\Modules\Web\Controllers;
  10.  
  11.  
  12. use zipMoney\Webhook\Webhook;
  13. use Illuminate\Auth\Guard;
  14.  
  15. class ZipMoneyWebHook extends Webhook
  16. {
  17.  
  18. public function __construct(Guard $auth)
  19. {
  20. $this->auth = $auth;
  21. }
  22.  
  23. # The following code should be triggered by the webhook url.
  24. public function subscribeAction(){
  25. try{
  26. $webhookTest = new ZipMoneyWebHook();
  27. $webhookTest->listen();
  28.  
  29.  
  30. } catch(Exception $e){
  31. echo $e->getMessage();
  32. }
  33. }
  34.  
  35.  
  36. /**
  37. * Process Authorisation Success
  38. * @param $response
  39. */
  40. protected function _eventAuthSuccess($response){
  41. // Code
  42. }
  43.  
  44. /**
  45. * Process Authorisation Failure
  46. * @param $response
  47. */
  48. protected function _eventAuthFail($response){
  49. // Code
  50. }
  51.  
  52. /**
  53. * Process Authorisation Review
  54. * @param $response
  55. */
  56. protected function _eventAuthReview($response){
  57. // Code
  58. }
  59.  
  60. /**
  61. * Process Authorisation Review
  62. * @param $response
  63. */
  64. protected function _eventAuthDeclined($response){
  65. // Code
  66. }
  67.  
  68. /**
  69. * Process Cancel Success
  70. * @param $response
  71. */
  72. protected function _eventCancelSuccess($response){
  73. // Code
  74. }
  75.  
  76. /**
  77. * Process Cancel Fail
  78. * @param $response
  79. */
  80. protected function _eventCancelFail($response){
  81. // Code
  82. }
  83.  
  84. /**
  85. * Process Capture Success
  86. * @param $response
  87. */
  88. protected function _eventCaptureSuccess($response){
  89. // Code
  90. }
  91.  
  92. /**
  93. * Process Capture Failure
  94. * @param $response
  95. */
  96. protected function _eventCaptureFail($response){
  97. // Code
  98. }
  99.  
  100. /**
  101. * Process Refund Success
  102. * @param $response
  103. */
  104. protected function _eventRefundSuccess($response){
  105. // Code
  106. }
  107.  
  108. /**
  109. * Process Refund Fail
  110. * @param $response
  111. */
  112. protected function _eventRefundFail($response){
  113. // Code
  114. }
  115.  
  116. /**
  117. * Process Order Cancel
  118. * @param $response
  119. */
  120. protected function _eventOrderCancel($response){
  121. // Code
  122. }
  123.  
  124. /**
  125. * Process Charge Success
  126. * @param $response
  127. */
  128. protected function _eventChargeSuccess($response){
  129. // Code
  130. }
  131.  
  132. /**
  133. * Process Charge Fail
  134. * @param $response
  135. */
  136. protected function _eventChargeFail($response){
  137. // Code
  138. }
  139.  
  140. /**
  141. * Process Config Update
  142. * @param $response
  143. */
  144. protected function _eventConfigUpdate($response){
  145. // Code
  146. }
  147.  
  148. }
Add Comment
Please, Sign In to add comment