title: Does the creditCard function exist in Omnipay PayPal Express? Or only in PayPal Pro?
body: <p>This question is maybe similar to <a href="https://stackoverflow.com/questions/28218397/using-paypal-pro-in-omnipay">THIS</a> and <a href="https://stackoverflow.com/questions/18495788/setting-shipping-info-in-omnipay">THIS</a> but I'm not entirely sure. </p>
  
  <p>I've made a shopping cart that sends the product details and quantity/total amount to Paypal on checking out. I'm using Laravel 4 and the Omnipay Paypal plugin (Paypal_Express). I can send product details fine using the 'setItems' function and am now looking to pre-populate the credit card field on the Paypal summary page with my User's details. </p>
  
  <p>I have seen in other SO threads such as <a href="https://stackoverflow.com/questions/27490438/use-paypal-pro-instead-of-paypal-express-omnipay-for-laravel">THIS</a> that other people use the creditCard function to pass details to the Paypal summary credit card info page. </p>
  
  <p>My question: 1) Do you need to be using Paypal_Pro for the creditCard function to worK?
  I get this error when I try (<code>call_user_func_array() expects parameter 1 to be a valid callback, class 'Omnipay\Common\GatewayFactory' does not have a method 'creditCard'</code>).</p>
  
  <p>I don't want to enter all the credit card details - Just speed the process up by entering the User's Name, Adress etc...</p>
  
  <p>Also I tried changing to Paypal_Pro and it didn't work. (same error as above) I changed config plus gateways in my payment controller. </p>
  
  <p>2)How do you change PayPal_Express to PayPay_Pro?</p>
  
  <p>My code:</p>
  
  <pre><code> public function postPayment() { 
  
  
          $cart = Session::get('cart'); 
  
          $allProducts = [];
  
          foreach($cart-&gt;aContents as $productID=&gt;$quantity){
  
              $product = Product::find($productID);
  
              // get the product id
              // load the product from the id
              // store data in the allProduct array
              $allProducts[] = array('name' =&gt; $product-&gt;name, 'quantity' =&gt; $quantity, 'price'=&gt; $product-&gt;price);
          }
  
          $cardInput = array(
  
              'first_name' =&gt; Input::get('first_name'),
              'last_name' =&gt; Input::get('last_name'),
              'address1' =&gt; Input::get('address1'),
              'city' =&gt; Input::get('city'),
              'zip' =&gt; Input::get('zip'),
              'email' =&gt; Input::get('email')
  
              );
  
          $card = Omnipay::creditCard($cardInput);
  
          $params = array( 
              'cancelUrl' =&gt; \URL::to('cancel_order'), 
              'returnUrl' =&gt; \URL::to('payment_success'), 
              'amount' =&gt; Input::get('price'), 
              'currency' =&gt; Input::get('currency'), 
              'card' =&gt; $card,    
  
              ); 
  
              Session::put('params', $params); 
  
              Session::save(); 
  
              $gateway = Omnipay::create('PayPal_Express'); 
  
              $gateway-&gt;setUsername('tjmusicmanagement-facilitator_api1.gmail.com'); 
  
              $gateway-&gt;setPassword('K2LWQVP2L8472BPY'); 
  
              $gateway-&gt;setSignature('AwTOuAJWzCkdc5PldYeiz.l3iy5UAwOucYW6EFLLA9zUQqXaWyEGbebq'); 
  
              $gateway-&gt;setTestMode(true); 
  
              $gateway-&gt;setLogoImageUrl(URL::to('images/logoSmall.png'));
  
  
              $response = $gateway-&gt;purchase($params)-&gt;setItems($allProducts)-&gt;send(); 
  
              if ($response-&gt;isSuccessful()) { 
              // payment was successful: update database
                   print_r($response); 
  
                  }  elseif ($response-&gt;isRedirect()) { 
  
                  // redirect to offsite payment gateway 
                      $response-&gt;redirect(); 
  
                  } else { 
  
                      // payment failed: display message to customer 
                      echo $response-&gt;getMessage();
  
                   } 
  
              } 
  </code></pre>
  
  <p>And also the ignited\laravel-omnipay\config.php is unchanged (though I did try changing the driver)</p>
  
  <p>
  
  <p>return array(</p>
  
  <pre><code>// The default gateway to use
  'default' =&gt; 'paypal',
  
  // Add in each gateway here
  'gateways' =&gt; array(
      'paypal' =&gt; array(
          'driver' =&gt; 'PayPal_Express',
          'options' =&gt; array(
              'solutionType' =&gt; '',
              'landingPage' =&gt; '',
              'headerImageUrl' =&gt; ''
          )
      )
  )
  </code></pre>
  
  <p>);</p>
  
  <p>Thanks for your tinme!!</p>
  
  <p>EDIT: Here is my getSuccessPayment function where I can hopefully get the users paypal details (just name and address etc) from paypal. But how and where do I specify this?</p>
  
  <pre><code>    public function getSuccessPayment() 
              {   
                  $gateway = Omnipay::create('PayPal_Express');
                  $gateway-&gt;setUsername('lillyloverofwar-facilitator_api1.gmail.com'); 
                  $gateway-&gt;setPassword('U6LM3SG2MNCA3QE2'); 
                  $gateway-&gt;setSignature('AJVP9tUtdotIeVt82RpcG7n9ld-tAdCG1Ramb1u8yZECHhSpiXc0BO04'); 
                  $gateway-&gt;setTestMode(true); 
  
                  $params = Session::get('params'); 
  
                  $response = $gateway-&gt;completePurchase($params)-&gt;send(); 
                  $paypalResponse = $response-&gt;getData(); // this is the raw response object 
  
                  if(isset($paypalResponse['PAYMENTINFO_0_ACK']) &amp;&amp; $paypalResponse['PAYMENTINFO_0_ACK'] === 'Success') {
  
                      // return View::make('successfulPayment')-&gt;with($params); 
                   //     Session::flush();
                   // Response 
                   // print_r($paypalResponse); 
                   } else { 
                   //Failed transaction 
                   } 
                   // FLUSHING SESSION HERE GETS AN ERROR
                   // Session::flush();
                   return View::make('successfulPayment'); 
  
  
                  } 
  </code></pre>