PayPal\Api\Payment::setExperienceProfileId PHP 메소드

setExperienceProfileId() 공개 메소드

PayPal generated identifier for the merchant's payment experience profile. Refer to this link to create experience profile ID.
public setExperienceProfileId ( string $experience_profile_id )
$experience_profile_id string
    public function setExperienceProfileId($experience_profile_id)
    {
        $this->experience_profile_id = $experience_profile_id;
        return $this;
    }

Usage Example

예제 #1
0
 /**
  * @see http://paypal.github.io/PayPal-PHP-SDK/sample/doc/payments/CreatePaymentUsingPayPal.html
  *
  * @return Payment
  */
 public function getPayment()
 {
     $payer = $this->getPayer();
     if (!$payer || !$payer instanceof Payer) {
         throw new InvalidArgumentException("Method getPayer has to return instance of Payer. Instead " . gettype($payer) . " given.");
     }
     if (!$payer->getPaymentMethod()) {
         $payer->setPaymentMethod('paypal');
     }
     $payment = new Payment();
     $payment->setIntent("sale")->setPayer($payer);
     if ($this->context->getExperienceProfileId()) {
         $payment->setExperienceProfileId($this->context->getExperienceProfileId());
     }
     $transactions = $this->getTransactions();
     $this->checkTransactions($transactions);
     $payment->setTransactions($transactions);
     return $payment;
 }
All Usage Examples Of PayPal\Api\Payment::setExperienceProfileId