secure.yourdomain.com/product_name/resources/konnektiveSDK.php
//paypal payments have a unique order flow
paypal payments have a unique order flow
paypal payments have a unique order flow
function confirmPaypalOrder($token,$payerId)
	{
		if(empty($token)||empty($payerId))
			return;
		$params = (object) array();
		$params->token = $token;
		$params->payerId = $payerId;
		$params->orderItems = $this->getSessValue('paypalOrderItems');
		$params->paypalBillerId = $this->config->paypal->paypalBillerId;
		$params->campaignId = KFormConfig::$instance->campaignId;
		if($couponCode = $this->getSessValue('paypalCouponCode'))
			$params->couponCode = $couponCode;
		$params->shipProfileId = $this->getSessValue('paypalShipProfileId');
		$response = $this->sendApiRequest(self::ENDPOINT_CONFIRM_PAYPAL,$params);	
		if($response->result == 'SUCCESS')
		{
			$this->setSessValue('order',$response->message);
			$this->redirect($this->redirectsTo.'?paypalSuccess=1');
		}
		else
			$this->customLoadScript .= 'kform.validator.triggerError("'.str_replace("Please redirect your customer to PayPal.","",$response->message).'");';
	}
function confirmPaypalOrder ( $ token , $ payerId ) { if ( empty ( $ token ) || empty ( $ payerId ) ) return ; $ params = ( object ) array ( ) ; $ params -> token = $ token ; $ params -> payerId = $ payerId ; $ params -> orderItems = $ this -> getSessValue ( 'paypalOrderItems' ) ; $ params -> paypalBillerId = $ this -> config -> paypal -> paypalBillerId ; $ params -> campaignId = KFormConfig :: $ instance -> campaignId ; if ( $ couponCode = $ this -> getSessValue ( 'paypalCouponCode' ) ) $ params -> couponCode = $ couponCode ; $ params -> shipProfileId = $ this -> getSessValue ( 'paypalShipProfileId' ) ; $ response = $ this -> sendApiRequest ( self :: ENDPOINT_CONFIRM_PAYPAL , $ params ) ; if ( $ response -> result == 'SUCCESS' ) { $ this -> setSessValue ( 'order' , $ response -> message ) ; $ this -> redirect ( $ this -> redirectsTo . '?paypalSuccess=1' ) ; } else $ this -> customLoadScript .= 'kform.validator.triggerError("' . str_replace ( " Please redirect your customer to PayPal. " , " " , $ response -> message ) . '");' ; }
paypal payments have a unique order flow
paypal payments have a unique order flow