title: Paytm php sdk integration PaymentDetailBuilder Class not found
body: <blockquote>
  <p>Fatal error: Uncaught Error: Class 'PaymentDetailBuilder' not found</p>
  </blockquote>
  <p>initial code is like this:</p>
  <pre><code>require_once('vendor/autoload.php');
  use paytmpg\merchant\models\PaymentDetail\PaymentDetailBuilder;
  use paytmpg\merchant\models\PaymentStatusDetail\PaymentStatusDetailBuilder;
  use paytmpg\merchant\models\RefundDetail\RefundDetailBuilder;
  use paytmpg\merchant\models\RefundStatusDetail\RefundStatusDetailBuilder;
  // For Staging 
  $environment = LibraryConstants::STAGING_ENVIRONMENT;
  
  // For Production 
  // $environment = LibraryConstants::PRODUCTION_ENVIRONMENT;
  
  // Find your mid, key, website in your Paytm Dashboard at https://dashboard.paytm.com/next/apikeys 
  $mid = MERCHANT_MID;
  $key = MERCHANT_KEY;
  $website = MERCHANT_WEBSITE;
  $client_id = MERCHANT_CLIENT_ID;
  
    $callbackUrl = MERCHANT_CALLBACK_URL;
    MerchantProperties::setCallbackUrl($callbackUrl);
  
    MerchantProperties::initialize($environment, $mid, $key, $client_id, $website);
    // If you want to add log file to your project, use below code
    // Config::$monologName = '[PAYTM]';
    // Config::$monologLevel = MonologLogger::INFO;
    // Config::$monologLogfile = 'file.log';
  
  
      $channelId = EChannelId::WEB;
      $orderId = &quot;ORDER_ID&quot;.rand(0,99); // post order id 
      $txnAmount = Money::constructWithCurrencyAndValue(EnumCurrency::INR, &quot;11.00&quot;); // post amount to be paid
      $userInfo = new UserInfo(&quot;CUSTID_002&quot;); 
      $userInfo-&gt;setAddress(&quot;CUSTOMER_ADDRESS&quot;);
      $userInfo-&gt;setEmail(&quot;CUSTOMER_EMAIL_ID&quot;);
      $userInfo-&gt;setFirstName(&quot;CUSTOMER_FIRST_NAME&quot;);
      $userInfo-&gt;setLastName(&quot;CUSTOMER_LAST_NAME&quot;);
      $userInfo-&gt;setMobile(&quot;CUSTOMER_MOBILE_NO&quot;);
      $userInfo-&gt;setPincode(&quot;CUSTOMER_PINCODE&quot;);
      $paymentDetailBuilder = new PaymentDetailBuilder($channelId, $orderId, $txnAmount, $userInfo);
      $paymentDetail = $paymentDetailBuilder-&gt;build();
      $response = Payment::createTxnToken($paymentDetail);
  
      print_r($response);
   
  </code></pre>
  <p>I have copied from =&gt; <a href="https://developer.paytm.com/docs/server-sdk/php/?ref=serverSdk#SDKCode;" rel="nofollow noreferrer">https://developer.paytm.com/docs/server-sdk/php/?ref=serverSdk#SDKCode;</a></p>