PayPal\Api\Invoice::setMerchantInfo PHP Method

setMerchantInfo() public method

Information about the merchant who is sending the invoice.
public setMerchantInfo ( PayPal\Api\MerchantInfo $merchant_info )
$merchant_info PayPal\Api\MerchantInfo
    public function setMerchantInfo($merchant_info)
    {
        $this->merchant_info = $merchant_info;
        return $this;
    }

Usage Example

use PayPal\Api\Address;
use PayPal\Api\BillingInfo;
use PayPal\Api\Cost;
use PayPal\Api\Currency;
use PayPal\Api\Invoice;
use PayPal\Api\InvoiceAddress;
use PayPal\Api\InvoiceItem;
use PayPal\Api\MerchantInfo;
use PayPal\Api\PaymentTerm;
use PayPal\Api\Phone;
use PayPal\Api\ShippingInfo;
$invoice = new Invoice();
// ### Invoice Info
// Fill in all the information that is
// required for invoice APIs
$invoice->setMerchantInfo(new MerchantInfo())->setBillingInfo(array(new BillingInfo()))->setNote("Medical Invoice 16 Jul, 2013 PST")->setPaymentTerm(new PaymentTerm())->setShippingInfo(new ShippingInfo());
// ### Merchant Info
// A resource representing merchant information that can be
// used to identify merchant
$invoice->getMerchantInfo()->setEmail("*****@*****.**")->setFirstName("Dennis")->setLastName("Doctor")->setbusinessName("Medical Professionals, LLC")->setPhone(new Phone())->setAddress(new Address());
$invoice->getMerchantInfo()->getPhone()->setCountryCode("001")->setNationalNumber("5032141716");
// ### Address Information
// The address used for creating the invoice
$invoice->getMerchantInfo()->getAddress()->setLine1("1234 Main St.")->setCity("Portland")->setState("OR")->setPostalCode("97217")->setCountryCode("US");
// ### Billing Information
// Set the email address for each billing
$billing = $invoice->getBillingInfo();
$billing[0]->setEmail("*****@*****.**");
$billing[0]->setBusinessName("Jay Inc")->setAdditionalInfo("This is the billing Info")->setAddress(new InvoiceAddress());
$billing[0]->getAddress()->setLine1("1234 Main St.")->setCity("Portland")->setState("OR")->setPostalCode("97217")->setCountryCode("US");
// ### Items List
All Usage Examples Of PayPal\Api\Invoice::setMerchantInfo