Skip to content

curl

Auto Added by WPeMatico

How to use curl in magento 2 method?

I have a curl script to send sms. Below is the code. $userId = $this->gupShupConfig->getSenderUsername(); $password = $this->gupShupConfig->getSenderPassword(); $smsApiUrl = $this->gupShupConfig->getSmsApiUrl(); $post_fields = array(); $post_fields[“method”] = “sendMessage”; $post_fields[“send_to”] = $formattedMobileNumber;//”919820XXXXXX”; $post_fields[“msg”] = $smsMessage; $post_fields[“msg_type”] = “TEXT”; $post_fields[“userid”] = $userId; $post_fields[“password”]… Read More »How to use curl in magento 2 method?