2013-09-02 2 views
1

JMSPaymentPaypalBundle과 함께 JMSPaymentCoreBundle을 사용 중입니다. 하지만 이제는 페이팔에 맞춤 필드를 보내야하고 IPN 메시지 확인은 나중에 다시 보내야합니다.JMSPaymentCoreBundle 및 JMSPaymentPaypalBundle을 사용하여 사용자 지정 필드 보내기

나는이 "custom"필드를 PaymentInstruction 내 ExtendedData로 추가하려고했지만 Paypal은이 사용자 정의 필드를 다시 보내지 않을 것입니다. 이 일을 할 수있는 방법이 있습니까? 내 PaymentInstruction을 준비 할 때 내 코드의 일부 :

$router = $this->get('router'); 

     $extendedData = new ExtendedData(); 
     $extendedData->set('return_url',$router->generate('payment_complete', array(
       'id' => $orden->getId(), 
     ), true)); 

     $extendedData->set('cancel_url', $router->generate('payment_cancel', array(
       'id' => $orden->getId(), 
     ), true)); 
     $extendedData->set('default_method', 'payment_paypal'); 
     $extendedData->set('item_name', $orden->getItemName()); 
     $extendedData->set('item_number', $orden->getId()); 
     $extendedData->set('custom', 'customvalue'); 


     $instruction = new PaymentInstruction((float)$orden->getAmount(), $orden->getCurrency(), 'paypal_express_checkout', $extendedData); 
     $ppc = $this->get('payment.plugin_controller'); 
     $ppc->createPaymentInstruction($instruction); 

     $orden->setPaymentInstruction($instruction); 
     $em->persist($orden); 
     $em->flush(); 

감사합니다!

답변

0

은 나 자신에 답 : L_PAYMENTREQUEST_0_NAME0, L_PAYMENTREQUEST_0_NUMBER0, L_PAYMENTREQUEST_0_DESC0, L_PAYMENTREQUEST_0_AMT0, L_PAYMENTREQUEST_0_QTY0, ...

: 그것은 다른 매개 변수를 포함 할 수있다
 $extendedData->set('checkout_params',array(
      'PAYMENTREQUEST_0_CUSTOM' => $orden->getId())); 

관련 문제