Merge branch 'develop' into trunk
This commit is contained in:
commit
1d75bcd18a
21 changed files with 1179 additions and 347 deletions
|
|
@ -8,15 +8,15 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
* Liste de Pays
|
||||
* @source https://datahub.io/core/country-list Data Hub country list
|
||||
* @method static self afghanistan()
|
||||
* @method static self aland-islands()
|
||||
* @method static self alandIslands()
|
||||
* @method static self albania()
|
||||
* @method static self algeria()
|
||||
* @method static self american-samoa()
|
||||
* @method static self americanSamoa()
|
||||
* @method static self andorra()
|
||||
* @method static self angola()
|
||||
* @method static self anguilla()
|
||||
* @method static self antarctica()
|
||||
* @method static self antigua-and-barbuda()
|
||||
* @method static self antiguaAndBarbuda()
|
||||
* @method static self argentina()
|
||||
* @method static self armenia()
|
||||
* @method static self aruba()
|
||||
|
|
@ -33,59 +33,59 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
* @method static self benin()
|
||||
* @method static self bermuda()
|
||||
* @method static self bhutan()
|
||||
* @method static self bolivia-plurinational-state-of()
|
||||
* @method static self bonaire-sint-eustatius-and-saba()
|
||||
* @method static self bosnia-and-herzegovina()
|
||||
* @method static self boliviaPlurinationalStateOf()
|
||||
* @method static self bonaireSintEustatiusAndSaba()
|
||||
* @method static self bosniaAndHerzegovina()
|
||||
* @method static self botswana()
|
||||
* @method static self bouvet-island()
|
||||
* @method static self bouvetIsland()
|
||||
* @method static self brazil()
|
||||
* @method static self british-indian-ocean-territory()
|
||||
* @method static self brunei-darussalam()
|
||||
* @method static self britishIndianOceanTerritory()
|
||||
* @method static self bruneiDarussalam()
|
||||
* @method static self bulgaria()
|
||||
* @method static self burkina-faso()
|
||||
* @method static self burkinaFaso()
|
||||
* @method static self burundi()
|
||||
* @method static self cambodia()
|
||||
* @method static self cameroon()
|
||||
* @method static self canada()
|
||||
* @method static self cape-verde()
|
||||
* @method static self cayman-islands()
|
||||
* @method static self central-african-republic()
|
||||
* @method static self capeVerde()
|
||||
* @method static self caymanIslands()
|
||||
* @method static self centralAfricanRepublic()
|
||||
* @method static self chad()
|
||||
* @method static self chile()
|
||||
* @method static self china()
|
||||
* @method static self christmas-island()
|
||||
* @method static self cocos-keeling-islands()
|
||||
* @method static self christmasIsland()
|
||||
* @method static self cocosKeelingIslands()
|
||||
* @method static self colombia()
|
||||
* @method static self comoros()
|
||||
* @method static self congo()
|
||||
* @method static self congo-the-democratic-republic-of-the()
|
||||
* @method static self cook-islands()
|
||||
* @method static self costa-rica()
|
||||
* @method static self cote-divoire()
|
||||
* @method static self congoTheDemocraticRepublicOfThe()
|
||||
* @method static self cookIslands()
|
||||
* @method static self costaRica()
|
||||
* @method static self coteDivoire()
|
||||
* @method static self croatia()
|
||||
* @method static self cuba()
|
||||
* @method static self curacao()
|
||||
* @method static self cyprus()
|
||||
* @method static self czech-republic()
|
||||
* @method static self czechRepublic()
|
||||
* @method static self denmark()
|
||||
* @method static self djibouti()
|
||||
* @method static self dominica()
|
||||
* @method static self dominican-republic()
|
||||
* @method static self dominicanRepublic()
|
||||
* @method static self ecuador()
|
||||
* @method static self egypt()
|
||||
* @method static self el-salvador()
|
||||
* @method static self equatorial-guinea()
|
||||
* @method static self elSalvador()
|
||||
* @method static self equatorialGuinea()
|
||||
* @method static self eritrea()
|
||||
* @method static self estonia()
|
||||
* @method static self ethiopia()
|
||||
* @method static self falkland-islands-malvinas()
|
||||
* @method static self faroe-islands()
|
||||
* @method static self falklandIslandsMalvinas()
|
||||
* @method static self faroeIslands()
|
||||
* @method static self fiji()
|
||||
* @method static self finland()
|
||||
* @method static self france()
|
||||
* @method static self french-guiana()
|
||||
* @method static self french-polynesia()
|
||||
* @method static self french-southern-territories()
|
||||
* @method static self frenchGuiana()
|
||||
* @method static self frenchPolynesia()
|
||||
* @method static self frenchSouthernTerritories()
|
||||
* @method static self gabon()
|
||||
* @method static self gambia()
|
||||
* @method static self georgia()
|
||||
|
|
@ -100,21 +100,21 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
* @method static self guatemala()
|
||||
* @method static self guernsey()
|
||||
* @method static self guinea()
|
||||
* @method static self guinea-bissau()
|
||||
* @method static self guineaBissau()
|
||||
* @method static self guyana()
|
||||
* @method static self haiti()
|
||||
* @method static self heard-island-and-mcdonald-islands()
|
||||
* @method static self holy-see-vatican-city-state()
|
||||
* @method static self heardIslandAndMcdonaldIslands()
|
||||
* @method static self holySeeVaticanCityState()
|
||||
* @method static self honduras()
|
||||
* @method static self hong-kong()
|
||||
* @method static self hongKong()
|
||||
* @method static self hungary()
|
||||
* @method static self iceland()
|
||||
* @method static self india()
|
||||
* @method static self indonesia()
|
||||
* @method static self iran-islamic-republic-of()
|
||||
* @method static self iranIslamicRepublicOf()
|
||||
* @method static self iraq()
|
||||
* @method static self ireland()
|
||||
* @method static self isle-of-man()
|
||||
* @method static self isleOfMan()
|
||||
* @method static self israel()
|
||||
* @method static self italy()
|
||||
* @method static self jamaica()
|
||||
|
|
@ -124,11 +124,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
* @method static self kazakhstan()
|
||||
* @method static self kenya()
|
||||
* @method static self kiribati()
|
||||
* @method static self korea-democratic-peoples-republic-of()
|
||||
* @method static self korea-republic-of()
|
||||
* @method static self koreaDemocraticPeoplesRepublicOf()
|
||||
* @method static self koreaRepublicOf()
|
||||
* @method static self kuwait()
|
||||
* @method static self kyrgyzstan()
|
||||
* @method static self lao-peoples-democratic-republic()
|
||||
* @method static self laoPeoplesDemocraticRepublic()
|
||||
* @method static self latvia()
|
||||
* @method static self lebanon()
|
||||
* @method static self lesotho()
|
||||
|
|
@ -138,21 +138,21 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
* @method static self lithuania()
|
||||
* @method static self luxembourg()
|
||||
* @method static self macao()
|
||||
* @method static self macedonia-the-former-yugoslav-republic-of()
|
||||
* @method static self macedoniaTheFormerYugoslavRepublicOf()
|
||||
* @method static self madagascar()
|
||||
* @method static self malawi()
|
||||
* @method static self malaysia()
|
||||
* @method static self maldives()
|
||||
* @method static self mali()
|
||||
* @method static self malta()
|
||||
* @method static self marshall-islands()
|
||||
* @method static self marshallIslands()
|
||||
* @method static self martinique()
|
||||
* @method static self mauritania()
|
||||
* @method static self mauritius()
|
||||
* @method static self mayotte()
|
||||
* @method static self mexico()
|
||||
* @method static self micronesia-federated-states-of()
|
||||
* @method static self moldova-republic-of()
|
||||
* @method static self micronesiaFederatedStatesOf()
|
||||
* @method static self moldovaRepublicOf()
|
||||
* @method static self monaco()
|
||||
* @method static self mongolia()
|
||||
* @method static self montenegro()
|
||||
|
|
@ -164,95 +164,95 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
* @method static self nauru()
|
||||
* @method static self nepal()
|
||||
* @method static self netherlands()
|
||||
* @method static self new-caledonia()
|
||||
* @method static self new-zealand()
|
||||
* @method static self newCaledonia()
|
||||
* @method static self newZealand()
|
||||
* @method static self nicaragua()
|
||||
* @method static self niger()
|
||||
* @method static self nigeria()
|
||||
* @method static self niue()
|
||||
* @method static self norfolk-island()
|
||||
* @method static self northern-mariana-islands()
|
||||
* @method static self norfolkIsland()
|
||||
* @method static self northernMarianaIslands()
|
||||
* @method static self norway()
|
||||
* @method static self oman()
|
||||
* @method static self pakistan()
|
||||
* @method static self palau()
|
||||
* @method static self palestine-state-of()
|
||||
* @method static self palestineStateOf()
|
||||
* @method static self panama()
|
||||
* @method static self papua-new-guinea()
|
||||
* @method static self papuaNewGuinea()
|
||||
* @method static self paraguay()
|
||||
* @method static self peru()
|
||||
* @method static self philippines()
|
||||
* @method static self pitcairn()
|
||||
* @method static self poland()
|
||||
* @method static self portugal()
|
||||
* @method static self puerto-rico()
|
||||
* @method static self puertoRico()
|
||||
* @method static self qatar()
|
||||
* @method static self reunion()
|
||||
* @method static self romania()
|
||||
* @method static self russian-federation()
|
||||
* @method static self russianFederation()
|
||||
* @method static self rwanda()
|
||||
* @method static self saint-barthelemy()
|
||||
* @method static self saint-helena-ascension-and-tristan-da-cunha()
|
||||
* @method static self saint-kitts-and-nevis()
|
||||
* @method static self saint-lucia()
|
||||
* @method static self saint-martin-french-part()
|
||||
* @method static self saint-pierre-and-miquelon()
|
||||
* @method static self saint-vincent-and-the-grenadines()
|
||||
* @method static self saintBarthelemy()
|
||||
* @method static self saintHelenaAscensionAndTristanDaCunha()
|
||||
* @method static self saintKittsAndNevis()
|
||||
* @method static self saintLucia()
|
||||
* @method static self saintMartinFrenchPart()
|
||||
* @method static self saintPierreAndMiquelon()
|
||||
* @method static self saintVincentAndTheGrenadines()
|
||||
* @method static self samoa()
|
||||
* @method static self san-marino()
|
||||
* @method static self sao-tome-and-principe()
|
||||
* @method static self saudi-arabia()
|
||||
* @method static self sanMarino()
|
||||
* @method static self saoTomeAndPrincipe()
|
||||
* @method static self saudiArabia()
|
||||
* @method static self senegal()
|
||||
* @method static self serbia()
|
||||
* @method static self seychelles()
|
||||
* @method static self sierra-leone()
|
||||
* @method static self sierraLeone()
|
||||
* @method static self singapore()
|
||||
* @method static self sint-maarten-dutch-part()
|
||||
* @method static self sintMaartenDutchPart()
|
||||
* @method static self slovakia()
|
||||
* @method static self slovenia()
|
||||
* @method static self solomon-islands()
|
||||
* @method static self solomonIslands()
|
||||
* @method static self somalia()
|
||||
* @method static self south-africa()
|
||||
* @method static self south-georgia-and-the-south-sandwich-islands()
|
||||
* @method static self south-sudan()
|
||||
* @method static self southAfrica()
|
||||
* @method static self southGeorgiaAndTheSouthSandwichIslands()
|
||||
* @method static self southSudan()
|
||||
* @method static self spain()
|
||||
* @method static self sri-lanka()
|
||||
* @method static self sriLanka()
|
||||
* @method static self sudan()
|
||||
* @method static self suriname()
|
||||
* @method static self svalbard-and-jan-mayen()
|
||||
* @method static self svalbardAndJanMayen()
|
||||
* @method static self swaziland()
|
||||
* @method static self sweden()
|
||||
* @method static self switzerland()
|
||||
* @method static self syrian-arab-republic()
|
||||
* @method static self taiwan-province-of-china()
|
||||
* @method static self syrianArabRepublic()
|
||||
* @method static self taiwanProvinceOfChina()
|
||||
* @method static self tajikistan()
|
||||
* @method static self tanzania-united-republic-of()
|
||||
* @method static self tanzaniaUnitedRepublicOf()
|
||||
* @method static self thailand()
|
||||
* @method static self timor-leste()
|
||||
* @method static self timorLeste()
|
||||
* @method static self togo()
|
||||
* @method static self tokelau()
|
||||
* @method static self tonga()
|
||||
* @method static self trinidad-and-tobago()
|
||||
* @method static self trinidadAndTobago()
|
||||
* @method static self tunisia()
|
||||
* @method static self turkey()
|
||||
* @method static self turkmenistan()
|
||||
* @method static self turks-and-caicos-islands()
|
||||
* @method static self turksAndCaicosIslands()
|
||||
* @method static self tuvalu()
|
||||
* @method static self uganda()
|
||||
* @method static self ukraine()
|
||||
* @method static self united-arab-emirates()
|
||||
* @method static self united-kingdom()
|
||||
* @method static self united-states()
|
||||
* @method static self united-states-minor-outlying-islands()
|
||||
* @method static self unitedArabEmirates()
|
||||
* @method static self unitedKingdom()
|
||||
* @method static self unitedStates()
|
||||
* @method static self unitedStatesMinorOutlyingIslands()
|
||||
* @method static self uruguay()
|
||||
* @method static self uzbekistan()
|
||||
* @method static self vanuatu()
|
||||
* @method static self venezuela-bolivarian-republic-of()
|
||||
* @method static self viet-nam()
|
||||
* @method static self virgin-islands-british()
|
||||
* @method static self virgin-islands-us()
|
||||
* @method static self wallis-and-futuna()
|
||||
* @method static self western-sahara()
|
||||
* @method static self venezuelaBolivarianRepublicOf()
|
||||
* @method static self vietNam()
|
||||
* @method static self virginIslandsBritish()
|
||||
* @method static self virginIslandsUs()
|
||||
* @method static self wallisAndFutuna()
|
||||
* @method static self westernSahara()
|
||||
* @method static self yemen()
|
||||
* @method static self zambia()
|
||||
* @method static self zimbabwe()
|
||||
|
|
@ -266,15 +266,15 @@ class Country extends BaseEnumRoutable
|
|||
{
|
||||
return [
|
||||
'afghanistan' => 1,
|
||||
'aland-islands' => 2,
|
||||
'alandIslands' => 2,
|
||||
'albania' => 3,
|
||||
'algeria' => 4,
|
||||
'american-samoa' => 5,
|
||||
'americanSamoa' => 5,
|
||||
'andorra' => 6,
|
||||
'angola' => 7,
|
||||
'anguilla' => 8,
|
||||
'antarctica' => 9,
|
||||
'antigua-and-barbuda' => 10,
|
||||
'antiguaAndBarbuda' => 10,
|
||||
'argentina' => 11,
|
||||
'armenia' => 12,
|
||||
'aruba' => 13,
|
||||
|
|
@ -291,59 +291,59 @@ class Country extends BaseEnumRoutable
|
|||
'benin' => 24,
|
||||
'bermuda' => 25,
|
||||
'bhutan' => 26,
|
||||
'bolivia-plurinational-state-of' => 27,
|
||||
'bonaire-sint-eustatius-and-saba' => 28,
|
||||
'bosnia-and-herzegovina' => 29,
|
||||
'boliviaPlurinationalStateOf' => 27,
|
||||
'bonaireSintEustatiusAndSaba' => 28,
|
||||
'bosniaAndHerzegovina' => 29,
|
||||
'botswana' => 30,
|
||||
'bouvet-island' => 31,
|
||||
'bouvetIsland' => 31,
|
||||
'brazil' => 32,
|
||||
'british-indian-ocean-territory' => 33,
|
||||
'brunei-darussalam' => 34,
|
||||
'britishIndianOceanTerritory' => 33,
|
||||
'bruneiDarussalam' => 34,
|
||||
'bulgaria' => 35,
|
||||
'burkina-faso' => 36,
|
||||
'burkinaFaso' => 36,
|
||||
'burundi' => 37,
|
||||
'cambodia' => 38,
|
||||
'cameroon' => 39,
|
||||
'canada' => 40,
|
||||
'cape-verde' => 41,
|
||||
'cayman-islands' => 42,
|
||||
'central-african-republic' => 43,
|
||||
'capeVerde' => 41,
|
||||
'caymanIslands' => 42,
|
||||
'centralAfricanRepublic' => 43,
|
||||
'chad' => 44,
|
||||
'chile' => 45,
|
||||
'china' => 46,
|
||||
'christmas-island' => 47,
|
||||
'cocos-keeling-islands' => 48,
|
||||
'christmasIsland' => 47,
|
||||
'cocosKeelingIslands' => 48,
|
||||
'colombia' => 49,
|
||||
'comoros' => 50,
|
||||
'congo' => 51,
|
||||
'congo-the-democratic-republic-of-the' => 52,
|
||||
'cook-islands' => 53,
|
||||
'costa-rica' => 54,
|
||||
'cote-divoire' => 55,
|
||||
'congoTheDemocraticRepublicOfThe' => 52,
|
||||
'cookIslands' => 53,
|
||||
'costaRica' => 54,
|
||||
'coteDivoire' => 55,
|
||||
'croatia' => 56,
|
||||
'cuba' => 57,
|
||||
'curacao' => 58,
|
||||
'cyprus' => 59,
|
||||
'czech-republic' => 60,
|
||||
'czechRepublic' => 60,
|
||||
'denmark' => 61,
|
||||
'djibouti' => 62,
|
||||
'dominica' => 63,
|
||||
'dominican-republic' => 64,
|
||||
'dominicanRepublic' => 64,
|
||||
'ecuador' => 65,
|
||||
'egypt' => 66,
|
||||
'el-salvador' => 67,
|
||||
'equatorial-guinea' => 68,
|
||||
'elSalvador' => 67,
|
||||
'equatorialGuinea' => 68,
|
||||
'eritrea' => 69,
|
||||
'estonia' => 70,
|
||||
'ethiopia' => 71,
|
||||
'falkland-islands-malvinas' => 72,
|
||||
'faroe-islands' => 73,
|
||||
'falklandIslandsMalvinas' => 72,
|
||||
'faroeIslands' => 73,
|
||||
'fiji' => 74,
|
||||
'finland' => 75,
|
||||
'france' => 76,
|
||||
'french-guiana' => 77,
|
||||
'french-polynesia' => 78,
|
||||
'french-southern-territories' => 79,
|
||||
'frenchGuiana' => 77,
|
||||
'frenchPolynesia' => 78,
|
||||
'frenchSouthernTerritories' => 79,
|
||||
'gabon' => 80,
|
||||
'gambia' => 81,
|
||||
'georgia' => 82,
|
||||
|
|
@ -358,21 +358,21 @@ class Country extends BaseEnumRoutable
|
|||
'guatemala' => 91,
|
||||
'guernsey' => 92,
|
||||
'guinea' => 93,
|
||||
'guinea-bissau' => 94,
|
||||
'guineaBissau' => 94,
|
||||
'guyana' => 95,
|
||||
'haiti' => 96,
|
||||
'heard-island-and-mcdonald-islands' => 97,
|
||||
'holy-see-vatican-city-state' => 98,
|
||||
'heardIslandAndMcdonaldIslands' => 97,
|
||||
'holySeeVaticanCityState' => 98,
|
||||
'honduras' => 99,
|
||||
'hong-kong' => 100,
|
||||
'hongKong' => 100,
|
||||
'hungary' => 101,
|
||||
'iceland' => 102,
|
||||
'india' => 103,
|
||||
'indonesia' => 104,
|
||||
'iran-islamic-republic-of' => 105,
|
||||
'iranIslamicRepublicOf' => 105,
|
||||
'iraq' => 106,
|
||||
'ireland' => 107,
|
||||
'isle-of-man' => 108,
|
||||
'isleOfMan' => 108,
|
||||
'israel' => 109,
|
||||
'italy' => 110,
|
||||
'jamaica' => 111,
|
||||
|
|
@ -382,11 +382,11 @@ class Country extends BaseEnumRoutable
|
|||
'kazakhstan' => 115,
|
||||
'kenya' => 116,
|
||||
'kiribati' => 117,
|
||||
'korea-democratic-peoples-republic-of' => 118,
|
||||
'korea-republic-of' => 119,
|
||||
'koreaDemocraticPeoplesRepublicOf' => 118,
|
||||
'koreaRepublicOf' => 119,
|
||||
'kuwait' => 120,
|
||||
'kyrgyzstan' => 121,
|
||||
'lao-peoples-democratic-republic' => 122,
|
||||
'laoPeoplesDemocraticRepublic' => 122,
|
||||
'latvia' => 123,
|
||||
'lebanon' => 124,
|
||||
'lesotho' => 125,
|
||||
|
|
@ -396,21 +396,21 @@ class Country extends BaseEnumRoutable
|
|||
'lithuania' => 129,
|
||||
'luxembourg' => 130,
|
||||
'macao' => 131,
|
||||
'macedonia-the-former-yugoslav-republic-of' => 132,
|
||||
'macedoniaTheFormerYugoslavRepublicOf' => 132,
|
||||
'madagascar' => 133,
|
||||
'malawi' => 134,
|
||||
'malaysia' => 135,
|
||||
'maldives' => 136,
|
||||
'mali' => 137,
|
||||
'malta' => 138,
|
||||
'marshall-islands' => 139,
|
||||
'marshallIslands' => 139,
|
||||
'martinique' => 140,
|
||||
'mauritania' => 141,
|
||||
'mauritius' => 142,
|
||||
'mayotte' => 143,
|
||||
'mexico' => 144,
|
||||
'micronesia-federated-states-of' => 145,
|
||||
'moldova-republic-of' => 146,
|
||||
'micronesiaFederatedStatesOf' => 145,
|
||||
'moldovaRepublicOf' => 146,
|
||||
'monaco' => 147,
|
||||
'mongolia' => 148,
|
||||
'montenegro' => 149,
|
||||
|
|
@ -422,95 +422,95 @@ class Country extends BaseEnumRoutable
|
|||
'nauru' => 155,
|
||||
'nepal' => 156,
|
||||
'netherlands' => 157,
|
||||
'new-caledonia' => 158,
|
||||
'new-zealand' => 159,
|
||||
'newCaledonia' => 158,
|
||||
'newZealand' => 159,
|
||||
'nicaragua' => 160,
|
||||
'niger' => 161,
|
||||
'nigeria' => 162,
|
||||
'niue' => 163,
|
||||
'norfolk-island' => 164,
|
||||
'northern-mariana-islands' => 165,
|
||||
'norfolkIsland' => 164,
|
||||
'northernMarianaIslands' => 165,
|
||||
'norway' => 166,
|
||||
'oman' => 167,
|
||||
'pakistan' => 168,
|
||||
'palau' => 169,
|
||||
'palestine-state-of' => 170,
|
||||
'palestineStateOf' => 170,
|
||||
'panama' => 171,
|
||||
'papua-new-guinea' => 172,
|
||||
'papuaNewGuinea' => 172,
|
||||
'paraguay' => 173,
|
||||
'peru' => 174,
|
||||
'philippines' => 175,
|
||||
'pitcairn' => 176,
|
||||
'poland' => 177,
|
||||
'portugal' => 178,
|
||||
'puerto-rico' => 179,
|
||||
'puertoRico' => 179,
|
||||
'qatar' => 180,
|
||||
'reunion' => 181,
|
||||
'romania' => 182,
|
||||
'russian-federation' => 183,
|
||||
'russianFederation' => 183,
|
||||
'rwanda' => 184,
|
||||
'saint-barthelemy' => 185,
|
||||
'saint-helena-ascension-and-tristan-da-cunha' => 186,
|
||||
'saint-kitts-and-nevis' => 187,
|
||||
'saint-lucia' => 188,
|
||||
'saint-martin-french-part' => 189,
|
||||
'saint-pierre-and-miquelon' => 190,
|
||||
'saint-vincent-and-the-grenadines' => 191,
|
||||
'saintBarthelemy' => 185,
|
||||
'saintHelenaAscensionAndTristanDaCunha' => 186,
|
||||
'saintKittsAndNevis' => 187,
|
||||
'saintLucia' => 188,
|
||||
'saintMartinFrenchPart' => 189,
|
||||
'saintPierreAndMiquelon' => 190,
|
||||
'saintVincentAndTheGrenadines' => 191,
|
||||
'samoa' => 192,
|
||||
'san-marino' => 193,
|
||||
'sao-tome-and-principe' => 194,
|
||||
'saudi-arabia' => 195,
|
||||
'sanMarino' => 193,
|
||||
'saoTomeAndPrincipe' => 194,
|
||||
'saudiArabia' => 195,
|
||||
'senegal' => 196,
|
||||
'serbia' => 197,
|
||||
'seychelles' => 198,
|
||||
'sierra-leone' => 199,
|
||||
'sierraLeone' => 199,
|
||||
'singapore' => 200,
|
||||
'sint-maarten-dutch-part' => 201,
|
||||
'sintMaartenDutchPart' => 201,
|
||||
'slovakia' => 202,
|
||||
'slovenia' => 203,
|
||||
'solomon-islands' => 204,
|
||||
'solomonIslands' => 204,
|
||||
'somalia' => 205,
|
||||
'south-africa' => 206,
|
||||
'south-georgia-and-the-south-sandwich-islands' => 207,
|
||||
'south-sudan' => 208,
|
||||
'southAfrica' => 206,
|
||||
'southGeorgiaAndTheSouthSandwichIslands' => 207,
|
||||
'southSudan' => 208,
|
||||
'spain' => 209,
|
||||
'sri-lanka' => 210,
|
||||
'sriLanka' => 210,
|
||||
'sudan' => 211,
|
||||
'suriname' => 212,
|
||||
'svalbard-and-jan-mayen' => 213,
|
||||
'svalbardAndJanMayen' => 213,
|
||||
'swaziland' => 214,
|
||||
'sweden' => 215,
|
||||
'switzerland' => 216,
|
||||
'syrian-arab-republic' => 217,
|
||||
'taiwan-province-of-china' => 218,
|
||||
'syrianArabRepublic' => 217,
|
||||
'taiwanProvinceOfChina' => 218,
|
||||
'tajikistan' => 219,
|
||||
'tanzania-united-republic-of' => 220,
|
||||
'tanzaniaUnitedRepublicOf' => 220,
|
||||
'thailand' => 221,
|
||||
'timor-leste' => 222,
|
||||
'timorLeste' => 222,
|
||||
'togo' => 223,
|
||||
'tokelau' => 224,
|
||||
'tonga' => 225,
|
||||
'trinidad-and-tobago' => 226,
|
||||
'trinidadAndTobago' => 226,
|
||||
'tunisia' => 227,
|
||||
'turkey' => 228,
|
||||
'turkmenistan' => 229,
|
||||
'turks-and-caicos-islands' => 230,
|
||||
'turksAndCaicosIslands' => 230,
|
||||
'tuvalu' => 231,
|
||||
'uganda' => 232,
|
||||
'ukraine' => 233,
|
||||
'united-arab-emirates' => 234,
|
||||
'united-kingdom' => 235,
|
||||
'united-states' => 236,
|
||||
'united-states-minor-outlying-islands' => 237,
|
||||
'unitedArabEmirates' => 234,
|
||||
'unitedKingdom' => 235,
|
||||
'unitedStates' => 236,
|
||||
'unitedStatesMinorOutlyingIslands' => 237,
|
||||
'uruguay' => 238,
|
||||
'uzbekistan' => 239,
|
||||
'vanuatu' => 240,
|
||||
'venezuela-bolivarian-republic-of' => 241,
|
||||
'viet-nam' => 242,
|
||||
'virgin-islands-british' => 243,
|
||||
'virgin-islands-us' => 244,
|
||||
'wallis-and-futuna' => 245,
|
||||
'western-sahara' => 246,
|
||||
'venezuelaBolivarianRepublicOf' => 241,
|
||||
'vietNam' => 242,
|
||||
'virginIslandsBritish' => 243,
|
||||
'virginIslandsUs' => 244,
|
||||
'wallisAndFutuna' => 245,
|
||||
'westernSahara' => 246,
|
||||
'yemen' => 247,
|
||||
'zambia' => 248,
|
||||
'zimbabwe' => 249
|
||||
|
|
@ -521,15 +521,15 @@ class Country extends BaseEnumRoutable
|
|||
{
|
||||
return [
|
||||
'afghanistan' => 'Afghanistan',
|
||||
'aland-islands' => 'Åland Islands',
|
||||
'alandIslands' => 'Åland Islands',
|
||||
'albania' => 'Albania',
|
||||
'algeria' => 'Algeria',
|
||||
'american-samoa' => 'American Samoa',
|
||||
'americanSamoa' => 'American Samoa',
|
||||
'andorra' => 'Andorra',
|
||||
'angola' => 'Angola',
|
||||
'anguilla' => 'Anguilla',
|
||||
'antarctica' => 'Antarctica',
|
||||
'antigua-and-barbuda' => 'Antigua and Barbuda',
|
||||
'antiguaAndBarbuda' => 'Antigua and Barbuda',
|
||||
'argentina' => 'Argentina',
|
||||
'armenia' => 'Armenia',
|
||||
'aruba' => 'Aruba',
|
||||
|
|
@ -546,59 +546,59 @@ class Country extends BaseEnumRoutable
|
|||
'benin' => 'Benin',
|
||||
'bermuda' => 'Bermuda',
|
||||
'bhutan' => 'Bhutan',
|
||||
'bolivia-plurinational-state-of' => 'Bolivia, Plurinational State of',
|
||||
'bonaire-sint-eustatius-and-saba' => 'Bonaire, Sint Eustatius and Saba',
|
||||
'bosnia-and-herzegovina' => 'Bosnia and Herzegovina',
|
||||
'boliviaPlurinationalStateOf' => 'Bolivia, Plurinational State of',
|
||||
'bonaireSintEustatiusAndSaba' => 'Bonaire, Sint Eustatius and Saba',
|
||||
'bosniaAndHerzegovina' => 'Bosnia and Herzegovina',
|
||||
'botswana' => 'Botswana',
|
||||
'bouvet-island' => 'Bouvet Island',
|
||||
'bouvetIsland' => 'Bouvet Island',
|
||||
'brazil' => 'Brazil',
|
||||
'british-indian-ocean-territory' => 'British Indian Ocean Territory',
|
||||
'brunei-darussalam' => 'Brunei Darussalam',
|
||||
'britishIndianOceanTerritory' => 'British Indian Ocean Territory',
|
||||
'bruneiDarussalam' => 'Brunei Darussalam',
|
||||
'bulgaria' => 'Bulgaria',
|
||||
'burkina-faso' => 'Burkina Faso',
|
||||
'burkinaFaso' => 'Burkina Faso',
|
||||
'burundi' => 'Burundi',
|
||||
'cambodia' => 'Cambodia',
|
||||
'cameroon' => 'Cameroon',
|
||||
'canada' => 'Canada',
|
||||
'cape-verde' => 'Cape Verde',
|
||||
'cayman-islands' => 'Cayman Islands',
|
||||
'central-african-republic' => 'Central African Republic',
|
||||
'capeVerde' => 'Cape Verde',
|
||||
'caymanIslands' => 'Cayman Islands',
|
||||
'centralAfricanRepublic' => 'Central African Republic',
|
||||
'chad' => 'Chad',
|
||||
'chile' => 'Chile',
|
||||
'china' => 'China',
|
||||
'christmas-island' => 'Christmas Island',
|
||||
'cocos-keeling-islands' => 'Cocos (Keeling) Islands',
|
||||
'christmasIsland' => 'Christmas Island',
|
||||
'cocosKeelingIslands' => 'Cocos (Keeling) Islands',
|
||||
'colombia' => 'Colombia',
|
||||
'comoros' => 'Comoros',
|
||||
'congo' => 'Congo',
|
||||
'congo-the-democratic-republic-of-the' => 'Congo, the Democratic Republic of the',
|
||||
'cook-islands' => 'Cook Islands',
|
||||
'costa-rica' => 'Costa Rica',
|
||||
'cote-divoire' => 'Côte d\'Ivoire',
|
||||
'congoTheDemocraticRepublicOfThe' => 'Congo, the Democratic Republic of the',
|
||||
'cookIslands' => 'Cook Islands',
|
||||
'costaRica' => 'Costa Rica',
|
||||
'coteDivoire' => 'Côte d\'Ivoire',
|
||||
'croatia' => 'Croatia',
|
||||
'cuba' => 'Cuba',
|
||||
'curacao' => 'Curaçao',
|
||||
'cyprus' => 'Cyprus',
|
||||
'czech-republic' => 'Czech Republic',
|
||||
'czechRepublic' => 'Czech Republic',
|
||||
'denmark' => 'Denmark',
|
||||
'djibouti' => 'Djibouti',
|
||||
'dominica' => 'Dominica',
|
||||
'dominican-republic' => 'Dominican Republic',
|
||||
'dominicanRepublic' => 'Dominican Republic',
|
||||
'ecuador' => 'Ecuador',
|
||||
'egypt' => 'Egypt',
|
||||
'el-salvador' => 'El Salvador',
|
||||
'equatorial-guinea' => 'Equatorial Guinea',
|
||||
'elSalvador' => 'El Salvador',
|
||||
'equatorialGuinea' => 'Equatorial Guinea',
|
||||
'eritrea' => 'Eritrea',
|
||||
'estonia' => 'Estonia',
|
||||
'ethiopia' => 'Ethiopia',
|
||||
'falkland-islands-malvinas' => 'Falkland Islands (Malvinas)',
|
||||
'faroe-islands' => 'Faroe Islands',
|
||||
'falklandIslandsMalvinas' => 'Falkland Islands (Malvinas)',
|
||||
'faroeIslands' => 'Faroe Islands',
|
||||
'fiji' => 'Fiji',
|
||||
'finland' => 'Finland',
|
||||
'france' => 'France',
|
||||
'french-guiana' => 'French Guiana',
|
||||
'french-polynesia' => 'French Polynesia',
|
||||
'french-southern-territories' => 'French Southern Territories',
|
||||
'frenchGuiana' => 'French Guiana',
|
||||
'frenchPolynesia' => 'French Polynesia',
|
||||
'frenchSouthernTerritories' => 'French Southern Territories',
|
||||
'gabon' => 'Gabon',
|
||||
'gambia' => 'Gambia',
|
||||
'georgia' => 'Georgia',
|
||||
|
|
@ -613,21 +613,21 @@ class Country extends BaseEnumRoutable
|
|||
'guatemala' => 'Guatemala',
|
||||
'guernsey' => 'Guernsey',
|
||||
'guinea' => 'Guinea',
|
||||
'guinea-bissau' => 'Guinea-Bissau',
|
||||
'guineaBissau' => 'GuineaBissau',
|
||||
'guyana' => 'Guyana',
|
||||
'haiti' => 'Haiti',
|
||||
'heard-island-and-mcdonald-islands' => 'Heard Island and McDonald Islands',
|
||||
'holy-see-vatican-city-state' => 'Holy See (Vatican City State)',
|
||||
'heardIslandAndMcdonaldIslands' => 'Heard Island and McDonald Islands',
|
||||
'holySeeVaticanCityState' => 'Holy See (Vatican City State)',
|
||||
'honduras' => 'Honduras',
|
||||
'hong-kong' => 'Hong Kong',
|
||||
'hongKong' => 'Hong Kong',
|
||||
'hungary' => 'Hungary',
|
||||
'iceland' => 'Iceland',
|
||||
'india' => 'India',
|
||||
'indonesia' => 'Indonesia',
|
||||
'iran-islamic-republic-of' => 'Iran, Islamic Republic of',
|
||||
'iranIslamicRepublicOf' => 'Iran, Islamic Republic of',
|
||||
'iraq' => 'Iraq',
|
||||
'ireland' => 'Ireland',
|
||||
'isle-of-man' => 'Isle of Man',
|
||||
'isleOfMan' => 'Isle of Man',
|
||||
'israel' => 'Israel',
|
||||
'italy' => 'Italy',
|
||||
'jamaica' => 'Jamaica',
|
||||
|
|
@ -637,11 +637,11 @@ class Country extends BaseEnumRoutable
|
|||
'kazakhstan' => 'Kazakhstan',
|
||||
'kenya' => 'Kenya',
|
||||
'kiribati' => 'Kiribati',
|
||||
'korea-democratic-peoples-republic-of' => 'Korea, Democratic People\'s Republic of',
|
||||
'korea-republic-of' => 'Korea, Republic of',
|
||||
'koreaDemocraticPeoplesRepublicOf' => 'Korea, Democratic People\'s Republic of',
|
||||
'koreaRepublicOf' => 'Korea, Republic of',
|
||||
'kuwait' => 'Kuwait',
|
||||
'kyrgyzstan' => 'Kyrgyzstan',
|
||||
'lao-peoples-democratic-republic' => 'Lao People\'s Democratic Republic',
|
||||
'laoPeoplesDemocraticRepublic' => 'Lao People\'s Democratic Republic',
|
||||
'latvia' => 'Latvia',
|
||||
'lebanon' => 'Lebanon',
|
||||
'lesotho' => 'Lesotho',
|
||||
|
|
@ -651,21 +651,21 @@ class Country extends BaseEnumRoutable
|
|||
'lithuania' => 'Lithuania',
|
||||
'luxembourg' => 'Luxembourg',
|
||||
'macao' => 'Macao',
|
||||
'macedonia-the-former-yugoslav-republic-of' => 'Macedonia, the Former Yugoslav Republic of',
|
||||
'macedoniaTheFormerYugoslavRepublicOf' => 'Macedonia, the Former Yugoslav Republic of',
|
||||
'madagascar' => 'Madagascar',
|
||||
'malawi' => 'Malawi',
|
||||
'malaysia' => 'Malaysia',
|
||||
'maldives' => 'Maldives',
|
||||
'mali' => 'Mali',
|
||||
'malta' => 'Malta',
|
||||
'marshall-islands' => 'Marshall Islands',
|
||||
'marshallIslands' => 'Marshall Islands',
|
||||
'martinique' => 'Martinique',
|
||||
'mauritania' => 'Mauritania',
|
||||
'mauritius' => 'Mauritius',
|
||||
'mayotte' => 'Mayotte',
|
||||
'mexico' => 'Mexico',
|
||||
'micronesia-federated-states-of' => 'Micronesia, Federated States of',
|
||||
'moldova-republic-of' => 'Moldova, Republic of',
|
||||
'micronesiaFederatedStatesOf' => 'Micronesia, Federated States of',
|
||||
'moldovaRepublicOf' => 'Moldova, Republic of',
|
||||
'monaco' => 'Monaco',
|
||||
'mongolia' => 'Mongolia',
|
||||
'montenegro' => 'Montenegro',
|
||||
|
|
@ -677,95 +677,95 @@ class Country extends BaseEnumRoutable
|
|||
'nauru' => 'Nauru',
|
||||
'nepal' => 'Nepal',
|
||||
'netherlands' => 'Netherlands',
|
||||
'new-caledonia' => 'New Caledonia',
|
||||
'new-zealand' => 'New Zealand',
|
||||
'newCaledonia' => 'New Caledonia',
|
||||
'newZealand' => 'New Zealand',
|
||||
'nicaragua' => 'Nicaragua',
|
||||
'niger' => 'Niger',
|
||||
'nigeria' => 'Nigeria',
|
||||
'niue' => 'Niue',
|
||||
'norfolk-island' => 'Norfolk Island',
|
||||
'northern-mariana-islands' => 'Northern Mariana Islands',
|
||||
'norfolkIsland' => 'Norfolk Island',
|
||||
'northernMarianaIslands' => 'Northern Mariana Islands',
|
||||
'norway' => 'Norway',
|
||||
'oman' => 'Oman',
|
||||
'pakistan' => 'Pakistan',
|
||||
'palau' => 'Palau',
|
||||
'palestine-state-of' => 'Palestine, State of',
|
||||
'palestineStateOf' => 'Palestine, State of',
|
||||
'panama' => 'Panama',
|
||||
'papua-new-guinea' => 'Papua New Guinea',
|
||||
'papuaNewGuinea' => 'Papua New Guinea',
|
||||
'paraguay' => 'Paraguay',
|
||||
'peru' => 'Peru',
|
||||
'philippines' => 'Philippines',
|
||||
'pitcairn' => 'Pitcairn',
|
||||
'poland' => 'Poland',
|
||||
'portugal' => 'Portugal',
|
||||
'puerto-rico' => 'Puerto Rico',
|
||||
'puertoRico' => 'Puerto Rico',
|
||||
'qatar' => 'Qatar',
|
||||
'reunion' => 'Réunion',
|
||||
'romania' => 'Romania',
|
||||
'russian-federation' => 'Russian Federation',
|
||||
'russianFederation' => 'Russian Federation',
|
||||
'rwanda' => 'Rwanda',
|
||||
'saint-barthelemy' => 'Saint Barthélemy',
|
||||
'saint-helena-ascension-and-tristan-da-cunha' => 'Saint Helena, Ascension and Tristan da Cunha',
|
||||
'saint-kitts-and-nevis' => 'Saint Kitts and Nevis',
|
||||
'saint-lucia' => 'Saint Lucia',
|
||||
'saint-martin-french-part' => 'Saint Martin (French part)',
|
||||
'saint-pierre-and-miquelon' => 'Saint Pierre and Miquelon',
|
||||
'saint-vincent-and-the-grenadines' => 'Saint Vincent and the Grenadines',
|
||||
'saintBarthelemy' => 'Saint Barthélemy',
|
||||
'saintHelenaAscensionAndTristanDaCunha' => 'Saint Helena, Ascension and Tristan da Cunha',
|
||||
'saintKittsAndNevis' => 'Saint Kitts and Nevis',
|
||||
'saintLucia' => 'Saint Lucia',
|
||||
'saintMartinFrenchPart' => 'Saint Martin (French part)',
|
||||
'saintPierreAndMiquelon' => 'Saint Pierre and Miquelon',
|
||||
'saintVincentAndTheGrenadines' => 'Saint Vincent and the Grenadines',
|
||||
'samoa' => 'Samoa',
|
||||
'san-marino' => 'San Marino',
|
||||
'sao-tome-and-principe' => 'Sao Tome and Principe',
|
||||
'saudi-arabia' => 'Saudi Arabia',
|
||||
'sanMarino' => 'San Marino',
|
||||
'saoTomeAndPrincipe' => 'Sao Tome and Principe',
|
||||
'saudiArabia' => 'Saudi Arabia',
|
||||
'senegal' => 'Senegal',
|
||||
'serbia' => 'Serbia',
|
||||
'seychelles' => 'Seychelles',
|
||||
'sierra-leone' => 'Sierra Leone',
|
||||
'sierraLeone' => 'Sierra Leone',
|
||||
'singapore' => 'Singapore',
|
||||
'sint-maarten-dutch-part' => 'Sint Maarten (Dutch part)',
|
||||
'sintMaartenDutchPart' => 'Sint Maarten (Dutch part)',
|
||||
'slovakia' => 'Slovakia',
|
||||
'slovenia' => 'Slovenia',
|
||||
'solomon-islands' => 'Solomon Islands',
|
||||
'solomonIslands' => 'Solomon Islands',
|
||||
'somalia' => 'Somalia',
|
||||
'south-africa' => 'South Africa',
|
||||
'south-georgia-and-the-south-sandwich-islands' => 'South Georgia and the South Sandwich Islands',
|
||||
'south-sudan' => 'South Sudan',
|
||||
'southAfrica' => 'South Africa',
|
||||
'southGeorgiaAndTheSouthSandwichIslands' => 'South Georgia and the South Sandwich Islands',
|
||||
'southSudan' => 'South Sudan',
|
||||
'spain' => 'Spain',
|
||||
'sri-lanka' => 'Sri Lanka',
|
||||
'sriLanka' => 'Sri Lanka',
|
||||
'sudan' => 'Sudan',
|
||||
'suriname' => 'Suriname',
|
||||
'svalbard-and-jan-mayen' => 'Svalbard and Jan Mayen',
|
||||
'svalbardAndJanMayen' => 'Svalbard and Jan Mayen',
|
||||
'swaziland' => 'Swaziland',
|
||||
'sweden' => 'Sweden',
|
||||
'switzerland' => 'Switzerland',
|
||||
'syrian-arab-republic' => 'Syrian Arab Republic',
|
||||
'taiwan-province-of-china' => 'Taiwan, Province of China',
|
||||
'syrianArabRepublic' => 'Syrian Arab Republic',
|
||||
'taiwanProvinceOfChina' => 'Taiwan, Province of China',
|
||||
'tajikistan' => 'Tajikistan',
|
||||
'tanzania-united-republic-of' => 'Tanzania, United Republic of',
|
||||
'tanzaniaUnitedRepublicOf' => 'Tanzania, United Republic of',
|
||||
'thailand' => 'Thailand',
|
||||
'timor-leste' => 'Timor-Leste',
|
||||
'timorLeste' => 'TimorLeste',
|
||||
'togo' => 'Togo',
|
||||
'tokelau' => 'Tokelau',
|
||||
'tonga' => 'Tonga',
|
||||
'trinidad-and-tobago' => 'Trinidad and Tobago',
|
||||
'trinidadAndTobago' => 'Trinidad and Tobago',
|
||||
'tunisia' => 'Tunisia',
|
||||
'turkey' => 'Turkey',
|
||||
'turkmenistan' => 'Turkmenistan',
|
||||
'turks-and-caicos-islands' => 'Turks and Caicos Islands',
|
||||
'turksAndCaicosIslands' => 'Turks and Caicos Islands',
|
||||
'tuvalu' => 'Tuvalu',
|
||||
'uganda' => 'Uganda',
|
||||
'ukraine' => 'Ukraine',
|
||||
'united-arab-emirates' => 'United Arab Emirates',
|
||||
'united-kingdom' => 'United Kingdom',
|
||||
'united-states' => 'United States',
|
||||
'united-states-minor-outlying-islands' => 'United States Minor Outlying Islands',
|
||||
'unitedArabEmirates' => 'United Arab Emirates',
|
||||
'unitedKingdom' => 'United Kingdom',
|
||||
'unitedStates' => 'United States',
|
||||
'unitedStatesMinorOutlyingIslands' => 'United States Minor Outlying Islands',
|
||||
'uruguay' => 'Uruguay',
|
||||
'uzbekistan' => 'Uzbekistan',
|
||||
'vanuatu' => 'Vanuatu',
|
||||
'venezuela-bolivarian-republic-of' => 'Venezuela, Bolivarian Republic of',
|
||||
'viet-nam' => 'Viet Nam',
|
||||
'virgin-islands-british' => 'Virgin Islands, British',
|
||||
'virgin-islands-us' => 'Virgin Islands, U.S.',
|
||||
'wallis-and-futuna' => 'Wallis and Futuna',
|
||||
'western-sahara' => 'Western Sahara',
|
||||
'venezuelaBolivarianRepublicOf' => 'Venezuela, Bolivarian Republic of',
|
||||
'vietNam' => 'Viet Nam',
|
||||
'virginIslandsBritish' => 'Virgin Islands, British',
|
||||
'virginIslandsUs' => 'Virgin Islands, U.S.',
|
||||
'wallisAndFutuna' => 'Wallis and Futuna',
|
||||
'westernSahara' => 'Western Sahara',
|
||||
'yemen' => 'Yemen',
|
||||
'zambia' => 'Zambia',
|
||||
'zimbabwe' => 'Zimbabwe'
|
||||
|
|
|
|||
|
|
@ -28,10 +28,10 @@ class ApiController extends Controller
|
|||
/** @var \App\Models\Service */
|
||||
$service = Service::getFromBearerToken($bearerToken);
|
||||
} catch (ModelNotFoundException $e) {
|
||||
throw new ApiErrorException(ApiError::authFailed());
|
||||
throw new ApiErrorException(ApiError::apiAuthFailed());
|
||||
}
|
||||
if (!Hash::check($request->bearer_pwd, $service->bearer_pwd)) {
|
||||
throw new ApiErrorException(ApiError::authFailed());
|
||||
throw new ApiErrorException(ApiError::apiAuthFailed());
|
||||
}
|
||||
|
||||
$apiToken = $service->generateApiToken();
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ use DOMDocument;
|
|||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* TODO: séparer ça quand coté arcadia ils auront branché le cerveau
|
||||
|
|
@ -43,7 +44,7 @@ class ArcadiaController extends Controller
|
|||
ArcadiaMailType $type
|
||||
) {
|
||||
$request = $request->merge([
|
||||
'order_number' => str_pad(\intval($request->order_number), 9, '0', STR_PAD_LEFT)
|
||||
'order_num' => str_pad(\intval($request->order_num), 9, '0', STR_PAD_LEFT)
|
||||
]);
|
||||
$xml = 'none';
|
||||
try {
|
||||
|
|
@ -62,12 +63,18 @@ class ArcadiaController extends Controller
|
|||
|
||||
// Format xml
|
||||
$doc = new DOMDocument('1.0', 'utf-8');
|
||||
$doc->preserveWhiteSpace = true;
|
||||
$doc->xmlStandalone = true;
|
||||
$doc->preserveWhiteSpace = false;
|
||||
$doc->formatOutput = true;
|
||||
$doc->loadXML($xml);
|
||||
$xml = $doc->saveXML();
|
||||
|
||||
Storage::disk('arcadia')->put(date("Ymd_His") . ".xml", $xml);
|
||||
Storage::disk('arcadia')->put(Str::slug(sprintf(
|
||||
'v2_%s_%s%s.xml',
|
||||
$type->label,
|
||||
date('Ymd_His'),
|
||||
\microtime(true)
|
||||
)), $xml);
|
||||
return response()->json();
|
||||
} catch (\Exception $e) {
|
||||
Log::critical("ARCADIA XML CREATION FAILED : " . $e->getMessage());
|
||||
|
|
@ -102,7 +109,8 @@ class ArcadiaController extends Controller
|
|||
array $customerInfo
|
||||
): string {
|
||||
return view(
|
||||
'mail.arcadiaOrders.default',
|
||||
$type->equals(ArcadiaMailType::default()) ?
|
||||
'mail.arcadiaOrders.default' : 'mail.arcadiaOrders.game',
|
||||
[
|
||||
'request' => $request,
|
||||
'type' => $type,
|
||||
|
|
|
|||
|
|
@ -48,14 +48,46 @@ class SendArchadiaDefaultMailRequest extends BaseApiRequest
|
|||
],
|
||||
'support_code' => 'required|int',
|
||||
'deliver' => 'required|array',
|
||||
'deliver.firstname' => 'required|string|min:2',
|
||||
'deliver.lastname' => 'required|string|min:2',
|
||||
'deliver.email' => 'required|email:rfc,dns,spoof,filter',
|
||||
'deliver.address' => 'required|string|min:2',
|
||||
'deliver.address2' => 'sometimes|string|min:2',
|
||||
'deliver.city' => 'required|string|min:2',
|
||||
'deliver.postcode' => 'required|string|min:5',
|
||||
'deliver.phone' => 'required|string',
|
||||
'deliver.firstname' => 'required|string|min:1|max:255',
|
||||
'deliver.lastname' => 'required|string|min:1|max:255',
|
||||
'deliver.email' => 'required|email:rfc,dns,spoof,filter|max:255',
|
||||
'deliver.address' => 'required|string|min:2|max:255',
|
||||
'deliver.address2' => 'sometimes|string|min:2|max:255',
|
||||
'deliver.city' => 'required|string|min:2|max:255',
|
||||
'deliver.postcode' => 'required|string|postal_code:FR|max:255',
|
||||
'deliver.phone' => 'required|string|phone:FR|max:255',
|
||||
];
|
||||
}
|
||||
|
||||
public function attributes()
|
||||
{
|
||||
return [
|
||||
'label_type_support' => trans('label type support'),
|
||||
'operation' => trans('code opération'),
|
||||
'order_date' => trans('date de la commande'),
|
||||
'order_num' => trans('numero de commande'),
|
||||
'package_unit_weight' => trans('poids unitaire du paquet'),
|
||||
'state_order' => trans('type de commande arcadia'),
|
||||
'support_code' => trans('code de support'),
|
||||
'deliver' => trans('coordonées de livraison'),
|
||||
'deliver.civility' => trans('civilitée dans coordonées de livraison'),
|
||||
'deliver.firstname' => trans('prénom dans coordonées de livraison'),
|
||||
'deliver.lastname' => trans('nom dans coordonées de livraison'),
|
||||
'deliver.address' => trans('adresse dans coordonées de livraison'),
|
||||
'deliver.postcode' => trans('code postal dans coordonées de livraison'),
|
||||
'deliver.phone' => trans('téléphone dans coordonées de livraison'),
|
||||
'deliver.city' => trans('ville dans coordonées de livraison'),
|
||||
'deliver.email' => trans('e-mail dans coordonées de livraison'),
|
||||
];
|
||||
}
|
||||
|
||||
public function messages()
|
||||
{
|
||||
return [
|
||||
// phpcs:ignore Generic.Files.LineLength.TooLong
|
||||
'deliver.phone.phone' => trans('Le champ :attribute est invalide, il accepte les numéros des pays suivants: France.'),
|
||||
// phpcs:ignore Generic.Files.LineLength.TooLong
|
||||
'deliver.postcode.postal_code' => trans('Le champ :attribute accepte les codes postaux des pays suivants :countries comme par exemple :examples.'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,14 +42,45 @@ class SendArchadiaGameMailRequest extends BaseApiRequest
|
|||
'order_date' => 'required|date',
|
||||
'support_code' => 'required|int',
|
||||
'deliver' => 'required|array',
|
||||
'deliver.firstname' => 'required|string|min:2',
|
||||
'deliver.lastname' => 'required|string|min:2',
|
||||
'deliver.email' => 'required|email:rfc,dns,spoof,filter',
|
||||
'deliver.address' => 'required|string|min:2',
|
||||
'deliver.address2' => 'sometimes|string|min:2',
|
||||
'deliver.city' => 'required|string|min:2',
|
||||
'deliver.postcode' => 'required|digits:5',
|
||||
'deliver.phone' => 'required|string',
|
||||
'deliver.firstname' => 'required|string|min:1|max:255',
|
||||
'deliver.lastname' => 'required|string|min:1|max:255',
|
||||
'deliver.email' => 'required|email:rfc,dns,spoof,filter|max:255',
|
||||
'deliver.address' => 'required|string|min:2|max:255',
|
||||
'deliver.address2' => 'sometimes|string|min:2|max:255',
|
||||
'deliver.city' => 'required|string|min:2|max:255',
|
||||
'deliver.postcode' => 'required|string|postal_code:FR|max:255',
|
||||
'deliver.phone' => 'required|string|phone:FR|max:255',
|
||||
];
|
||||
}
|
||||
|
||||
public function attributes()
|
||||
{
|
||||
return [
|
||||
'code_on_pack' => trans('code ean emballage'),
|
||||
'code_unique' => trans('code unique'),
|
||||
'label_type_support' => trans('label type support'),
|
||||
'operation' => trans('code opération'),
|
||||
'order_date' => trans('date de la commande'),
|
||||
'support_code' => trans('code de support'),
|
||||
'deliver' => trans('coordonées de livraison'),
|
||||
'deliver.civility' => trans('civilitée dans coordonées de livraison'),
|
||||
'deliver.firstname' => trans('prénom dans coordonées de livraison'),
|
||||
'deliver.lastname' => trans('nom dans coordonées de livraison'),
|
||||
'deliver.address' => trans('adresse dans coordonées de livraison'),
|
||||
'deliver.postcode' => trans('code postal dans coordonées de livraison'),
|
||||
'deliver.phone' => trans('téléphone dans coordonées de livraison'),
|
||||
'deliver.city' => trans('ville dans coordonées de livraison'),
|
||||
'deliver.email' => trans('e-mail dans coordonées de livraison'),
|
||||
];
|
||||
}
|
||||
|
||||
public function messages()
|
||||
{
|
||||
return [
|
||||
// phpcs:ignore Generic.Files.LineLength.TooLong
|
||||
'deliver.phone.phone' => trans('Le champ :attribute est invalide, il accepte les numéros des pays suivants: France.'),
|
||||
// phpcs:ignore Generic.Files.LineLength.TooLong
|
||||
'deliver.postcode.postal_code' => trans('Le champ :attribute accepte les codes postaux des pays suivants :countries comme par exemple :examples.'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ namespace App\Http\Requests\Api\V2;
|
|||
|
||||
use App\Enums\Country;
|
||||
use Illuminate\Validation\Rules\Password;
|
||||
use Kwaadpepper\Enum\Rules\EnumIsValidRule;
|
||||
|
||||
class StoreCustomerRequest extends BaseApiRequest
|
||||
{
|
||||
|
|
@ -15,11 +16,12 @@ class StoreCustomerRequest extends BaseApiRequest
|
|||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'firstname' => 'required|string|min:2',
|
||||
'lastname' => 'required|string|min:2',
|
||||
'email' => 'required|email:rfc,dns,spoof,filter',
|
||||
'firstname' => 'required|string|min:1|max:255',
|
||||
'lastname' => 'required|string|min:1|max:255',
|
||||
'email' => 'required|email:rfc,dns,spoof,filter|max:255',
|
||||
'password' => [
|
||||
'required',
|
||||
'max:255',
|
||||
Password::min(8)
|
||||
->mixedCase()
|
||||
->letters()
|
||||
|
|
@ -27,22 +29,48 @@ class StoreCustomerRequest extends BaseApiRequest
|
|||
->symbols()
|
||||
->uncompromised()
|
||||
],
|
||||
'birth_date' => 'required|date_format:Y-m-d',
|
||||
'address' => 'sometimes|required_with:address2|string',
|
||||
'address2' => 'sometimes|string',
|
||||
'phone' => 'sometimes|string',
|
||||
'birth_date' => 'required|date_format:Y-m-d|max:255',
|
||||
'address' => 'sometimes|required_with:address2|string|max:255',
|
||||
'address2' => 'sometimes|string|max:255',
|
||||
'phone' => 'sometimes|string|phone:FR,BE,LU',
|
||||
'country' => [
|
||||
'sometimes',
|
||||
//phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed
|
||||
function ($attribute, $value, $fail) {
|
||||
if (!\in_array($value, Country::toValues())) {
|
||||
$fail('notInList');
|
||||
}
|
||||
}
|
||||
'numeric',
|
||||
new EnumIsValidRule(Country::class),
|
||||
sprintf(
|
||||
'in:%s',
|
||||
implode(',', [
|
||||
Country::belgium()->value,
|
||||
Country::luxembourg()->value,
|
||||
Country::france()->value,
|
||||
// DROM COM
|
||||
Country::guadeloupe()->value,
|
||||
Country::martinique()->value,
|
||||
Country::frenchGuiana()->value,
|
||||
Country::reunion()->value,
|
||||
Country::saintPierreAndMiquelon()->value,
|
||||
Country::mayotte()->value,
|
||||
Country::saintBarthelemy()->value,
|
||||
Country::saintMartinFrenchPart()->value,
|
||||
Country::wallisAndFutuna()->value,
|
||||
Country::frenchPolynesia()->value,
|
||||
Country::newCaledonia()->value
|
||||
])
|
||||
)
|
||||
],
|
||||
'city' => 'sometimes|string',
|
||||
'postcode' => 'sometimes|string',
|
||||
'city' => 'sometimes|string|min:2|max:255',
|
||||
'postcode' => 'sometimes|string|postal_code:FR,BE,LU',
|
||||
'opt_in' => 'required|boolean',
|
||||
];
|
||||
}
|
||||
|
||||
public function messages()
|
||||
{
|
||||
return [
|
||||
// phpcs:ignore Generic.Files.LineLength.TooLong
|
||||
'phone.phone' => trans('Le champ :attribute est invalide, il accepte les numéros des pays suivants France, Belgique, Luxembourg.'),
|
||||
// phpcs:ignore Generic.Files.LineLength.TooLong
|
||||
'country.in' => trans('Le champ :attribute est invalide, il accepte les pays suivants France, Belgique, Luxembourg.')
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ namespace App\Http\Requests\Api\V2;
|
|||
|
||||
use App\Enums\Country;
|
||||
use Illuminate\Validation\Rules\Password;
|
||||
use Kwaadpepper\Enum\Rules\EnumIsValidRule;
|
||||
|
||||
class UpdateCustomerRequest extends BaseApiRequest
|
||||
{
|
||||
|
|
@ -29,34 +30,59 @@ class UpdateCustomerRequest extends BaseApiRequest
|
|||
}
|
||||
};
|
||||
return [
|
||||
'firstname' => [$atLeast, 'string', 'min:2'],
|
||||
'lastname' => [$atLeast, 'string', 'min:2'],
|
||||
'email' => [$atLeast, 'email:rfc,dns,spoof,filter'],
|
||||
'firstname' => [$atLeast, 'string', 'min:1', 'max:255'],
|
||||
'lastname' => [$atLeast, 'string', 'min:1', 'max:255'],
|
||||
'email' => [$atLeast, 'email:rfc,dns,spoof,filter', 'max:255'],
|
||||
'password' => [
|
||||
$atLeast, Password::min(8)
|
||||
$atLeast, 'max:255', Password::min(8)
|
||||
->mixedCase()
|
||||
->letters()
|
||||
->numbers()
|
||||
->symbols()
|
||||
->uncompromised()
|
||||
],
|
||||
'birth_date' => [$atLeast, 'date_format:Y-m-d'],
|
||||
'address' => [$atLeast, 'required_with:address2', 'string'],
|
||||
'address2' => ['sometimes', 'string'],
|
||||
'phone' => [$atLeast, 'string'],
|
||||
'birth_date' => [$atLeast, 'date_format:Y-m-d', 'max:255'],
|
||||
'address' => [$atLeast, 'required_with:address2', 'string', 'max:255'],
|
||||
'address2' => ['sometimes', 'string', 'max:255'],
|
||||
'phone' => [$atLeast, 'string', 'phone:FR,BE,LU', 'max:255'],
|
||||
'country' => [
|
||||
$atLeast,
|
||||
'numeric',
|
||||
//phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed
|
||||
function ($attribute, $value, $fail) {
|
||||
if (!\in_array($value, Country::toValues())) {
|
||||
$fail(trans('not_in'));
|
||||
}
|
||||
}
|
||||
new EnumIsValidRule(Country::class),
|
||||
sprintf(
|
||||
'in:%s',
|
||||
implode(',', [
|
||||
Country::belgium()->value,
|
||||
Country::luxembourg()->value,
|
||||
Country::france()->value,
|
||||
// DROM COM
|
||||
Country::guadeloupe()->value,
|
||||
Country::martinique()->value,
|
||||
Country::frenchGuiana()->value,
|
||||
Country::reunion()->value,
|
||||
Country::saintPierreAndMiquelon()->value,
|
||||
Country::mayotte()->value,
|
||||
Country::saintBarthelemy()->value,
|
||||
Country::saintMartinFrenchPart()->value,
|
||||
Country::wallisAndFutuna()->value,
|
||||
Country::frenchPolynesia()->value,
|
||||
Country::newCaledonia()->value
|
||||
])
|
||||
)
|
||||
],
|
||||
'city' => [$atLeast, 'string'],
|
||||
'postcode' => [$atLeast, 'string'],
|
||||
'city' => [$atLeast, 'string', 'min:2', 'max:255'],
|
||||
'postcode' => [$atLeast, 'string', 'postal_code:FR,BE,LU', 'max:255'],
|
||||
'opt_in' => [$atLeast, 'boolean'],
|
||||
];
|
||||
}
|
||||
|
||||
public function messages()
|
||||
{
|
||||
return [
|
||||
// phpcs:ignore Generic.Files.LineLength.TooLong
|
||||
'phone.phone' => trans('Le champ :attribute est invalide, il accepte les numéros des pays suivants France, Belgique, Luxembourg.'),
|
||||
// phpcs:ignore Generic.Files.LineLength.TooLong
|
||||
'country.in' => trans('Le champ :attribute est invalide, il accepte les pays suivants France, Belgique, Luxembourg.')
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit c9572314aac3819994e8fd81b918a2075fac1ac7
|
||||
Subproject commit e08367ae7fd6288959ccc99d0ce397a942f3b62f
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "ldc/ldccrmv2client",
|
||||
"type": "project",
|
||||
"version": "2.2.0",
|
||||
"version": "2.2.1",
|
||||
"description": "LDC CRM V2",
|
||||
"authors": [
|
||||
{
|
||||
|
|
@ -27,6 +27,7 @@
|
|||
"ext-json": "*",
|
||||
"ext-memcached": "^3.1",
|
||||
"arondeparon/laravel-request-sanitizer": "^3.1",
|
||||
"axlon/laravel-postal-code-validation": "^3.2",
|
||||
"cache/memcached-adapter": "^1.1",
|
||||
"doctrine/dbal": "^3.0",
|
||||
"fideloper/proxy": "^4.4",
|
||||
|
|
@ -39,6 +40,7 @@
|
|||
"laravel/framework": "^8.39",
|
||||
"laravel/tinker": "^2.5",
|
||||
"league/csv": "^9.7",
|
||||
"propaganistas/laravel-phone": "^4.3",
|
||||
"rennokki/laravel-eloquent-query-cache": "^3.0",
|
||||
"spatie/laravel-mix-preload": "^1.2"
|
||||
},
|
||||
|
|
|
|||
320
composer.lock
generated
320
composer.lock
generated
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "95cb558000bc635b790b8dbe8a73d40a",
|
||||
"content-hash": "e4638739425eea8f9b4ff408c778dce8",
|
||||
"packages": [
|
||||
{
|
||||
"name": "arondeparon/laravel-request-sanitizer",
|
||||
|
|
@ -126,6 +126,73 @@
|
|||
},
|
||||
"time": "2021-03-11T06:42:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "axlon/laravel-postal-code-validation",
|
||||
"version": "v3.2.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/axlon/laravel-postal-code-validation.git",
|
||||
"reference": "d6341761d0eab7c229bac1f0108a774b0439b2ce"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/axlon/laravel-postal-code-validation/zipball/d6341761d0eab7c229bac1f0108a774b0439b2ce",
|
||||
"reference": "d6341761d0eab7c229bac1f0108a774b0439b2ce",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/contracts": "^5.5 || ^6.0 || ^7.0 || ^8.0",
|
||||
"illuminate/support": "^5.5 || ^6.0 || ^7.0 || ^8.0",
|
||||
"illuminate/validation": "^5.5 || ^6.0 || ^7.0 || ^8.0",
|
||||
"php": "^7.2 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"guzzlehttp/guzzle": "^6.5 || ^7.0.1",
|
||||
"mockery/mockery": "^1.3",
|
||||
"phpunit/phpunit": "^8.5 || ^9.0",
|
||||
"symfony/var-exporter": "^4.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"aliases": {
|
||||
"PostalCodes": "\\Axlon\\PostalCodeValidation\\Support\\Facades\\PostalCodes"
|
||||
},
|
||||
"providers": [
|
||||
"\\Axlon\\PostalCodeValidation\\ValidationServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Axlon\\PostalCodeValidation\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Choraimy Kroonstuiver",
|
||||
"homepage": "https://github.com/axlon"
|
||||
}
|
||||
],
|
||||
"description": "Worldwide postal code validation for Laravel and Lumen",
|
||||
"keywords": [
|
||||
"laravel",
|
||||
"lumen",
|
||||
"post code",
|
||||
"postal code",
|
||||
"validation",
|
||||
"zip code"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/axlon/laravel-postal-code-validation/issues",
|
||||
"source": "https://github.com/axlon/laravel-postal-code-validation/tree/v3.2.1"
|
||||
},
|
||||
"time": "2020-12-15T16:04:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "brick/math",
|
||||
"version": "0.9.3",
|
||||
|
|
@ -1424,6 +1491,133 @@
|
|||
],
|
||||
"time": "2021-04-26T11:24:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "giggsey/libphonenumber-for-php",
|
||||
"version": "8.12.35",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/giggsey/libphonenumber-for-php.git",
|
||||
"reference": "7853af278d8866328b3df98ae998dbf5d4a5c907"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/giggsey/libphonenumber-for-php/zipball/7853af278d8866328b3df98ae998dbf5d4a5c907",
|
||||
"reference": "7853af278d8866328b3df98ae998dbf5d4a5c907",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"giggsey/locale": "^1.7|^2.0",
|
||||
"php": ">=5.3.2",
|
||||
"symfony/polyfill-mbstring": "^1.17"
|
||||
},
|
||||
"require-dev": {
|
||||
"pear/pear-core-minimal": "^1.9",
|
||||
"pear/pear_exception": "^1.0",
|
||||
"pear/versioncontrol_git": "^0.5",
|
||||
"phing/phing": "^2.7",
|
||||
"php-coveralls/php-coveralls": "^1.0|^2.0",
|
||||
"symfony/console": "^2.8|^3.0|^v4.4|^v5.2",
|
||||
"symfony/phpunit-bridge": "^4.2 || ^5"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "8.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"libphonenumber\\": "src/"
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/src/data/",
|
||||
"/src/carrier/data/",
|
||||
"/src/geocoding/data/",
|
||||
"/src/timezone/data/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"Apache-2.0"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Joshua Gigg",
|
||||
"email": "giggsey@gmail.com",
|
||||
"homepage": "https://giggsey.com/"
|
||||
}
|
||||
],
|
||||
"description": "PHP Port of Google's libphonenumber",
|
||||
"homepage": "https://github.com/giggsey/libphonenumber-for-php",
|
||||
"keywords": [
|
||||
"geocoding",
|
||||
"geolocation",
|
||||
"libphonenumber",
|
||||
"mobile",
|
||||
"phonenumber",
|
||||
"validation"
|
||||
],
|
||||
"support": {
|
||||
"irc": "irc://irc.appliedirc.com/lobby",
|
||||
"issues": "https://github.com/giggsey/libphonenumber-for-php/issues",
|
||||
"source": "https://github.com/giggsey/libphonenumber-for-php"
|
||||
},
|
||||
"time": "2021-10-12T15:51:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "giggsey/locale",
|
||||
"version": "2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/giggsey/Locale.git",
|
||||
"reference": "f28e0fa55e842afe034a7671df79757731467031"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/giggsey/Locale/zipball/f28e0fa55e842afe034a7671df79757731467031",
|
||||
"reference": "f28e0fa55e842afe034a7671df79757731467031",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-json": "*",
|
||||
"pear/pear-core-minimal": "^1.9",
|
||||
"pear/pear_exception": "^1.0",
|
||||
"pear/versioncontrol_git": "^0.5",
|
||||
"phing/phing": "^2.7",
|
||||
"php-coveralls/php-coveralls": "^2.0",
|
||||
"phpunit/phpunit": "^8.5|^9.5",
|
||||
"symfony/console": "^5.0",
|
||||
"symfony/filesystem": "^5.0",
|
||||
"symfony/finder": "^5.0",
|
||||
"symfony/process": "^5.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Giggsey\\Locale\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Joshua Gigg",
|
||||
"email": "giggsey@gmail.com",
|
||||
"homepage": "https://giggsey.com/"
|
||||
}
|
||||
],
|
||||
"description": "Locale functions required by libphonenumber-for-php",
|
||||
"support": {
|
||||
"issues": "https://github.com/giggsey/Locale/issues",
|
||||
"source": "https://github.com/giggsey/Locale/tree/2.0"
|
||||
},
|
||||
"time": "2021-08-23T09:01:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "graham-campbell/result-type",
|
||||
"version": "v1.0.1",
|
||||
|
|
@ -2468,6 +2662,63 @@
|
|||
],
|
||||
"time": "2021-08-17T13:49:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/iso3166",
|
||||
"version": "3.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/iso3166.git",
|
||||
"reference": "9976d382f270ad3f3df8a68719beb7a7179ffa1e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/iso3166/zipball/9976d382f270ad3f3df8a68719beb7a7179ffa1e",
|
||||
"reference": "9976d382f270ad3f3df8a68719beb7a7179ffa1e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.3|^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"League\\ISO3166\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Rob Bast",
|
||||
"email": "rob.bast@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "ISO 3166-1 PHP Library",
|
||||
"homepage": "https://github.com/thephpleague/iso3166",
|
||||
"keywords": [
|
||||
"3166",
|
||||
"3166-1",
|
||||
"ISO 3166",
|
||||
"countries",
|
||||
"iso",
|
||||
"library"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/iso3166/issues",
|
||||
"source": "https://github.com/thephpleague/iso3166"
|
||||
},
|
||||
"time": "2020-12-05T06:50:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/mime-type-detection",
|
||||
"version": "1.7.0",
|
||||
|
|
@ -2904,6 +3155,73 @@
|
|||
],
|
||||
"time": "2020-07-20T17:29:33+00:00"
|
||||
},
|
||||
{
|
||||
"name": "propaganistas/laravel-phone",
|
||||
"version": "4.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Propaganistas/Laravel-Phone.git",
|
||||
"reference": "d85ce8af34d39afa39f96176c5ae645f0784e83c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Propaganistas/Laravel-Phone/zipball/d85ce8af34d39afa39f96176c5ae645f0784e83c",
|
||||
"reference": "d85ce8af34d39afa39f96176c5ae645f0784e83c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"giggsey/libphonenumber-for-php": "^7.0|^8.0",
|
||||
"illuminate/contracts": "^8.9",
|
||||
"illuminate/support": "^8.0",
|
||||
"illuminate/validation": "^8.0",
|
||||
"league/iso3166": "^2.0|^3.0",
|
||||
"php": "^7.3|^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"nunomaduro/larastan": "^0.6.11",
|
||||
"orchestra/testbench": "*",
|
||||
"phpunit/phpunit": "*"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Propaganistas\\LaravelPhone\\PhoneServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Propaganistas\\LaravelPhone\\": "src/"
|
||||
},
|
||||
"files": [
|
||||
"src/helpers.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Propaganistas",
|
||||
"email": "Propaganistas@users.noreply.github.com"
|
||||
}
|
||||
],
|
||||
"description": "Adds phone number functionality to Laravel and Lumen based on Google's libphonenumber API.",
|
||||
"keywords": [
|
||||
"laravel",
|
||||
"libphonenumber",
|
||||
"lumen",
|
||||
"phone",
|
||||
"validation"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/Propaganistas/Laravel-Phone/issues",
|
||||
"source": "https://github.com/Propaganistas/Laravel-Phone/tree/4.3.1"
|
||||
},
|
||||
"time": "2021-05-10T07:25:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/cache",
|
||||
"version": "1.0.1",
|
||||
|
|
|
|||
96
resources/documents/arcadia_default.xsd
Normal file
96
resources/documents/arcadia_default.xsd
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="export_arcadia">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Commande">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Num_Commande">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="[0-9]{9}"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Date_Commande">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[012])/(19|20)\d\d"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element type="xs:byte" name="Operation" />
|
||||
<xs:element name="Etat_Commande_CB">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="1"/>
|
||||
<xs:enumeration value="Null"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Etat_Commande_Cheque">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="1"/>
|
||||
<xs:enumeration value="Null"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Email_conso">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="[^@]+@[^\.]+\..+"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Civilite">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value=""/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element type="xs:string" name="Nom" />
|
||||
<xs:element type="xs:string" name="Prenom" />
|
||||
<xs:element type="xs:string" name="Adresse" />
|
||||
<xs:element type="xs:string" name="Adresse_Complementaire" />
|
||||
<xs:element type="xs:string" name="CP" />
|
||||
<xs:element type="xs:string" name="Ville" />
|
||||
<xs:element type="xs:string" name="Telephone" />
|
||||
<xs:element name="Ligne_de_Commande">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Poids_Unitaire_Colis">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="0"/>
|
||||
<xs:enumeration value="540"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Quantite">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="1"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Code_Support">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:unsignedInt">
|
||||
<xs:maxInclusive value="65535"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element type="xs:string" name="Libelle_Type_Support" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
95
resources/documents/arcadia_game.xsd
Normal file
95
resources/documents/arcadia_game.xsd
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="export_arcadia">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Commande">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Num_Commande">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value=""/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Date_Commande">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[012])/(19|20)\d\d"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element type="xs:byte" name="Operation" />
|
||||
<xs:element name="Email_conso">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="[^@]+@[^\.]+\..+"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Civilite">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value=""/>
|
||||
<xs:enumeration value="1"/>
|
||||
<xs:enumeration value="2"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element type="xs:string" name="Nom" />
|
||||
<xs:element type="xs:string" name="Prenom" />
|
||||
<xs:element type="xs:string" name="Adresse" />
|
||||
<xs:element type="xs:string" name="Adresse_Complementaire" />
|
||||
<xs:element type="xs:string" name="CP" />
|
||||
<xs:element type="xs:string" name="Ville" />
|
||||
<xs:element type="xs:string" name="Telephone" />
|
||||
<xs:element name="Ligne_de_Commande">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Quantite">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="1"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Poids_Unitaire_Colis">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="[0-9]*|"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Code_Support">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:unsignedInt">
|
||||
<xs:maxInclusive value="65535"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element type="xs:string" name="Libelle_Type_Support" />
|
||||
<xs:element name="Code_on_Pack">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="\d{13}|\d{8}|\d{7}|\d{6}"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Code_Unique" minOccurs="0">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="[0-9A-Z]*|"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
|
|
@ -131,6 +131,7 @@ return [
|
|||
*/
|
||||
|
||||
'require_at_least_field' => 'At least one of these fields :attributes must be present.',
|
||||
'postal_code' => 'The field :attribute accepts the postal codes of the following countries :countries such as :examples.',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@ return [
|
|||
*/
|
||||
|
||||
'require_at_least_field' => 'Au moins un des champs :attributes doit être présent.',
|
||||
'postal_code' => 'Le champ :attribute accepte les codes postaux des pays suivants :countries comme par exemple :examples.',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,41 +1,46 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<EXPORT_ARCADIA>
|
||||
<COMMANDE>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<export_arcadia>
|
||||
<Commande>
|
||||
<Num_Commande>{{ $request->order_num }}</Num_Commande>
|
||||
<Date_Commande>{{ Carbon::parse($request->order_date)->format('d/m/Y') }}</Date_Commande>
|
||||
<Operation>{{ $request->operation }}</Operation>
|
||||
@if($type->equals(ArcadiaMailType::default()))
|
||||
@if($orderType->equals(ArcadiaOrderType::cb()))
|
||||
<Etat_Commande_CB>1</Etat_Commande_CB>
|
||||
<Etat_Commande_Cheque>Null</Etat_Commande_Cheque>
|
||||
@elseif($orderType->equals(ArcadiaOrderType::check()))
|
||||
<Etat_Commande_CB>Null</Etat_Commande_CB>
|
||||
<Etat_Commande_Cheque>1</Etat_Commande_Cheque>
|
||||
@endif
|
||||
@endif
|
||||
<Email_conso><![CDATA[{{ $customerInfo['email'] }}]]></Email_conso>
|
||||
<CIVILITE></CIVILITE>
|
||||
<NOM><![CDATA[{{ $customerInfo['lastname'] }}]]></NOM>
|
||||
<Civilite/>
|
||||
<Nom><![CDATA[{{ $customerInfo['lastname'] }}]]></Nom>
|
||||
<Prenom><![CDATA[{{ $customerInfo['firstname'] }}]]></Prenom>
|
||||
<Adresse><![CDATA[{{ $customerInfo['address'] }}]]></Adresse>
|
||||
@if(strlen($customerInfo['address2']))
|
||||
<Adresse_Complementaire><![CDATA[{{ $customerInfo['address2'] }}]]></Adresse_Complementaire>
|
||||
@else
|
||||
<Adresse_Complementaire/>
|
||||
@endif
|
||||
<CP><![CDATA[{{ $customerInfo['postcode'] }}]]></CP>
|
||||
<Ville><![CDATA[{{ $customerInfo['city'] }}]]></Ville>
|
||||
<Telephone><![CDATA[{{ $customerInfo['phone'] }}]]></Telephone>
|
||||
@if($type->equals(ArcadiaMailType::default()))
|
||||
@if($orderType->equals(ArcadiaOrderType::cb()))
|
||||
<Etat_Commande_CB>1</Etat_Commande_CB>
|
||||
<Etat_Commande_Cheque>Null</Etat_Commande_Cheque>@elseif($orderType->equals(ArcadiaOrderType::check()))
|
||||
<Etat_Commande_CB>Null</Etat_Commande_CB>
|
||||
<Etat_Commande_Cheque>1</Etat_Commande_Cheque>@endif @endif
|
||||
<Ligne_de_Commande>
|
||||
<Num_Commande>{{ $request->order_num }}</Num_Commande>
|
||||
<Date_Commande>{{ Carbon::parse($request->order_date)->format('d/m/Y') }}</Date_Commande>
|
||||
<Operation>{{ $request->operation }}</Operation>
|
||||
<Code_Support>{{ $request->support_code }}</Code_Support>
|
||||
<Libelle_Type_Support>{{ $request->label_type_support }}</Libelle_Type_Support>
|
||||
<Poids_Unitaire_Colis>{{ $request->package_unit_weight }}</Poids_Unitaire_Colis>
|
||||
@if(!is_null($request->qty))
|
||||
{{-- <Quantite>{{ $request->qty }}</Quantite> --}}
|
||||
{{-- Locked by Arcadia to quantity = 1 --}}
|
||||
<Quantite>1</Quantite>
|
||||
@endif
|
||||
<Code_Support>{{ $request->support_code }}</Code_Support>
|
||||
<Libelle_Type_Support>{{ $request->label_type_support }}</Libelle_Type_Support>
|
||||
@if($type->equals(ArcadiaMailType::game()))
|
||||
@if(!is_null($request->code_on_pack))
|
||||
<Code_on_Pack><![CDATA[{{ $request->code_on_pack }}]]></Code_on_Pack>
|
||||
@endif
|
||||
@if(!is_null($request->code_unique))
|
||||
<Code_Unique><![CDATA[{{ $request->code_unique }}]]></Code_Unique>
|
||||
@endif
|
||||
@endif
|
||||
</Ligne_de_Commande>
|
||||
@if($type->equals(ArcadiaMailType::game()))
|
||||
@if(!is_null($request->code_on_pack))
|
||||
<Code_on_Pack><![CDATA[{{ $request->code_on_pack }}]]></Code_on_Pack>
|
||||
@endif
|
||||
@if(!is_null($request->code_unique))
|
||||
<Code_Unique><![CDATA[{{ $request->code_unique }}]]></Code_Unique>
|
||||
@endif
|
||||
@endif
|
||||
</COMMANDE>
|
||||
</EXPORT_ARCADIA>
|
||||
</Commande>
|
||||
</export_arcadia>
|
||||
|
|
|
|||
33
resources/views/mail/arcadiaOrders/game.blade.php
Normal file
33
resources/views/mail/arcadiaOrders/game.blade.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<export_arcadia>
|
||||
<Commande>
|
||||
<Num_Commande/>
|
||||
<Date_Commande>{{ Carbon::parse($request->order_date)->format('d/m/Y') }}</Date_Commande>
|
||||
<Operation>{{ $request->operation }}</Operation>
|
||||
<Email_conso><![CDATA[{{ $customerInfo['email'] }}]]></Email_conso>
|
||||
<Civilite/>
|
||||
<Nom><![CDATA[{{ $customerInfo['lastname'] }}]]></Nom>
|
||||
<Prenom><![CDATA[{{ $customerInfo['firstname'] }}]]></Prenom>
|
||||
<Adresse><![CDATA[{{ $customerInfo['address'] }}]]></Adresse>
|
||||
@if(strlen($customerInfo['address2']))
|
||||
<Adresse_Complementaire><![CDATA[{{ $customerInfo['address2'] }}]]></Adresse_Complementaire>
|
||||
@else
|
||||
<Adresse_Complementaire/>
|
||||
@endif
|
||||
<CP><![CDATA[{{ $customerInfo['postcode'] }}]]></CP>
|
||||
<Ville><![CDATA[{{ $customerInfo['city'] }}]]></Ville>
|
||||
<Telephone><![CDATA[{{ $customerInfo['phone'] }}]]></Telephone>
|
||||
<Ligne_de_Commande>
|
||||
{{-- <Quantite>{{ $request->qty }}</Quantite> --}}
|
||||
{{-- Locked by Arcadia to quantity = 1 --}}
|
||||
<Quantite>1</Quantite>
|
||||
<Poids_Unitaire_Colis/>
|
||||
<Code_Support>{{ $request->support_code }}</Code_Support>
|
||||
<Libelle_Type_Support>{{ $request->label_type_support }}</Libelle_Type_Support>
|
||||
<Code_on_Pack><![CDATA[{{ $request->code_on_pack }}]]></Code_on_Pack>
|
||||
@if(!is_null($request->code_unique))
|
||||
<Code_Unique><![CDATA[{{ $request->code_unique }}]]></Code_Unique>
|
||||
@endif
|
||||
</Ligne_de_Commande>
|
||||
</Commande>
|
||||
</export_arcadia>
|
||||
|
|
@ -34,10 +34,10 @@ class ArcadiaTest extends ApiBase
|
|||
'label_type_support' => 'Send Departaimants',
|
||||
'order_date' => \date('Y/m/d H:i:s'),
|
||||
'state_order' => ArcadiaOrderType::cb()->value,
|
||||
'support_code' => 32,
|
||||
'support_code' => 1,
|
||||
'label_type_support' => 'Fond carte Aimanté',
|
||||
'order_num' => str_pad('23', 9, '0', STR_PAD_LEFT),
|
||||
'package_unit_weight' => 200,
|
||||
'order_num' => 23,
|
||||
'package_unit_weight' => 0,
|
||||
];
|
||||
$response = $this->callApiWithToken($service, 'post', route(
|
||||
'apiV2.arcadia.outgoingMailDefault'
|
||||
|
|
@ -65,8 +65,8 @@ class ArcadiaTest extends ApiBase
|
|||
'order_date' => date('Y/m/d H:i:s'),
|
||||
'support_code' => 32,
|
||||
'label_type_support' => 'Jeux Reghalal',
|
||||
'code_unique' => Str::uuid(),
|
||||
'code_on_pack' => 'anystring'
|
||||
'code_unique' => \strtoupper(\str_replace('-', '', (string)Str::uuid())),
|
||||
'code_on_pack' => '2563547'
|
||||
];
|
||||
$response = $this->callApiWithToken($service, 'post', route(
|
||||
'apiV2.arcadia.outgoingMailGame',
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ class CustomerTest extends ApiBase
|
|||
'email' => 'warthogdj2@hotmail.fr',
|
||||
'password' => '123.Mot.De.P4sseNew',
|
||||
'phone' => '+33654821563',
|
||||
'country' => Country::bahamas()->value,
|
||||
'country' => Country::luxembourg()->value,
|
||||
'city' => 'Connerré2',
|
||||
'postcode' => '72161',
|
||||
'opt_in' => 0
|
||||
|
|
|
|||
|
|
@ -350,4 +350,100 @@ class CrmClientV1CustomerTest extends CrmClientTester
|
|||
|
||||
$this->assertEquals('OK', $reponse->status);
|
||||
}
|
||||
|
||||
public function testCreateArcadiaOutgoingMailGameWithEan()
|
||||
{
|
||||
$api = new ApiV1(config('crm.endpoint'), config('crm.token'));
|
||||
$reponse = $api->ArcadiaOutgoingMail(
|
||||
ModelsCustomer::where('email', 'v1toto.delarogerie@gmail.com')
|
||||
->firstOrFail()->id,
|
||||
[
|
||||
'root' => [
|
||||
[
|
||||
'fieldName' => 'order_date',
|
||||
'fieldValue' => date('d/m/Y')
|
||||
],
|
||||
[
|
||||
'fieldName' => 'operation',
|
||||
'fieldValue' => '32'
|
||||
]
|
||||
],
|
||||
'orderLine' => [
|
||||
[
|
||||
'fieldName' => 'code_unique',
|
||||
'fieldValue' => '2A5B416325414232'
|
||||
],
|
||||
[
|
||||
'fieldName' => 'code_on_pack',
|
||||
'fieldValue' => '2541632541423'
|
||||
],
|
||||
[
|
||||
'fieldName' => 'support_code',
|
||||
'fieldValue' => '16'
|
||||
],
|
||||
[
|
||||
'fieldName' => 'label_type_support',
|
||||
'fieldValue' => 'Gain du lot : ballon de foot en métal type "fracture"'
|
||||
]
|
||||
]
|
||||
],
|
||||
'game',
|
||||
[
|
||||
"firstname" => 'toto',
|
||||
"lastname" => 'delarogerie',
|
||||
"address" => 'rue des toto',
|
||||
"city" => 'toto ville',
|
||||
"postcode" => '72000',
|
||||
"phone" => '0673891160'
|
||||
]
|
||||
);
|
||||
|
||||
$this->assertEquals('OK', $reponse->status);
|
||||
}
|
||||
|
||||
public function testCreateArcadiaOutgoingMailGameWithoutEan()
|
||||
{
|
||||
$api = new ApiV1(config('crm.endpoint'), config('crm.token'));
|
||||
$reponse = $api->ArcadiaOutgoingMail(
|
||||
ModelsCustomer::where('email', 'v1toto.delarogerie@gmail.com')
|
||||
->firstOrFail()->id,
|
||||
[
|
||||
'root' => [
|
||||
[
|
||||
'fieldName' => 'order_date',
|
||||
'fieldValue' => date('d/m/Y')
|
||||
],
|
||||
[
|
||||
'fieldName' => 'operation',
|
||||
'fieldValue' => '32'
|
||||
]
|
||||
],
|
||||
'orderLine' => [
|
||||
[
|
||||
'fieldName' => 'code_unique',
|
||||
'fieldValue' => '25416325414232'
|
||||
],
|
||||
[
|
||||
'fieldName' => 'support_code',
|
||||
'fieldValue' => '16'
|
||||
],
|
||||
[
|
||||
'fieldName' => 'label_type_support',
|
||||
'fieldValue' => 'Gain du lot : ballon de foot en métal type "fracture"'
|
||||
]
|
||||
]
|
||||
],
|
||||
'game',
|
||||
[
|
||||
"firstname" => 'toto',
|
||||
"lastname" => 'delarogerie',
|
||||
"address" => 'rue des toto',
|
||||
"city" => 'toto ville',
|
||||
"postcode" => '72000',
|
||||
"phone" => '0673891160'
|
||||
]
|
||||
);
|
||||
|
||||
$this->assertEquals('OK', $reponse->status);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace Tests\Unit;
|
||||
|
||||
use DOMDocument;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Str;
|
||||
use LDC\LDCCRM\CrmApiV2;
|
||||
use LDC\LDCCRM\Enums\ArcadiaOrderType;
|
||||
|
|
@ -14,7 +16,7 @@ class CrmClientV2ArcadiaTest extends CrmClientTester
|
|||
{
|
||||
$api = new CrmApiV2();
|
||||
$customer = $api->getCustomerOrNew(static::$info->hashcode);
|
||||
dump(static::$info->postcode);
|
||||
|
||||
$arcadiaOrderMail = new ArcadiaMailDefault([
|
||||
'email' => static::$customer->email,
|
||||
'firstname' => static::$info->firstname,
|
||||
|
|
@ -28,10 +30,10 @@ class CrmClientV2ArcadiaTest extends CrmClientTester
|
|||
'label_type_support' => 'Send Departaimants',
|
||||
'order_date' => \date('Y/m/d H:i:s'),
|
||||
'state_order' => ArcadiaOrderType::cb()->value,
|
||||
'support_code' => 32,
|
||||
'support_code' => 1,
|
||||
'label_type_support' => 'Fond carte Aimanté',
|
||||
'order_num' => 23,
|
||||
'package_unit_weight' => 200,
|
||||
'package_unit_weight' => 0,
|
||||
]);
|
||||
$this->assertTrue($arcadiaOrderMail->send($customer));
|
||||
}
|
||||
|
|
@ -40,7 +42,6 @@ class CrmClientV2ArcadiaTest extends CrmClientTester
|
|||
{
|
||||
$api = new CrmApiV2();
|
||||
$customer = $api->getCustomerOrNew(static::$info->hashcode);
|
||||
dump(static::$info->postcode);
|
||||
$arcadiaOrderMail = new ArcadiaMailGame([
|
||||
'email' => static::$customer->email,
|
||||
'firstname' => static::$info->firstname,
|
||||
|
|
@ -54,9 +55,68 @@ class CrmClientV2ArcadiaTest extends CrmClientTester
|
|||
'order_date' => date('Y/m/d H:i:s'),
|
||||
'support_code' => 32,
|
||||
'label_type_support' => 'Jeux Reghalal',
|
||||
'code_unique' => (string)Str::uuid(),
|
||||
'code_on_pack' => 'anystring'
|
||||
'code_unique' => \strtoupper(\str_replace('-', '', (string)Str::uuid())),
|
||||
'code_on_pack' => '12365214587562'
|
||||
]);
|
||||
$this->assertTrue($arcadiaOrderMail->send($customer));
|
||||
}
|
||||
|
||||
public function testValidateGeneratedXmlGame()
|
||||
{
|
||||
$fileFound = false;
|
||||
|
||||
$files = File::allFiles(\storage_path('export/arcadia'));
|
||||
|
||||
/** @var \Symfony\Component\Finder\SplFileInfo $file */
|
||||
foreach ($files as $file) {
|
||||
if (\strpos($file->getFilename(), 'v2-game') === 0) {
|
||||
$fileFound = true;
|
||||
|
||||
// Enable user error handling
|
||||
\libxml_use_internal_errors(true);
|
||||
|
||||
$xml = new DOMDocument();
|
||||
$xml->load($file->getRealPath());
|
||||
|
||||
if (!$xml->schemaValidate(\resource_path('documents/arcadia_game.xsd'))) {
|
||||
print '<b>DOMDocument::schemaValidate() Generated Errors!</b>';
|
||||
$this->libxmlDisplayErrors();
|
||||
throw new \Exception('Could not validate xml file against xsd');
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->assertTrue($fileFound, 'Should have found a xml file to validate and pass validation');
|
||||
}
|
||||
|
||||
private function libxmlDisplayError($error)
|
||||
{
|
||||
$return = "<br/>\n";
|
||||
switch ($error->level) {
|
||||
case LIBXML_ERR_WARNING:
|
||||
$return .= "<b>Warning $error->code</b>: ";
|
||||
break;
|
||||
case LIBXML_ERR_ERROR:
|
||||
$return .= "<b>Error $error->code</b>: ";
|
||||
break;
|
||||
case LIBXML_ERR_FATAL:
|
||||
$return .= "<b>Fatal Error $error->code</b>: ";
|
||||
break;
|
||||
}
|
||||
$return .= trim($error->message);
|
||||
if ($error->file) {
|
||||
$return .= " in <b>$error->file</b>";
|
||||
}
|
||||
$return .= " on line <b>$error->line</b>\n";
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
private function libxmlDisplayErrors()
|
||||
{
|
||||
$errors = libxml_get_errors();
|
||||
foreach ($errors as $error) {
|
||||
print $this->libxmlDisplayError($error);
|
||||
}
|
||||
libxml_clear_errors();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,11 +163,11 @@ class CrmClientV2CustomerTest extends CrmClientTester
|
|||
$customer = $api->getCustomerOrNew(static::$info->hashcode);
|
||||
$this->assertEquals('pouet', $customer->lastname);
|
||||
|
||||
$customer->country = Country::angola();
|
||||
$customer->country = Country::belgium();
|
||||
$customer->save();
|
||||
|
||||
$customer = $api->getCustomerOrNew(static::$info->hashcode);
|
||||
$this->assertEquals(Country::angola(), $customer->country);
|
||||
$this->assertEquals(Country::belgium(), $customer->country);
|
||||
|
||||
$customer->email = 'pouet@gmail.com';
|
||||
$customer->birth_date = '1992-03-08';
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue