Forum Activity for @nate

nate
@nate
01/21/15 12:17:19PM
917 posts

Proxima Login fail


Installation and Configuration

I'll use proxima to create the user account and do my own log in.
updated by @nate: 01/21/15 12:18:48PM
nate
@nate
01/21/15 11:56:16AM
917 posts

Proxima Login fail


Installation and Configuration

So do I even need to use proxima? Have I wasted 2 days? A user account does me little good if I cant post as logged in.
updated by @nate: 01/21/15 12:11:33PM
nate
@nate
01/21/15 11:48:16AM
917 posts

Proxima Login fail


Installation and Configuration

[quote="N8"] I did look at Proxima and meant to mention it in my question. Can I use it solely for authentication? I need to use my own module for building lists and transactions. Does it have docs?
updated by @n8flex: 02 Jan 2015 02:37:16PM - See more at: https://www.jamroom.net/the-jamroom-network/forum/jamroom-developers/20254/jamroom-new-user#last[/quote]

[quote="Brian"] Yep - you can use it for authentication. Here's a guide to the user service: - See more at: https://www.jamroom.net/the-jamroom-network/forum/jamroom-developers/20254/jamroom-new-user#last[/quote]

I can see how this wasn't clear.
updated by @nate: 01/21/15 11:48:52AM
nate
@nate
01/21/15 11:42:59AM
917 posts

Proxima Login fail


Installation and Configuration

No. my module integrates Stripe to handle payments. I asked if this was allowed a few weeks ago.

function view_n8MSOne_checkout($_post, $_user, $_conf) {
	
	if (!jrUser_is_logged_in()) {
		$_re['msg'] = "user must be logged in";
		fdebug($_user);
		return n8MSOne_response($_re);
	}
	
	// validate post
	$_data = n8MSOne_validate($_post);	
	
	$file = APP_DIR . "/modules/n8MSOne/lib/Stripe.php";
	if (!is_file($file)) {
		jrCore_logger('CRI', "unable to load stripe library");
		$_re['msg'] = "Missing Stripe library";
		return n8MSOne_response($_re);
	}
	require_once $file;
	if ( strlen("{$_conf['n8MSOne_stripe_key']}") == 0) {
		jrCore_logger('CRI', "Stripe API key not set");
		$_re['msg'] = "System error";
		return n8MSOne_response($_re);
	}
	Stripe::setApiKey("{$_conf['n8MSOne_stripe_key']}");	
	
	// Create the charge on Stripe's servers - this will charge the user's card
	try {
		$charge = Stripe_Charge::create(array(
				"amount" 	=> $_data['total'],
				"card" 		=> $_data['token'],
				"description" 	=> $_data['email'],
				"currency" 	=> "usd"
			)
		);		
	} catch(Stripe_CardError $e) {
		$_re['msg'] = $e;		
		return n8MSOne_response($_re); 
	}

	// Create transaction record
	//$_data = n8MSOne_create_txn($_data, $charge);
		
	// Create puchases record for user
	//$_data = n8MSOne_create_purchases($_data);
	
	// Create sales record for seller
	//$_rs = n8MSOne_create_sales($_data);
	
	fdebug($_user);
	
	$_rs['type'] = "success";
	$_rs['msg'] = $_user['user_id'];
	
	// respond to app	
	return n8MSOne_response($_rs); 
}
nate
@nate
01/21/15 11:08:24AM
917 posts

Proxima Login fail


Installation and Configuration

I am posting the payment to my own module.
nate
@nate
01/21/15 11:07:12AM
917 posts

Proxima Login fail


Installation and Configuration

I just double checked the session ID. It is correct.
nate
@nate
01/21/15 10:50:54AM
917 posts

Proxima Login fail


Installation and Configuration

Ok so when I log in I am doing this as the Authentication

String credentials = ClientMap.PROXIMA_PASSWORD + ":" + ClientMap.PROXIMA_PASSWORD;

This works when logging in. Then I do this to post a payment

String credentials = ClientMap.PROXIMA_PASSWORD + ":" + session_id;

And on the server side I am only debugging the user

fdebug($_user);

And I get this in the debug log.

Quote:(2015-01-21T18:42:48+00:00.0.85112300 : 0)-(mem: 9437184)-(pid: 651868)-(ip: 97.85.164.92)-(uri: n8flex.com/msone/checkout/token=tok_15NTRCEVo3ItZB1yHeR5qRHu/total=220/last4=4242/ids=28) Array ( [quota_id] => 0 [user_language] => en-US [is_logged_in] => no )
nate
@nate
01/21/15 10:38:49AM
917 posts

Proxima Login fail


Installation and Configuration

Oh my bad. It's inactive.
nate
@nate
01/21/15 10:37:59AM
917 posts

Proxima Login fail


Installation and Configuration

Now it's back to saying invalid module.
  70