flow.php 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. 'class' => '\Hawese\Payment\Gateways\FlowGateway',
  9. 'test_mode' => env('FLOW_TEST_MODE', false),
  10. 'credentials' => [
  11. 'apiKey' => env('FLOW_API_KEY'),
  12. 'secretKey' => env('FLOW_SECRET_KEY'),
  13. ],
  14. 'payment_methods' => [
  15. 'purchase' => 'paymentMethod',
  16. ],
  17. 'schemas' => [
  18. 'purchase' => [
  19. 'required' => [
  20. 'subject',
  21. 'amount',
  22. 'email',
  23. 'paymentMethod',
  24. ],
  25. 'properties' => [
  26. 'subject' => [
  27. 'title' => 'Descripción',
  28. 'type' => 'string',
  29. ],
  30. 'currency' => [
  31. 'title' => 'Moneda',
  32. 'type' => 'string',
  33. 'enum' => ['CLP'],
  34. 'default' => 'CLP',
  35. 'readOnly' => true,
  36. ],
  37. 'amount' => [
  38. 'title' => 'Monto',
  39. 'type' => 'number',
  40. 'multipleOf' => 1,
  41. ],
  42. 'email' => [
  43. 'title' => 'Email',
  44. 'type' => 'string',
  45. 'format' => 'idn-email',
  46. ],
  47. 'paymentMethod' => [
  48. 'title' => 'Medio de pago',
  49. 'type' => 'integer',
  50. 'oneOf' => [
  51. [
  52. 'const' => 1,
  53. 'title' => 'Webpay Plus',
  54. 'description' => 'Tarjetas de crédito o débito',
  55. ],
  56. [
  57. 'const' => 2,
  58. 'title' => 'Servipag',
  59. 'description' => (
  60. 'Comercios Servipag o tarjetas de casas ' .
  61. 'comerciales'
  62. ),
  63. ],
  64. [
  65. 'const' => 3,
  66. 'title' => 'Multicaja',
  67. 'description' => (
  68. 'Efectivo en comercios Multicaja'
  69. ),
  70. ],
  71. [
  72. 'const' => 5,
  73. 'title' => 'Onepay',
  74. 'description' => (
  75. 'Tarjetas de crédito por medio de app Onepay'
  76. ),
  77. ],
  78. [
  79. 'const' => 8,
  80. 'title' => 'Cryptocompra',
  81. 'description' => (
  82. 'Cryptomonedas Bitcoin, Ethereum o Stellar'
  83. ),
  84. ],
  85. ],
  86. ],
  87. ],
  88. ],
  89. ],
  90. ];