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