public function registerTransaction($amount, $localTrxID) {
		$token = $this->authenticate();
		
		// paypal like the amount as string, to prevent floating point errors
		if (!is_string($amount))
			$amount = sprintf("%0.2f", $amount);
		
		$a = (object)[
			"amount" => (object)[
				"total" => $amount,
				"currency" => $this->currency,
			]
		];	
		
		$route = Route::get('paypal_response');
		$base = URL::base(true);
		$payment_data = (object)[
			'intent' => "sale",
			'redirect_urls' => (object)[
				'return_url' => $base . $route->uri([
						'action' => 'complete', 'trxid' => $localTrxID]),
				'cancel_url' => $base . $route->uri([
						'action' => 'cancel', 'trxid' => $localTrxID]),
			],
			'payer' => (object)[ 'payment_method' => 'paypal', ],
    		"transactions" => [ $a ],
        ];
		
		$request = $this->genRequest('payments/payment', $payment_data, $token);
		return $this->call($request);
	}