application/controllers/BusinessSelectedPackageController.php
// Send Payment Link To Customer Start //
Send Payment Link To Customer Start
Send Payment Link To Customer Start
public function PackagePaymentLink($id)
  {
        $data['packagedata']=$this->BusinessPayments_model->PaymentPendingDetailsinBusinessPayments($id);
        $business_cname= $data['packagedata'][0]['campaign_id'];
        $business_email= $data['packagedata'][0]['email'];
        $id                 = $id;
        $subject='Payment Link';
        $url = getHostURL(true).'paymentlink?id='.$id;
        $name=$business_cname;
        $hiuser = ucfirst($name);
        $body=Customdata_model::where('content_type','=','PaymentLink')->first()->content;
        $body=str_replace("{CompanyName}",$hiuser,$body);
        $body=str_replace("{URL}",$url,$body);
        $sendlinkid= sendEmail("bizbrainz2020@gmail.com","Administrator",$business_email,$subject,$body);
              if($sendlinkid){
                    echo json_encode(array('success'=>true,'message'=>SAVE_MSG));
                    return;
                }else {
                      echo json_encode(array('success'=>false,'message'=>SERVER_ERROR));
                      return;
               } 
  }
public function PackagePaymentLink ( $ id ) { $ data [ 'packagedata' ] = $ this -> BusinessPayments_model -> PaymentPendingDetailsinBusinessPayments ( $ id ) ; $ business_cname = $ data [ 'packagedata' ] [ 0 ] [ 'campaign_id' ] ; $ business_email = $ data [ 'packagedata' ] [ 0 ] [ 'email' ] ; $ id = $ id ; $ subject = 'Payment Link' ; $ url = getHostURL ( true ) . 'paymentlink?id=' . $ id ; $ name = $ business_cname ; $ hiuser = ucfirst ( $ name ) ; $ body = Customdata_model :: where ( 'content_type' , '=' , 'PaymentLink' ) -> first ( ) -> content ; $ body = str_replace ( " {CompanyName} " , $ hiuser , $ body ) ; $ body = str_replace ( " {URL} " , $ url , $ body ) ; $ sendlinkid = sendEmail ( " bizbrainz2020@gmail.com " , " Administrator " , $ business_email , $ subject , $ body ) ; if ( $ sendlinkid ) { echo json_encode ( array ( 'success' => true , 'message' => SAVE_MSG ) ) ; return ; } else { echo json_encode ( array ( 'success' => false , 'message' => SERVER_ERROR ) ) ; return ; } }
Send Payment Link To Customer Start
Send Payment Link To Customer Start