flow.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <?php
  2. // Copyright 2019-2022 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. 'class' => '\Hawese\Payment\Gateways\FlowGateway',
  9. 'countries' => ['CL'],
  10. 'test_mode' => env('FLOW_TEST_MODE', false),
  11. 'credentials' => [
  12. 'apiKey' => env('FLOW_API_KEY'),
  13. 'secretKey' => env('FLOW_SECRET_KEY'),
  14. ],
  15. 'payment_methods' => [
  16. 'purchase' => 'paymentMethod',
  17. ],
  18. 'schemas' => [
  19. 'purchase' => [
  20. 'required' => [
  21. 'subject',
  22. 'amount',
  23. 'email',
  24. 'paymentMethod',
  25. ],
  26. 'standard_map' => [
  27. 'subject' => 'subject',
  28. 'email' => 'email',
  29. 'due_amount' => 'amount',
  30. 'payment_method' => 'paymentMethod',
  31. 'currency' => 'currency'
  32. ],
  33. 'properties' => [
  34. 'subject' => [
  35. 'title' => 'Descripción',
  36. 'type' => 'string',
  37. ],
  38. 'currency' => [
  39. 'title' => 'Moneda',
  40. 'type' => 'string',
  41. 'enum' => ['CLP'],
  42. 'default' => 'CLP',
  43. 'readOnly' => true,
  44. ],
  45. 'amount' => [
  46. 'title' => 'Monto',
  47. 'type' => 'number',
  48. 'multipleOf' => 1,
  49. ],
  50. 'email' => [
  51. 'title' => 'Email',
  52. 'type' => 'string',
  53. 'format' => 'idn-email',
  54. ],
  55. 'paymentMethod' => [
  56. 'title' => 'Medio de pago',
  57. 'type' => 'integer',
  58. 'oneOf' => [
  59. [
  60. 'const' => 1,
  61. 'title' => 'Webpay Plus',
  62. 'description' => 'Tarjetas de crédito o débito',
  63. 'image' => env('APP_URL') .
  64. '/img/payment_methods/webpay_plus.svg',
  65. ],
  66. [
  67. 'const' => 2,
  68. 'title' => 'Servipag',
  69. 'description' => (
  70. 'Comercios Servipag o tarjetas de casas ' .
  71. 'comerciales'
  72. ),
  73. 'image' => env('APP_URL') .
  74. '/img/payment_methods/servipag.svg',
  75. ],
  76. [
  77. 'const' => 3,
  78. 'title' => 'Multicaja',
  79. 'description' => (
  80. 'Efectivo en comercios Multicaja'
  81. ),
  82. 'image' => env('APP_URL') .
  83. '/img/payment_methods/multicaja.svg',
  84. ],
  85. [
  86. 'const' => 5,
  87. 'title' => 'Onepay',
  88. 'description' => (
  89. 'Tarjetas de crédito por medio de app Onepay'
  90. ),
  91. 'image' => env('APP_URL') .
  92. '/img/payment_methods/onepay.svg',
  93. ],
  94. [
  95. 'const' => 8,
  96. 'title' => 'Cryptocompra',
  97. 'description' => (
  98. 'Cryptomonedas Bitcoin, Ethereum o Stellar'
  99. ),
  100. 'image' => env('APP_URL') .
  101. '/img/payment_methods/cryptocompra.svg',
  102. ],
  103. [
  104. 'const' => 15,
  105. 'title' => 'MACH',
  106. 'description' => (
  107. 'Aplicación MACH'
  108. ),
  109. 'image' => env('APP_URL') .
  110. '/img/payment_methods/mach.svg',
  111. ],
  112. [
  113. 'const' => 25,
  114. 'title' => 'Chek',
  115. 'description' => (
  116. 'Aplicación Chek'
  117. ),
  118. 'image' => env('APP_URL') .
  119. '/img/payment_methods/chek.svg',
  120. ],
  121. ],
  122. ],
  123. ],
  124. ],
  125. ],
  126. ];