Paypal Checkout SDK
  • Introduction
  • Requirements
  • Installation
  • Upgrading
  • Questions and issues
  • Changelog
  • Basic Usage
    • Create an Order
    • Show an Order
    • Capture an Order
  • Api
    • Amount
    • Amount Breakdown
    • Application Context
    • Item
    • Order
    • Payee
    • Purchase Unit
Powered by GitBook
On this page
  • Methods
  • Payee::__construct()
  • Payee::create()
  • Payee::setEmailAddress()
  • Payee::getEmailAddress()
  • Payee::setMerchantId()
  • Payee::getMerchantId()

Was this helpful?

Export as PDF
  1. Api

Payee

See https://developer.paypal.com/docs/api/orders/v2/#payee.

Methods

Payee::__construct()

Creates a payee object using constructor.

Signature

public function __construct(string $email_address, string $merchant_id);

Example

$payee = new Payee('payee@paypal.com', 'YP568Y95AVSDY');

Payee::create()

Creates a payee object.

Signature

public static function create(string $email_address, string $merchant_id): Payee;

Example

$payee = Payee::create('payee@paypal.com', 'YP568Y95AVSDY');

Payee::setEmailAddress()

Sets an email address on a payee object.

Signature

public function setEmailAddress(string $email_address): self

Example

$payee = Payee::create('payee@paypal.com', 'YP568Y95AVSDY');
$payee->setEmailAddress('payee2@paypal.com');

Payee::getEmailAddress()

Gets a payee email address.

Signature

public function getEmailAddress(): string;

Example

$payee = Payee::create('payee@paypal.com', 'YP568Y95AVSDY');
$payee->getEmailAddress() // payee@paypal.com;

Payee::setMerchantId()

Sets a merchant id on a payee object.

Signature

public function setMerchantId(string $merchant_id): self;

Example

$payee = Payee::create('payee@paypal.com', 'YP568Y95AVSDY');
$payee->setEmailAddress('YP568Y95AVSDY');

Payee::getMerchantId()

Gets a payee merchant id.

Signature

public function getMerchantId(): ?string

Example

$payee = Payee::create('payee@paypal.com', 'YP568Y95AVSDY');
$payee->getMerchantId() // YP568Y95AVSDY;
PreviousOrderNextPurchase Unit

Last updated 3 years ago

Was this helpful?