pixelpay_sdk 1.0.0.pre.beta.3 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 961abbeb4b8500cf6a7b72d56b6e989f9ad272eea07ac70cf84f6358e5770edd
4
- data.tar.gz: 8d74a9ce9e7cdcebea00c63cbb6b2cee9c80c658cba56a679a8caa4ce94fdff2
3
+ metadata.gz: acc458f77dc08528d9e7a2b97dadb9a4ee5d31d2fad16bd614ff4d9cbc489b71
4
+ data.tar.gz: 7577d6ee6549ee9dcb8fe5eabc513812908446e7cffcbece7e402b4f9db73e08
5
5
  SHA512:
6
- metadata.gz: 572a75320c2523a9ba0a42ec5dfa17da844d1c51381486bc584a1d516b10c5bf617b30cacf55d4eb0b078134a76f6559a5a18d95c619adba1d2d8082aae1487c
7
- data.tar.gz: efabb3851beab2c6dbc4430a5d54bbafb49418d4ce7e251e08eb34a53fb8129d52effaa247611b8bab34181a9ec2de91ddce97bf7a95a12800756b56cf330935
6
+ metadata.gz: f4fc2e5dda0a61e715ab3e1d430bbb094577100dced9f58c093f55c6493c7cce74ec5fc938d2bbe65cdd17702f86fb6c2a7bc79397ae4bd814f2f2641773149b
7
+ data.tar.gz: c054076b82f7385fac19b58e17fd2f3736fa0772739c4b99760ec9e1e24e3035c517a5b036656dea58158e23fbed7c32e6a7763790aa53e3bf8b0d3e30da467a
data/CHANGELOG.md CHANGED
@@ -5,6 +5,21 @@ El formato se basa en [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  y este proyecto se adhiere a [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
  Tipos de cambios: `Added`, `Changed`, `Deprecated`, `Removed`, `Fixed`, `Security`.
7
7
 
8
+ ## [v1.0.2] - 2024-02-27
9
+ ### Fixed
10
+ - Se arreglan códigos de estados en Nicaragua, Reino Unido, Estados Unidos, Guatemala, Panamá, Perú y Portugal
11
+
12
+ ## [1.0.1] - 2023-09-21
13
+ ### Removed
14
+ - Se elimina lógica de encriptación de datos de tarjeta.
15
+
16
+ ## [1.0.0] - 2023-08-09
17
+ ### Added
18
+ - Se agregó encriptación de datos de tarjeta.
19
+ - Se omiten los métodos de encriptación si la petición no lo requiere.
20
+ - Se arregló servicios de tokenización enviando fecha de expiración incorrecta si no se llenan los campos.
21
+ - Se agregó campos faltantes de programas en `TransactionResult`.
22
+
8
23
  ## [1.0.0-beta.3] - 2023-06-08
9
24
  ### Added
10
25
  - Se agregan campos de cuotas y puntos.
@@ -28,4 +43,4 @@ Tipos de cambios: `Added`, `Changed`, `Deprecated`, `Removed`, `Fixed`, `Securit
28
43
 
29
44
  ## [1.0.0-beta.1] - 2023-05-12
30
45
  ### Added
31
- - Se publica primer version de pruebas
46
+ - Se publica primer version de pruebas.
data/CONTRIBUTING.md CHANGED
@@ -2,12 +2,9 @@
2
2
 
3
3
  ## ¿Como publicar?
4
4
 
5
- - Actualizar la versión en la constante `VERSION` de `lib/pixelpay_sdk/version.rb`.
6
- - Ejecutar los test una última vez para asegurar que todo funciona correctamente.
7
- ```
8
- rake test
9
- ```
10
5
  - Agregar al `CHANGELOG.md` las descripciones del cambio.
6
+ - Actualizar la versión en la constante `VERSION` de `lib/pixelpay_sdk/version.rb` y en `README.MD`
7
+ - Ejecutar los test para asegurar que todo funciona correctamente.
11
8
  - Crear un commit con los cambios, agregar una etiqueta con el número de versión y hacer push con los tags.
12
9
 
13
10
  ## Pruebas
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pixelpay_sdk (1.0.0.pre.beta.3)
4
+ pixelpay_sdk (1.0.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -5,12 +5,12 @@
5
5
  Para obtener la versión del SDK de PixelPay con Ruby puedes utilizar este comando para instalar directamente:
6
6
 
7
7
  ``` bash
8
- gem install pixelpay_sdk-1.0.0-beta.3
8
+ gem install pixelpay_sdk-1.0.2
9
9
  ```
10
10
 
11
11
  O puedes colocar en el archivo Gemfile la siguiente línea:
12
12
  ``` bash
13
- gem 'pixelpay_sdk', '~> 1.0.0.pre.beta.3'
13
+ gem 'pixelpay_sdk', '~> 1.0.2'
14
14
  ```
15
15
 
16
16
  Y luego ejecutar:
@@ -1116,28 +1116,28 @@
1116
1116
  "GU-YO": "Yona"
1117
1117
  },
1118
1118
  "GT": {
1119
- "GT-AV": "Alta Verapaz",
1120
- "GT-BV": "Baja Verapaz",
1121
- "GT-CM": "Chimaltenango",
1122
- "GT-CQ": "Chiquimula",
1123
- "GT-PR": "El Progreso",
1124
- "GT-ES": "Escuintla",
1125
- "GT-GU": "Guatemala",
1126
- "GT-HU": "Huehuetenango",
1127
- "GT-IZ": "Izabal",
1128
- "GT-JA": "Jalapa",
1129
- "GT-JU": "Jutiapa",
1130
- "GT-PE": "Peten",
1131
- "GT-QZ": "Quetzaltenango",
1132
- "GT-QC": "Quiche",
1133
- "GT-RE": "Retalhuleu",
1134
- "GT-SA": "Sacatepequez",
1135
- "GT-SM": "San Marcos",
1136
- "GT-SR": "Santa Rosa",
1137
- "GT-SO": "Solola",
1138
- "GT-SU": "Suchitepequez",
1139
- "GT-TO": "Totonicapan",
1140
- "GT-ZA": "Zacapa"
1119
+ "GT-16": "Alta Verapaz",
1120
+ "GT-15": "Baja Verapaz",
1121
+ "GT-04": "Chimaltenango",
1122
+ "GT-20": "Chiquimula",
1123
+ "GT-02": "El Progreso",
1124
+ "GT-05": "Escuintla",
1125
+ "GT-01": "Guatemala",
1126
+ "GT-13": "Huehuetenango",
1127
+ "GT-18": "Izabal",
1128
+ "GT-21": "Jalapa",
1129
+ "GT-22": "Jutiapa",
1130
+ "GT-17": "Peten",
1131
+ "GT-09": "Quetzaltenango",
1132
+ "GT-14": "Quiche",
1133
+ "GT-11": "Retalhuleu",
1134
+ "GT-03": "Sacatepequez",
1135
+ "GT-12": "San Marcos",
1136
+ "GT-06": "Santa Rosa",
1137
+ "GT-07": "Solola",
1138
+ "GT-10": "Suchitepequez",
1139
+ "GT-08": "Totonicapan",
1140
+ "GT-19": "Zacapa"
1141
1141
  },
1142
1142
  "GN": {
1143
1143
  "GN-BF": "Boffa",
@@ -2186,8 +2186,8 @@
2186
2186
  "NI-CA": "Carazo",
2187
2187
  "NI-CI": "Chinandega",
2188
2188
  "NI-CO": "Chontales",
2189
- "NI-CN": "Costa Caribe Norte",
2190
- "NI-CS": "Costa Caribe Sur",
2189
+ "NI-AN": "Costa Caribe Norte",
2190
+ "NI-AS": "Costa Caribe Sur",
2191
2191
  "NI-ES": "Esteli",
2192
2192
  "NI-GR": "Granada",
2193
2193
  "NI-JI": "Jinotega",
@@ -2309,6 +2309,7 @@
2309
2309
  "PK-SD": "Sindh"
2310
2310
  },
2311
2311
  "PA": {
2312
+ "PA-5": "Darien",
2312
2313
  "PA-1": "Bocas del Toro",
2313
2314
  "PA-4": "Chiriqui",
2314
2315
  "PA-2": "Cocle",
@@ -2317,9 +2318,10 @@
2317
2318
  "PA-7": "Los Santos",
2318
2319
  "PA-8": "Panama",
2319
2320
  "PA-9": "Veraguas",
2320
- "PA-13": "Panam\u00e1 Oeste",
2321
+ "PA-10": "Panam\u00e1 Oeste",
2321
2322
  "PA-EM": "Embera-Wounaan",
2322
2323
  "PA-KY": "Guna Yala",
2324
+ "PA-NT": "Naso Tjer Di",
2323
2325
  "PA-NB": "Ngobe-Bugle"
2324
2326
  },
2325
2327
  "PG": {
@@ -2379,6 +2381,7 @@
2379
2381
  "PE-LOR": "Loreto",
2380
2382
  "PE-MDD": "Madre de Dios",
2381
2383
  "PE-MOQ": "Moquegua",
2384
+ "PE-LMA": "Municipalidad Metropolitana de Lima",
2382
2385
  "PE-PAS": "Pasco",
2383
2386
  "PE-PIU": "Piura",
2384
2387
  "PE-PUN": "Puno",
@@ -2491,26 +2494,26 @@
2491
2494
  "PL-32": "Zachodniopomorskie"
2492
2495
  },
2493
2496
  "PT": {
2494
- "PT-AV": "Aveiro",
2495
- "PT-BE": "Beja",
2496
- "PT-BR": "Braga",
2497
- "PT-BA": "Braganza",
2498
- "PT-CB": "Castelo Branco",
2499
- "PT-CO": "Coimbra",
2500
- "PT-EV": "Evora",
2501
- "PT-FA": "Faro",
2502
- "PT-GU": "Guarda",
2503
- "PT-LE": "Leiria",
2504
- "PT-LI": "Lisboa",
2505
- "PT-PA": "Portalegre",
2506
- "PT-PO": "Porto",
2507
- "PT-SA": "Santarem",
2508
- "PT-SE": "Setubal",
2509
- "PT-VC": "Viana do Castelo",
2510
- "PT-VR": "Vila Real",
2511
- "PT-VI": "Viseu",
2512
- "PT-MA": "Regiao Autonoma da Madeira",
2513
- "PT-AC": "Regiao Autonoma dos Acores"
2497
+ "PT-01": "Aveiro",
2498
+ "PT-02": "Beja",
2499
+ "PT-03": "Braga",
2500
+ "PT-04": "Braganza",
2501
+ "PT-05": "Castelo Branco",
2502
+ "PT-06": "Coimbra",
2503
+ "PT-07": "Evora",
2504
+ "PT-08": "Faro",
2505
+ "PT-09": "Guarda",
2506
+ "PT-10": "Leiria",
2507
+ "PT-11": "Lisboa",
2508
+ "PT-12": "Portalegre",
2509
+ "PT-13": "Porto",
2510
+ "PT-14": "Santarem",
2511
+ "PT-15": "Setubal",
2512
+ "PT-16": "Viana do Castelo",
2513
+ "PT-17": "Vila Real",
2514
+ "PT-18": "Viseu",
2515
+ "PT-30": "Regiao Autonoma da Madeira",
2516
+ "PT-20": "Regiao Autonoma dos Acores"
2514
2517
  },
2515
2518
  "GW": {
2516
2519
  "GW-BS": "Bissau",
@@ -3723,10 +3726,223 @@
3723
3726
  "EG-SHG": "Suhaj"
3724
3727
  },
3725
3728
  "GB": {
3726
- "GB-ENG": "England",
3727
- "GB-NIR": "Northern Ireland",
3728
- "GB-SCT": "Scotland",
3729
- "GB-WLS": "Wales"
3729
+ "GB-CAM": "Cambridgeshire",
3730
+ "GB-CMA": "Cumbria",
3731
+ "GB-DBY": "Derbyshire",
3732
+ "GB-DEV": "Devon",
3733
+ "GB-DOR": "Dorset",
3734
+ "GB-ESX": "East Sussex",
3735
+ "GB-ESS": "Essex",
3736
+ "GB-GLS": "Gloucestershire",
3737
+ "GB-HAM": "Hampshire",
3738
+ "GB-HRT": "Hertfordshire",
3739
+ "GB-KEN": "Kent",
3740
+ "GB-LAN": "Lancashire",
3741
+ "GB-LEC": "Leicestershire",
3742
+ "GB-LIN": "Lincolnshire",
3743
+ "GB-NFK": "Norfolk",
3744
+ "GB-NYK": "North Yorkshire",
3745
+ "GB-NTT": "Nottinghamshire",
3746
+ "GB-OXF": "Oxfordshire",
3747
+ "GB-SOM": "Somerset",
3748
+ "GB-STS": "Staffordshire",
3749
+ "GB-SFK": "Suffolk",
3750
+ "GB-SRY": "Surrey",
3751
+ "GB-WAR": "Warwickshire",
3752
+ "GB-WSX": "West Sussex",
3753
+ "GB-WOR": "Worcestershire",
3754
+ "GB-LND": "London, City of",
3755
+ "GB-BDG": "Barking and Dagenham",
3756
+ "GB-BNE": "Barnet",
3757
+ "GB-BEX": "Bexley",
3758
+ "GB-BEN": "Brent",
3759
+ "GB-BRY": "Bromley",
3760
+ "GB-CMD": "Camden",
3761
+ "GB-CRY": "Croydon",
3762
+ "GB-EAL": "Ealing",
3763
+ "GB-ENF": "Enfield",
3764
+ "GB-GRE": "Greenwich",
3765
+ "GB-HCK": "Hackney",
3766
+ "GB-HMF": "Hammersmith and Fulham",
3767
+ "GB-HRY": "Haringey",
3768
+ "GB-HRW": "Harrow",
3769
+ "GB-HAV": "Havering",
3770
+ "GB-HIL": "Hillingdon",
3771
+ "GB-HNS": "Hounslow",
3772
+ "GB-ISL": "Islington",
3773
+ "GB-KEC": "Kensington and Chelsea",
3774
+ "GB-KTT": "Kingston upon Thames",
3775
+ "GB-LBH": "Lambeth",
3776
+ "GB-LEW": "Lewisham",
3777
+ "GB-MRT": "Merton",
3778
+ "GB-NWM": "Newham",
3779
+ "GB-RDB": "Redbridge",
3780
+ "GB-RIC": "Richmond upon Thames",
3781
+ "GB-SWK": "Southwark",
3782
+ "GB-STN": "Sutton",
3783
+ "GB-TWH": "Tower Hamlets",
3784
+ "GB-WFT": "Waltham Forest",
3785
+ "GB-WND": "Wandsworth",
3786
+ "GB-WSM": "Westminster",
3787
+ "GB-BNS": "Barnsley",
3788
+ "GB-BIR": "Birmingham",
3789
+ "GB-BOL": "Bolton",
3790
+ "GB-BRD": "Bradford",
3791
+ "GB-BUR": "Bury",
3792
+ "GB-CLD": "Calderdale",
3793
+ "GB-COV": "Coventry",
3794
+ "GB-DNC": "Doncaster",
3795
+ "GB-DUD": "Dudley",
3796
+ "GB-GAT": "Gateshead",
3797
+ "GB-KIR": "Kirklees",
3798
+ "GB-KWL": "Knowsley",
3799
+ "GB-LDS": "Leeds",
3800
+ "GB-LIV": "Liverpool",
3801
+ "GB-MAN": "Manchester",
3802
+ "GB-NET": "Newcastle upon Tyne",
3803
+ "GB-NTY": "North Tyneside",
3804
+ "GB-OLD": "Oldham",
3805
+ "GB-RCH": "Rochdale",
3806
+ "GB-ROT": "Rotherham",
3807
+ "GB-SHN": "St. Helens",
3808
+ "GB-SLF": "Salford",
3809
+ "GB-SAW": "Sandwell",
3810
+ "GB-SFT": "Sefton",
3811
+ "GB-SHF": "Sheffield",
3812
+ "GB-SOL": "Solihull",
3813
+ "GB-STY": "South Tyneside",
3814
+ "GB-SKP": "Stockport",
3815
+ "GB-SND": "Sunderland",
3816
+ "GB-TAM": "Tameside",
3817
+ "GB-TRF": "Trafford",
3818
+ "GB-WKF": "Wakefield",
3819
+ "GB-WLL": "Walsall",
3820
+ "GB-WGN": "Wigan",
3821
+ "GB-WRL": "Wirral",
3822
+ "GB-WLV": "Wolverhampton",
3823
+ "GB-BAS": "Bath and North East Somerset",
3824
+ "GB-BDF": "Bedford",
3825
+ "GB-BBD": "Blackburn with Darwen",
3826
+ "GB-BPL": "Blackpool",
3827
+ "GB-BCP": "Bournemouth, Christchurch and Poole",
3828
+ "GB-BRC": "Bracknell Forest",
3829
+ "GB-BNH": "Brighton and Hove",
3830
+ "GB-BST": "Bristol, City of",
3831
+ "GB-BKM": "Buckinghamshire",
3832
+ "GB-CBF": "Central Bedfordshire",
3833
+ "GB-CHE": "Cheshire East",
3834
+ "GB-CHW": "Cheshire West and Chester",
3835
+ "GB-CON": "Cornwall",
3836
+ "GB-DAL": "Darlington",
3837
+ "GB-DER": "Derby",
3838
+ "GB-DUR": "Durham, County",
3839
+ "GB-ERY": "East Riding of Yorkshire",
3840
+ "GB-HAL": "Halton",
3841
+ "GB-HPL": "Hartlepool",
3842
+ "GB-HEF": "Herefordshire",
3843
+ "GB-IOW": "Isle of Wight",
3844
+ "GB-IOS": "Isles of Scilly",
3845
+ "GB-KHL": "Kingston upon Hull",
3846
+ "GB-LCE": "Leicester",
3847
+ "GB-LUT": "Luton",
3848
+ "GB-MDW": "Medway",
3849
+ "GB-MDB": "Middlesbrough",
3850
+ "GB-MIK": "Milton Keynes",
3851
+ "GB-NEL": "North East Lincolnshire",
3852
+ "GB-NLN": "North Lincolnshire",
3853
+ "GB-NNH": "North Northamptonshire",
3854
+ "GB-NSM": "North Somerset",
3855
+ "GB-NBL": "Northumberland",
3856
+ "GB-NGM": "Nottingham",
3857
+ "GB-PTE": "Peterborough",
3858
+ "GB-PLY": "Plymouth",
3859
+ "GB-POR": "Portsmouth",
3860
+ "GB-RDG": "Reading",
3861
+ "GB-RCC": "Redcar and Cleveland",
3862
+ "GB-RUT": "Rutland",
3863
+ "GB-SHR": "Shropshire",
3864
+ "GB-SLG": "Slough",
3865
+ "GB-SGC": "South Gloucestershire",
3866
+ "GB-STH": "Southampton",
3867
+ "GB-SOS": "Southend-on-Sea",
3868
+ "GB-STT": "Stockton-on-Tees",
3869
+ "GB-STE": "Stoke-on-Trent",
3870
+ "GB-SWD": "Swindon",
3871
+ "GB-TFW": "Telford and Wrekin",
3872
+ "GB-THR": "Thurrock",
3873
+ "GB-TOB": "Torbay",
3874
+ "GB-WRT": "Warrington",
3875
+ "GB-WBK": "West Berkshire",
3876
+ "GB-WNH": "West Northamptonshire",
3877
+ "GB-WIL": "Wiltshire",
3878
+ "GB-WNM": "Windsor and Maidenhead",
3879
+ "GB-WOK": "Wokingham",
3880
+ "GB-YOR": "York",
3881
+ "GB-ANN": "Antrim and Newtownabbey",
3882
+ "GB-AND": "Ards and North Down",
3883
+ "GB-ABC": "Armagh City, Banbridge and Craigavon",
3884
+ "GB-BFS": "Belfast City",
3885
+ "GB-CCG": "Causeway Coast and Glens",
3886
+ "GB-DRS": "Derry and Strabane",
3887
+ "GB-FMO": "Fermanagh and Omagh",
3888
+ "GB-LBC": "Lisburn and Castlereagh",
3889
+ "GB-MEA": "Mid and East Antrim",
3890
+ "GB-MUL": "Mid-Ulster",
3891
+ "GB-NMD": "Newry, Mourne and Down",
3892
+ "GB-ABE": "Aberdeen City",
3893
+ "GB-ABD": "Aberdeenshire",
3894
+ "GB-ANS": "Angus",
3895
+ "GB-AGB": "Argyll and Bute",
3896
+ "GB-CLK": "Clackmannanshire",
3897
+ "GB-DGY": "Dumfries and Galloway",
3898
+ "GB-DND": "Dundee City",
3899
+ "GB-EAY": "East Ayrshire",
3900
+ "GB-EDU": "East Dunbartonshire",
3901
+ "GB-ELN": "East Lothian",
3902
+ "GB-ERW": "East Renfrewshire",
3903
+ "GB-EDH": "Edinburgh, City of",
3904
+ "GB-ELS": "Eilean Siar",
3905
+ "GB-FAL": "Falkirk",
3906
+ "GB-FIF": "Fife",
3907
+ "GB-GLG": "Glasgow City",
3908
+ "GB-HLD": "Highland",
3909
+ "GB-IVC": "Inverclyde",
3910
+ "GB-MLN": "Midlothian",
3911
+ "GB-MRY": "Moray",
3912
+ "GB-NAY": "North Ayrshire",
3913
+ "GB-NLK": "North Lanarkshire",
3914
+ "GB-ORK": "Orkney Islands",
3915
+ "GB-PKN": "Perth and Kinross",
3916
+ "GB-RFW": "Renfrewshire",
3917
+ "GB-SCB": "Scottish Borders",
3918
+ "GB-ZET": "Shetland Islands",
3919
+ "GB-SAY": "South Ayrshire",
3920
+ "GB-SLK": "South Lanarkshire",
3921
+ "GB-STG": "Stirling",
3922
+ "GB-WDU": "West Dunbartonshire",
3923
+ "GB-WLN": "West Lothian",
3924
+ "GB-BGW": "Blaenau Gwent",
3925
+ "GB-BGE": "Bridgend",
3926
+ "GB-CAY": "Caerphilly",
3927
+ "GB-CRF": "Cardiff",
3928
+ "GB-CMN": "Carmarthenshire",
3929
+ "GB-CGN": "Ceredigion",
3930
+ "GB-CWY": "Conwy",
3931
+ "GB-DEN": "Denbighshire",
3932
+ "GB-FLN": "Flintshire",
3933
+ "GB-GWN": "Gwynedd",
3934
+ "GB-AGY": "Isle of Anglesey",
3935
+ "GB-MTY": "Merthyr Tydfil",
3936
+ "GB-MON": "Monmouthshire",
3937
+ "GB-NTL": "Neath Port Talbot",
3938
+ "GB-NWP": "Newport",
3939
+ "GB-PEM": "Pembrokeshire",
3940
+ "GB-POW": "Powys",
3941
+ "GB-RCT": "Rhondda Cynon Taff",
3942
+ "GB-SWA": "Swansea",
3943
+ "GB-TOF": "Torfaen",
3944
+ "GB-VGL": "Vale of Glamorgan",
3945
+ "GB-WRX": "Wrexham"
3730
3946
  },
3731
3947
  "GG": {
3732
3948
  "GG-GR": "Guernsey"
@@ -3819,7 +4035,13 @@
3819
4035
  "US-WA": "Washington",
3820
4036
  "US-WV": "West Virginia",
3821
4037
  "US-WI": "Wisconsin",
3822
- "US-WY": "Wyoming"
4038
+ "US-WY": "Wyoming",
4039
+ "US-AS": "American Samoa",
4040
+ "US-GU": "Guam",
4041
+ "US-MP": "Northern Mariana Islands",
4042
+ "US-PR": "Puerto Rico",
4043
+ "US-UM": "United States Minor Outlying Islands",
4044
+ "US-VI": "Virgin Islands"
3823
4045
  },
3824
4046
  "VI": {
3825
4047
  "VI-SD": "Virgin Islands"
@@ -12,10 +12,13 @@ class RequestBehaviour
12
12
  def initialize
13
13
  # Environment identifier (live|test|sandbox)
14
14
  @env = nil
15
+
15
16
  # Transaction response messages language
16
17
  @lang = I18n.locale.to_s
18
+
17
19
  # SDK identifier type
18
20
  @from = "sdk-ruby"
21
+
19
22
  # SDK version
20
23
  @sdk_version = PixelpaySdk::VERSION
21
24
 
@@ -5,6 +5,7 @@ require "json"
5
5
  require "uri"
6
6
 
7
7
  require_relative "../base/Helpers"
8
+ require_relative "../base/RequestBehaviour"
8
9
  require_relative "../exceptions/InvalidCredentialsException"
9
10
  require_relative "../responses/ErrorResponse"
10
11
  require_relative "../responses/FailureResponse"
@@ -26,6 +27,7 @@ class ServiceBehaviour
26
27
  def initialize(settings)
27
28
  Helpers.verify_type(Settings, settings.instance_of?(Settings))
28
29
 
30
+ # Settings service model
29
31
  @settings = settings
30
32
  rescue StandardError => e
31
33
  warn("An exception occurred: #{e.message}")
@@ -86,6 +88,7 @@ class ServiceBehaviour
86
88
  response = FailureResponse.new
87
89
  response.success = false
88
90
  response.message = exception.to_s
91
+ response.set_status(520)
89
92
 
90
93
  response
91
94
  end
@@ -127,7 +130,7 @@ class ServiceBehaviour
127
130
 
128
131
  request["Accept"] = "application/json"
129
132
  request["Content-Type"] = "application/json"
130
- request["-Agent"] = "PixelPay HTTP/3 SDK Ruby"
133
+ request["User-Agent"] = "PixelPay HTTP/3 SDK Ruby"
131
134
  request["x-auth-key"] = @settings.auth_key
132
135
  request["x-auth-hash"] = @settings.auth_hash
133
136
 
@@ -8,16 +8,20 @@ require_relative "../responses/TimeoutResponse"
8
8
 
9
9
  # TransactionResult provides a specific structure for a response coming from a transaction.
10
10
  class TransactionResult
11
- attr_accessor :transaction_type, :transaction_approved_amount, :transaction_amount, :transaction_auth,
12
- :transaction_terminal, :transaction_merchant, :response_cvn, :response_avs, :response_cavv,
13
- :transaction_id, :transaction_reference, :transaction_time, :transaction_date, :response_approved,
14
- :response_incomplete, :response_code, :response_time, :response_reason, :payment_uuid, :payment_hash
11
+ attr_accessor :transaction_type, :transaction_redeemed_points, :transaction_approved_amount, :transaction_amount,
12
+ :transaction_auth, :transaction_terminal, :transaction_merchant, :response_cvn, :response_avs,
13
+ :response_cavv, :transaction_id, :transaction_reference, :transaction_time, :transaction_date,
14
+ :response_approved, :response_incomplete, :response_code, :response_time, :response_reason,
15
+ :installment_type, :installment_months, :payment_uuid, :payment_hash
15
16
 
16
17
  # Initialize enitity.
17
18
  def initialize
18
19
  # Transaction response type
19
20
  @transaction_type = nil
20
21
 
22
+ # Transaction redeemed points
23
+ @transaction_redeemed_points = nil
24
+
21
25
  # Approved amount on capture/sale
22
26
  @transaction_approved_amount = nil
23
27
 
@@ -69,6 +73,12 @@ class TransactionResult
69
73
  # Proccesor response message
70
74
  @response_reason = nil
71
75
 
76
+ # Transaction installment type
77
+ @installment_type = nil
78
+
79
+ # Transaction installment value
80
+ @installment_months = nil
81
+
72
82
  # Payment unique identifier
73
83
  @payment_uuid = nil
74
84
 
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative "../base/Helpers"
3
4
  require_relative "../resources/Environment"
4
5
  # Settings represents the settings information for a request.
5
6
  class Settings
@@ -63,8 +63,8 @@ class CardTokenization < RequestBehaviour
63
63
 
64
64
  @number = Helpers.trim_value(card.number)
65
65
  @cvv2 = card.cvv2
66
- @expire_month = format("%02d", card.expire_month)
67
- @expire_year = card.expire_year.to_s
66
+ @expire_month = format("%02d", card.expire_month) if card.expire_month != 0
67
+ @expire_year = card.expire_year.to_s if card.expire_year != 0
68
68
  @cardholder = Helpers.trim_value(card.cardholder)
69
69
  rescue StandardError => e
70
70
  warn("An exception occurred: #{e.message}")
@@ -21,18 +21,18 @@ class SaleTransaction < PaymentTransaction
21
21
  @points_redeem_amount = nil
22
22
  end
23
23
 
24
- # Set Installment service values to transaction
24
+ # Set Installment service values to transaction.
25
25
  # Args:
26
- # months (int): installment months
27
- # financing_type (str): installment type
28
- def set_installment(months, financing_type)
26
+ # months (int): installment months.
27
+ # installment_type (string): The installment type.
28
+ def set_installment(months, installment_type)
29
29
  @installment_months = months.to_s
30
- @installment_type = financing_type.to_s
30
+ @installment_type = installment_type.to_s
31
31
  end
32
32
 
33
- # Set transaction points redeem amount
33
+ # Set transaction points redeem amount.
34
34
  # Args:
35
- # amount (float): points redeem amount
35
+ # amount (float): points redeem amount.
36
36
  def with_points_redeem_amount(amount)
37
37
  @points_redeem_amount = Helpers.parse_amount(amount.to_f)
38
38
  end
@@ -3,6 +3,9 @@
3
3
  require_relative "../base/Helpers"
4
4
  require_relative "../base/ServiceBehaviour"
5
5
  require_relative "../request/StatusTransaction"
6
+ require_relative "../request/AuthTransaction"
7
+ require_relative "../request/CaptureTransaction"
8
+ require_relative "../request/VoidTransaction"
6
9
  require_relative "../exceptions/InvalidTransactionTypeException"
7
10
 
8
11
  # Transaction provides a specific structure for a transaction to be performed.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PixelpaySdk
4
- VERSION = "1.0.0-beta.3"
4
+ VERSION = "1.0.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pixelpay_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.beta.3
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sonia Villeda
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-06-16 00:00:00.000000000 Z
12
+ date: 2024-03-05 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email:
@@ -86,9 +86,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
86
86
  version: 2.6.0
87
87
  required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - ">"
89
+ - - ">="
90
90
  - !ruby/object:Gem::Version
91
- version: 1.3.1
91
+ version: '0'
92
92
  requirements: []
93
93
  rubygems_version: 3.1.6
94
94
  signing_key: