IPeCompany / SmsPanelV2.Laravel

Laravel Package for new webapp v2
MIT License
12 stars 5 forks source link

An error occurred in send method call #1

Closed mohammadlth closed 1 year ago

mohammadlth commented 2 years ago

my code for send fast sms : $send = smsir::Send(); $send->Verify('xxxxxxxx', 993387, ['Code' => 123456]);

error: Client error: POST https://api.sms.ir/v1/send/verify resulted in a 400 Bad Request response:\n {"type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","title":"One or more validation errors occurred.","status":4 (truncated...)

cryptommer commented 2 years ago

parameters must be array of the Parameters class use it Like this

$parameter = new **\Cryptommer\Smsir\Objects\Parameters("Code", "123456");
$parameters = array($parameter);
$send->Verify('xxxxxxxx', 993387, $parameters);