Squalo - popravek posiljanja zaradi parametra "phone"
This commit is contained in:
parent
9e1682b83b
commit
fff24c0e06
@ -220,7 +220,7 @@ class SqualoApi {
|
||||
"gdprCanSend": true,
|
||||
"gdprCanTrack": true
|
||||
*/
|
||||
public function addRecipient($email, $list_id, $custom_attributes=array()){
|
||||
public function addRecipient($email, $phone, $list_id, $custom_attributes=array()){
|
||||
|
||||
$action = 'create-recipient';
|
||||
$method = 'POST';
|
||||
@ -240,6 +240,7 @@ class SqualoApi {
|
||||
|
||||
$data = array(
|
||||
'email' => $email,
|
||||
'phone' => $phone,
|
||||
'listIds' => array($list_id),
|
||||
'accept' => true,
|
||||
'confirmed' => true,
|
||||
|
@ -144,13 +144,14 @@ class SurveyInvitationsSqualo {
|
||||
//'email' => $sql_row['email'],
|
||||
'code' => $sql_row['password'],
|
||||
'password' => $sql_row['password'],
|
||||
'phone' => $sql_row['phone'],
|
||||
//'phone' => $sql_row['phone'],
|
||||
'custom' => $sql_row['custom'],
|
||||
'unsubscribe' => $unsubscribe,
|
||||
);
|
||||
|
||||
$recipients[] = array(
|
||||
'email' => $sql_row['email'],
|
||||
'phone' => $sql_row['phone'],
|
||||
'name' => $sql_row['firstname'],
|
||||
'surname' => $sql_row['lastname'],
|
||||
'custom_attributes' => $custom_attributes
|
||||
@ -356,10 +357,11 @@ class SurveyInvitationsSqualo {
|
||||
foreach($recipients as $recipient){
|
||||
|
||||
$email = $recipient['email'];
|
||||
$phone = $recipient['phone'];
|
||||
|
||||
$custom_attributes = $recipient['custom_attributes'];
|
||||
|
||||
$recipient_id = $squalo_api->addRecipient($email, $list_id, $custom_attributes);
|
||||
$recipient_id = $squalo_api->addRecipient($email, $phone, $list_id, $custom_attributes);
|
||||
|
||||
// Napaka pri ustvarjanju seznama
|
||||
if($recipient_id == '0'){
|
||||
|
Loading…
x
Reference in New Issue
Block a user