• Resolved inamkk

    (@inamkk)


    Plugin was working fine before update but after updating it now its not working, I have noticed that the country code in being used twice which might be cause of sms not being sent. Any help will be highly appreciated. Thanks

    SMS Provider = Twillio

    Gateway Answer:
    Array
    (
    [headers] => Requests_Utility_CaseInsensitiveDictionary Object
    (
    [data:protected] => Array
    (
    [access-control-allow-credentials] => true
    [access-control-allow-headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since
    [access-control-allow-methods] => GET, POST, DELETE, OPTIONS
    [access-control-allow-origin] => *
    [access-control-expose-headers] => ETag
    [content-type] => application/xml
    [date] => Wed, 20 Dec 2017 09:48:06 GMT
    [twilio-request-duration] => 0.064
    [twilio-request-id] => RQ6ddaa4c8f5c548b9a9555ee78b53ef80
    [x-powered-by] => AT-5000
    [x-shenanigans] => none
    [content-length] => 282
    )

    )

    [body] => <?xml version=’1.0′ encoding=’UTF-8′?>
    <TwilioResponse><RestException>21211<Message>The ‘To’ number +929203459442566 is not a valid phone number.</Message><MoreInfo>https://www.twilio.com/docs/errors/21211</MoreInfo><Status>400</Status></RestException></TwilioResponse&gt;
    [response] => Array
    (
    [code] => 400
    [message] => Bad Request
    )

    [cookies] => Array
    (
    )

    [filename] =>
    [http_response] => WP_HTTP_Requests_Response Object
    (
    [response:protected] => Requests_Response Object
    (
    [body] => <?xml version='1.0' encoding='UTF-8'?>
    <TwilioResponse><RestException>21211<Message>The 'To' number +929203459442566 is not a valid phone number.</Message><MoreInfo>https://www.twilio.com/docs/errors/21211</MoreInfo><Status>400</Status></RestException></TwilioResponse&gt;
    [raw] => HTTP/1.1 400 BAD REQUEST
    Access-Control-Allow-Credentials: true
    Access-Control-Allow-Headers: Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since
    Access-Control-Allow-Methods: GET, POST, DELETE, OPTIONS
    Access-Control-Allow-Origin: *
    Access-Control-Expose-Headers: ETag
    Content-Type: application/xml
    Date: Wed, 20 Dec 2017 09:48:06 GMT
    Twilio-Request-Duration: 0.064
    Twilio-Request-Id: RQ6ddaa4c8f5c548b9a9555ee78b53ef80
    X-Powered-By: AT-5000
    X-Shenanigans: none
    Content-Length: 282
    Connection: Close

    <?xml version='1.0' encoding='UTF-8'?>
    <TwilioResponse><RestException>21211<Message>The 'To' number +929203459442566 is not a valid phone number.</Message><MoreInfo>https://www.twilio.com/docs/errors/21211</MoreInfo><Status>400</Status></RestException></TwilioResponse&gt;
    [headers] => Requests_Response_Headers Object
    (
    [data:protected] => Array
    (
    [access-control-allow-credentials] => Array
    (
    [0] => true
    )

    [access-control-allow-headers] => Array
    (
    [0] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since
    )

    [access-control-allow-methods] => Array
    (
    [0] => GET, POST, DELETE, OPTIONS
    )

    [access-control-allow-origin] => Array
    (
    [0] => *
    )

    [access-control-expose-headers] => Array
    (
    [0] => ETag
    )

    [content-type] => Array
    (
    [0] => application/xml
    )

    [date] => Array
    (
    [0] => Wed, 20 Dec 2017 09:48:06 GMT
    )

    [twilio-request-duration] => Array
    (
    [0] => 0.064
    )

    [twilio-request-id] => Array
    (
    [0] => RQ6ddaa4c8f5c548b9a9555ee78b53ef80
    )

    [x-powered-by] => Array
    (
    [0] => AT-5000
    )

    [x-shenanigans] => Array
    (
    [0] => none
    )

    [content-length] => Array
    (
    [0] => 282
    )

    )

    )

    [status_code] => 400
    [protocol_version] => 1.1
    [success] =>
    [redirects] => 0
    [url] => https://AC0745465c24e825f9e2d5eafe05b071e2:8bafc46db939778366909e1cb3aa53ea@api.twilio.com/2010-04-01/Accounts/AC0745465c24e825f9e2d5eafe05b071e2/Messages
    [history] => Array
    (
    )

    [cookies] => Requests_Cookie_Jar Object
    (
    [cookies:protected] => Array
    (
    )

    )

    )

    [filename:protected] =>
    [data] =>
    [headers] =>
    [status] =>
    )

    )

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Art Project Group

    (@artprojectgroup)

    Can you try to comment line 146 from /includes/admin/funciones.php and check again:
    $telefono = substr( $telefono, 2 );
    to this:
    //$telefono = substr( $telefono, 2 );

    Kind regards.

    Thread Starter inamkk

    (@inamkk)

    Thanks for the quick reply, i have replaced the above code as recommended but still it does not work.

    Gateway answer:
    Array
    (
    [headers] => Requests_Utility_CaseInsensitiveDictionary Object
    (
    [data:protected] => Array
    (
    [access-control-allow-credentials] => true
    [access-control-allow-headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since
    [access-control-allow-methods] => GET, POST, DELETE, OPTIONS
    [access-control-allow-origin] => *
    [access-control-expose-headers] => ETag
    [content-type] => application/xml
    [date] => Thu, 21 Dec 2017 14:19:01 GMT
    [twilio-request-duration] => 0.089
    [twilio-request-id] => RQa868c3923ad545d8932baea9a1001902
    [x-powered-by] => AT-5000
    [x-shenanigans] => none
    [content-length] => 282
    )

    )

    [body] => <?xml version=’1.0′ encoding=’UTF-8′?>
    <TwilioResponse><RestException>21211<Message>The ‘To’ number +929203459442566 is not a valid phone number.</Message><MoreInfo>https://www.twilio.com/docs/errors/21211</MoreInfo><Status>400</Status></RestException></TwilioResponse&gt;
    [response] => Array
    (
    [code] => 400
    [message] => Bad Request
    )

    [cookies] => Array
    (
    )

    [filename] =>
    [http_response] => WP_HTTP_Requests_Response Object
    (
    [response:protected] => Requests_Response Object
    (
    [body] => <?xml version='1.0' encoding='UTF-8'?>
    <TwilioResponse><RestException>21211<Message>The 'To' number +929203459442566 is not a valid phone number.</Message><MoreInfo>https://www.twilio.com/docs/errors/21211</MoreInfo><Status>400</Status></RestException></TwilioResponse&gt;
    [raw] => HTTP/1.1 400 BAD REQUEST
    Access-Control-Allow-Credentials: true
    Access-Control-Allow-Headers: Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since
    Access-Control-Allow-Methods: GET, POST, DELETE, OPTIONS
    Access-Control-Allow-Origin: *
    Access-Control-Expose-Headers: ETag
    Content-Type: application/xml
    Date: Thu, 21 Dec 2017 14:19:01 GMT
    Twilio-Request-Duration: 0.089
    Twilio-Request-Id: RQa868c3923ad545d8932baea9a1001902
    X-Powered-By: AT-5000
    X-Shenanigans: none
    Content-Length: 282
    Connection: Close

    <?xml version='1.0' encoding='UTF-8'?>
    <TwilioResponse><RestException>21211<Message>The 'To' number +929203459442566 is not a valid phone number.</Message><MoreInfo>https://www.twilio.com/docs/errors/21211</MoreInfo><Status>400</Status></RestException></TwilioResponse&gt;
    [headers] => Requests_Response_Headers Object
    (
    [data:protected] => Array
    (
    [access-control-allow-credentials] => Array
    (
    [0] => true
    )

    [access-control-allow-headers] => Array
    (
    [0] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since
    )

    [access-control-allow-methods] => Array
    (
    [0] => GET, POST, DELETE, OPTIONS
    )

    [access-control-allow-origin] => Array
    (
    [0] => *
    )

    [access-control-expose-headers] => Array
    (
    [0] => ETag
    )

    [content-type] => Array
    (
    [0] => application/xml
    )

    [date] => Array
    (
    [0] => Thu, 21 Dec 2017 14:19:01 GMT
    )

    [twilio-request-duration] => Array
    (
    [0] => 0.089
    )

    [twilio-request-id] => Array
    (
    [0] => RQa868c3923ad545d8932baea9a1001902
    )

    [x-powered-by] => Array
    (
    [0] => AT-5000
    )

    [x-shenanigans] => Array
    (
    [0] => none
    )

    [content-length] => Array
    (
    [0] => 282
    )

    )

    )

    [status_code] => 400
    [protocol_version] => 1.1
    [success] =>
    [redirects] => 0
    [url] => https://AC0745465c24e825f9e2d5eafe05b071e2:8bafc46db939778366909e1cb3aa53ea@api.twilio.com/2010-04-01/Accounts/AC0745465c24e825f9e2d5eafe05b071e2/Messages
    [history] => Array
    (
    )

    [cookies] => Requests_Cookie_Jar Object
    (
    [cookies:protected] => Array
    (
    )

    )

    )

    [filename:protected] =>
    [data] =>
    [headers] =>
    [status] =>
    )

    )

    Plugin Author Art Project Group

    (@artprojectgroup)

    Your problem is generated by a double international code in the telephone number but we can’t see why.

    We’ll check the code to fix this issue.

    Kind regards.

    Plugin Author Art Project Group

    (@artprojectgroup)

    In our test (Pakistan and Twilio selected) the number 9203459442566 is processed without issues as +9203459442566 not +929203459442566 ๐Ÿ™

    Can you send us the full debug with the telephone number and message information (info [at] artprojectgroup [dot] es?

    Kind regards.

    Hello,
    Iยดam using woocommerce โ€“ APG SMS Notifications with Bulksms my provider.
    When testing sending SMS after an order being received, the country code gets duplicated and the message fail. I already test your suggestion but not worked.
    Can you help me with that?
    Look forward for your reply.
    Best regards,
    Alexandre Silva

    Plugin Author Art Project Group

    (@artprojectgroup)

    Fixed on the next update.

    Kind regards.

    Thread Starter inamkk

    (@inamkk)

    Hi, sorry was away for vacation do you still want me to send you the email of the complete error with number e.t.c ? also i have restored the plugin to the previous version which is now working fine should i update it now !

    Plugin Author Art Project Group

    (@artprojectgroup)

    Just update ๐Ÿ˜‰

    Kind regards.

    Thread Starter inamkk

    (@inamkk)

    Thanks updating the plugin resolved the issue, Thank you very much.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Country Code being Used Twice after Update’ is closed to new replies.