Skip to content

magento man

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?

in admin form field

I have an admin form with a few select fields declared in my _prepareForm method like the example below: protected function _prepareForm() { $form = new Varien_Data_Form(array( ‘id’ => ‘datacenter_action_form’, ‘action’ => $this->getUrl(‘*/*/saveConfig’), ‘method’ => ‘post’, ‘enctype’ => ‘multipart/form-data’ ));… Read More »in admin form field