payment.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. // Copyright 2019 Hackware SpA <human@hackware.cl>
  3. // This file is part of "Hackware Web Services Payment" and licensed under
  4. // the terms of the GNU Affero General Public License version 3, or (at your
  5. // option) a later version. You should have received a copy of this license
  6. // along with the software. If not, see <https://www.gnu.org/licenses/>.
  7. return [
  8. 'source_url' => env('PAYMENT_SOURCE_URL'),
  9. 'origins' => [
  10. 'wallet' => [
  11. 'return_url' => env('PAYMENT_RETURN_URL'),
  12. 'notify' => [
  13. 'status' => ['completed'],
  14. 'uri' => env('PAYMENT_WALLET_ENDPOINT') . '/transactions',
  15. 'headers' => [
  16. 'Content-Type' => 'application/json',
  17. 'Authorization' => 'Bearer ' . env('PAYMENT_CORE_AUTH_TOKEN'),
  18. ],
  19. 'method' => 'POST',
  20. 'params' => [
  21. 'user_uid' => 'payment.user_uid',
  22. 'currency_code' => 'payment.currency',
  23. 'amount' => 'payment.amount',
  24. 'type' => 'hawese_payment',
  25. 'description' => 'payment.description',
  26. 'detail' => [
  27. 'uuid' => 'payment.uuid',
  28. ],
  29. ],
  30. ],
  31. ],
  32. 'hacktivista_com' => [
  33. 'return_url' => env('PAYMENT_HACKTIVISTA_COM_ENDPOINT') . '/checkout',
  34. 'notify' => [
  35. 'status' => ['completed', 'aborted'],
  36. 'uri' => env('PAYMENT_HACKTIVISTA_COM_ENDPOINT') . '/verify-payment',
  37. 'headers' => [
  38. 'Content-Type' => 'application/x-www-form-urlencoded',
  39. 'Authorization' => 'Bearer ' .
  40. env('PAYMENT_HACKTIVISTA_COM_AUTH_TOKEN'),
  41. ],
  42. 'method' => 'POST',
  43. 'params' => [
  44. 'status' => 'payment.status',
  45. 'uuid' => 'payment.uuid',
  46. ],
  47. ],
  48. ],
  49. ],
  50. ];