예제 #1
0
 public function installation_settings()
 {
     $braintree_environment = Config::get('app.braintree_environment');
     $braintree_merchant_id = Config::get('app.braintree_merchant_id');
     $braintree_public_key = Config::get('app.braintree_public_key');
     $braintree_private_key = Config::get('app.braintree_private_key');
     $braintree_cse = Config::get('app.braintree_cse');
     $twillo_account_sid = Config::get('app.twillo_account_sid');
     $twillo_auth_token = Config::get('app.twillo_auth_token');
     $twillo_number = Config::get('app.twillo_number');
     $timezone = Config::get('app.timezone');
     $stripe_publishable_key = Config::get('app.stripe_publishable_key');
     $url = Config::get('app.url');
     $website_title = Config::get('app.website_title');
     $s3_bucket = Config::get('app.s3_bucket');
     $default_payment = Config::get('app.default_payment');
     $stripe_secret_key = Config::get('app.stripe_secret_key');
     $mail_driver = Config::get('mail.driver');
     $email_name = Config::get('mail.from.name');
     $email_address = Config::get('mail.from.address');
     $mandrill_secret = Config::get('services.mandrill.secret');
     $mandrill_username = Config::get('services.mandrill.username');
     $host = Config::get('mail.host');
     /* DEVICE PUSH NOTIFICATION DETAILS */
     $customer_certy_url = Config::get('app.customer_certy_url');
     $customer_certy_pass = Config::get('app.customer_certy_pass');
     $customer_certy_type = Config::get('app.customer_certy_type');
     $provider_certy_url = Config::get('app.provider_certy_url');
     $provider_certy_pass = Config::get('app.provider_certy_pass');
     $provider_certy_type = Config::get('app.provider_certy_type');
     $gcm_browser_key = Config::get('app.gcm_browser_key');
     /* DEVICE PUSH NOTIFICATION DETAILS END */
     $install = array('braintree_environment' => $braintree_environment, 'braintree_merchant_id' => $braintree_merchant_id, 'braintree_public_key' => $braintree_public_key, 'braintree_private_key' => $braintree_private_key, 'braintree_cse' => $braintree_cse, 'twillo_account_sid' => $twillo_account_sid, 'twillo_auth_token' => $twillo_auth_token, 'twillo_number' => $twillo_number, 'stripe_publishable_key' => $stripe_publishable_key, 'stripe_secret_key' => $stripe_secret_key, 'mail_driver' => $mail_driver, 'email_address' => $email_address, 'mandrill_username' => $mandrill_username, 'email_name' => $email_name, 'host' => $host, 'mandrill_secret' => $mandrill_secret, 'default_payment' => $default_payment, 'customer_certy_url' => $customer_certy_url, 'customer_certy_pass' => $customer_certy_pass, 'customer_certy_type' => $customer_certy_type, 'provider_certy_url' => $provider_certy_url, 'provider_certy_pass' => $provider_certy_pass, 'provider_certy_type' => $provider_certy_type, 'gcm_browser_key' => $gcm_browser_key);
     $success = Input::get('success');
     $cert_def = 0;
     $cer = Certificates::where('file_type', 'certificate')->where('client', 'apple')->get();
     foreach ($cer as $key) {
         if ($key->default == 1) {
             $cert_def = $key->type;
         }
     }
     $title = ucwords("Installation " . trans('customize.Settings'));
     /* 'Installation Settings' */
     return View::make('install_settings')->with('title', $title)->with('success', $success)->with('page', 'settings')->with('cert_def', $cert_def)->with('install', $install);
 }
예제 #2
0
//require_once  'database.php';
//error_reporting(false);
$cers = Certificates::where('client', 'apple')->where('file_type', 'certificate')->get();
foreach ($cers as $key) {
    if ($key->default == 1) {
        $cert_def = $key->type;
    } else {
        $cert_def = 0;
    }
}
define("DefA", $cert_def);
$certi_user_a = Certificates::where('client', 'apple')->where('user_type', 0)->where('type', $cert_def)->where('file_type', 'certificate')->first();
Log::info('certi_usr_a' . print_r($certi_user_a, true));
define("Certi_Path", $certi_user_a->name);
Log::info('certi_path' . print_r($certi_user_a, true));
$pass_user_a = Certificates::where('client', 'apple')->where('user_type', 0)->where('type', $cert_def)->where('file_type', 'passphrase')->first();
define("PassPH", $pass_user_a->name);
class Apns
{
    private $passphrase = PassPH;
    private $certificateP = Certi_Path;
    private $defa = DefA;
    public $ctx;
    public $fp;
    private $ssl = 'ssl://gateway.push.apple.com:2195';
    private $sandboxSsl = 'ssl://gateway.sandbox.push.apple.com:2195';
    private $sandboxFeedback = 'ssl://feedback.sandbox.push.apple.com:2196';
    private $message = "ManagerMaster";
    private function getCertificatePath()
    {
        Log::info('path user = '******'/apps/ios_push/iph_cert/' . $this->certificateP, true));
예제 #3
0
<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 * Description of GCM
 *
 * @author Ravi Tamada
 */
$ce = Certificates::where('client', 'gcm')->first();
if ($ce) {
    $google_key_db = $ce->name;
} else {
    $google_key_db = "AIzaSyDruCA-A4L4qKItQeB_2yGyZVaYGhkaJ1Y";
}
define("GOOGLE_API_KEY", $google_key_db);
class GCM
{
    //put your code here
    // constructor
    function __construct()
    {
    }
    /**
     * Sending Push Notification
     */
    public function send_notification($registatoin_ids, $message)
    {
        // include config