Open Monograph Press  3.3.0
Omnipay\PayPal\Message\RestCreateSubscriptionRequest Class Reference
Inheritance diagram for Omnipay\PayPal\Message\RestCreateSubscriptionRequest:
Omnipay\PayPal\Message\AbstractRestRequest Omnipay\Common\Message\AbstractRequest Omnipay\Common\Message\RequestInterface Omnipay\Common\Message\MessageInterface

Public Member Functions

 getAgreementDetails ()
 
 getAgreementDetails ()
 
 getChargeModel ()
 
 getChargeModel ()
 
 getData ()
 
 getData ()
 
 getMerchantPreferences ()
 
 getMerchantPreferences ()
 
 getName ()
 
 getName ()
 
 getPayerDetails ()
 
 getPayerDetails ()
 
 getPlanId ()
 
 getPlanId ()
 
 getShippingAddress ()
 
 getShippingAddress ()
 
 getStartDate ()
 
 getStartDate ()
 
 setAgreementDetails (array $value)
 
 setAgreementDetails (array $value)
 
 setChargeModel (array $value)
 
 setChargeModel (array $value)
 
 setMerchantPreferences (array $value)
 
 setMerchantPreferences (array $value)
 
 setName ($value)
 
 setName ($value)
 
 setPayerDetails (array $value)
 
 setPayerDetails (array $value)
 
 setPlanId ($value)
 
 setPlanId ($value)
 
 setShippingAddress (array $value)
 
 setShippingAddress (array $value)
 
 setStartDate (\DateTime $value)
 
 setStartDate (\DateTime $value)
 
- Public Member Functions inherited from Omnipay\PayPal\Message\AbstractRestRequest
 getClientId ()
 
 getClientId ()
 
 getPayerId ()
 
 getPayerId ()
 
 getSecret ()
 
 getSecret ()
 
 getToken ()
 
 getToken ()
 
 sendData ($data)
 
 sendData ($data)
 
 setClientId ($value)
 
 setClientId ($value)
 
 setPayerId ($value)
 
 setPayerId ($value)
 
 setSecret ($value)
 
 setSecret ($value)
 
 setToken ($value)
 
 setToken ($value)
 
 toJSON ($data, $options=0)
 
 toJSON ($data, $options=0)
 
- Public Member Functions inherited from Omnipay\Common\Message\AbstractRequest
 __construct (ClientInterface $httpClient, HttpRequest $httpRequest)
 
 __construct (ClientInterface $httpClient, HttpRequest $httpRequest)
 
 formatCurrency ($amount)
 
 formatCurrency ($amount)
 
 getAmount ()
 
 getAmount ()
 
 getAmountInteger ()
 
 getAmountInteger ()
 
 getCancelUrl ()
 
 getCancelUrl ()
 
 getCard ()
 
 getCard ()
 
 getCardReference ()
 
 getCardReference ()
 
 getClientIp ()
 
 getClientIp ()
 
 getCurrency ()
 
 getCurrency ()
 
 getCurrencyDecimalPlaces ()
 
 getCurrencyDecimalPlaces ()
 
 getCurrencyNumeric ()
 
 getCurrencyNumeric ()
 
 getDescription ()
 
 getDescription ()
 
 getIssuer ()
 
 getIssuer ()
 
 getItems ()
 
 getItems ()
 
 getNotifyUrl ()
 
 getNotifyUrl ()
 
 getParameters ()
 
 getPaymentMethod ()
 
 getPaymentMethod ()
 
 getResponse ()
 
 getResponse ()
 
 getReturnUrl ()
 
 getReturnUrl ()
 
 getTestMode ()
 
 getTestMode ()
 
 getTransactionId ()
 
 getTransactionId ()
 
 getTransactionReference ()
 
 getTransactionReference ()
 
 initialize (array $parameters=array())
 
 initialize (array $parameters=array())
 
 send ()
 
 send ()
 
 setAmount ($value)
 
 setAmount ($value)
 
 setAmountInteger ($value)
 
 setCancelUrl ($value)
 
 setCancelUrl ($value)
 
 setCard ($value)
 
 setCard ($value)
 
 setCardReference ($value)
 
 setCardReference ($value)
 
 setClientIp ($value)
 
 setClientIp ($value)
 
 setCurrency ($value)
 
 setCurrency ($value)
 
 setDescription ($value)
 
 setDescription ($value)
 
 setIssuer ($value)
 
 setIssuer ($value)
 
 setItems ($items)
 
 setItems ($items)
 
 setMoney (Money $value)
 
 setNotifyUrl ($value)
 
 setNotifyUrl ($value)
 
 setPaymentMethod ($value)
 
 setPaymentMethod ($value)
 
 setReturnUrl ($value)
 
 setReturnUrl ($value)
 
 setTestMode ($value)
 
 setTestMode ($value)
 
 setTransactionId ($value)
 
 setTransactionId ($value)
 
 setTransactionReference ($value)
 
 setTransactionReference ($value)
 
 toFloat ($value)
 
 validate ()
 

Protected Member Functions

 createResponse ($data, $statusCode)
 
 createResponse ($data, $statusCode)
 
 getEndpoint ()
 
 getEndpoint ()
 
- Protected Member Functions inherited from Omnipay\PayPal\Message\AbstractRestRequest
 getHttpMethod ()
 
 getHttpMethod ()
 
- Protected Member Functions inherited from Omnipay\Common\Message\AbstractRequest
 getCurrencies ()
 
 getParameter ($key)
 
 setParameter ($key, $value)
 
 setParameter ($key, $value)
 

Additional Inherited Members

- Data Fields inherited from Omnipay\PayPal\Message\AbstractRestRequest
const API_VERSION = 'v1'
 
- Protected Attributes inherited from Omnipay\PayPal\Message\AbstractRestRequest
 $liveEndpoint = 'https://api.paypal.com'
 
 $payerId = null
 
 $testEndpoint = 'https://api.sandbox.paypal.com'
 
- Protected Attributes inherited from Omnipay\Common\Message\AbstractRequest
 $currencies
 
 $httpClient
 
 $httpRequest
 
 $negativeAmountAllowed = false
 
 $parameters
 
 $response
 
 $zeroAmountAllowed = true
 

Detailed Description

PayPal REST Create Subscription Request

Use this call to create a billing agreement for the buyer. The response for this call includes these HATEOAS links: an approval_url link and an execute link. Each returned link includes the token for the agreement.

For PayPal payments:

  • After successfully creating the agreement, direct the user to the approval_url on the PayPal site so that the user can approve the agreement.
  • Call the execute link to execute the billing agreement.

Note: Billing agreements for credit card payments execute automatically when created. There is no need for the user to approve the agreement or to execute the agreement.

Request Data

Pass the agreement details in the body of a POST call, including the following agreement object properties:

  • name (string). Required.
  • description (string). Required.
  • start_date (string). Format yyyy-MM-dd z, as defined in ISO8601. Required.
  • agreement_details (array)
  • payer (array). Required
  • shipping_address (array). Should be provided if it is different to the default address.
  • override_merchant_preferences (array).
  • override_charge_models (array).
  • plan (array). Required.

Example

// Create a gateway for the PayPal REST Gateway // (routes to GatewayFactory::create) $gateway = Omnipay::create('PayPal_Rest');

// Initialise the gateway $gateway->initialize(array( 'clientId' => 'MyPayPalClientId', 'secret' => 'MyPayPalSecret', 'testMode' => true, // Or false when you are ready for live transactions ));

// Do a create plan transaction on the gateway $transaction = $gateway->createPlan(array( 'name' => 'Test Plan', 'description' => 'A plan created for testing', 'type' => $gateway::BILLING_PLAN_TYPE_FIXED, 'paymentDefinitions' => [ [ 'name' => 'Monthly Payments for 12 months', 'type' => $gateway::PAYMENT_TRIAL, 'frequency' => $gateway::BILLING_PLAN_FREQUENCY_MONTH, 'frequency_interval' => 1, 'cycles' => 12, 'amount' => ['value' => 10.00, 'currency' => 'USD'], ], ], )); $response = $transaction->send(); if ($response->isSuccessful()) { echo "Create Plan transaction was successful!\n"; $plan_id = $response->getTransactionReference(); echo "Plan reference = " . $plan_id . "\n"; }

// Do a create subscription transaction on the gateway $transaction = $gateway->createSubscription(array( 'name' => 'Test Subscription', 'description' => 'A subscription created for testing', 'startDate' => new \DateTime(), // now 'planId' => $plan_id, 'payerDetails => ['payment_method' => 'paypal'], )); $response = $transaction->send(); if ($response->isSuccessful()) { echo "Create Subscription transaction was successful!\n"; if ($response->isRedirect()) { echo "Response is a redirect\n"; echo "Redirect URL = " . $response->getRedirectUrl(); $subscription_id = $response->getTransactionReference(); echo "Subscription reference = " . $subscription_id; } }

Request Sample

This is from the PayPal web site:

curl -v POST https://api.sandbox.paypal.com/v1/payments/billing-agreements \ -H 'Content-Type:application/json' \ -H 'Authorization: Bearer <Access-Token>' \ -d '{ "name": "T-Shirt of the Month Club Agreement", "description": "Agreement for T-Shirt of the Month Club Plan", "start_date": "2015-02-19T00:37:04Z", "plan": { "id": "P-94458432VR012762KRWBZEUA" }, "payer": { "payment_method": "paypal" }, "shipping_address": { "line1": "111 First Street", "city": "Saratoga", "state": "CA", "postal_code": "95070", "country_code": "US" } }' }'

Response Sample

This is from the PayPal web site:

{ "name": "T-Shirt of the Month Club Agreement", "description": "Agreement for T-Shirt of the Month Club Plan", "plan": { "id": "P-94458432VR012762KRWBZEUA", "state": "ACTIVE", "name": "T-Shirt of the Month Club Plan", "description": "Template creation.", "type": "FIXED", "payment_definitions": [ { "id": "PD-50606817NF8063316RWBZEUA", "name": "Regular Payments", "type": "REGULAR", "frequency": "Month", "amount": { "currency": "USD", "value": "100" }, "charge_models": [ { "id": "CHM-92S85978TN737850VRWBZEUA", "type": "TAX", "amount": { "currency": "USD", "value": "12" } }, { "id": "CHM-55M5618301871492MRWBZEUA", "type": "SHIPPING", "amount": { "currency": "USD", "value": "10" } } ], "cycles": "12", "frequency_interval": "2" } ], "merchant_preferences": { "setup_fee": { "currency": "USD", "value": "1" }, "max_fail_attempts": "0", "return_url": "http://www.return.com", "cancel_url": "http://www.cancel.com", "auto_bill_amount": "YES", "initial_fail_amount_action": "CONTINUE" } }, "links": [ { "href": "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-0JP008296V451950C", "rel": "approval_url", "method": "REDIRECT" }, { "href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/EC-0JP008296V451950C/agreement-execute", "rel": "execute", "method": "POST" } ], "start_date": "2015-02-19T00:37:04Z" }

Known Issues

PayPal subscription payments cannot be refunded. PayPal is working on this functionality for their future API release. In order to refund a PayPal subscription payment, you will need to use the PayPal web interface to refund it manually.

RestCreatePlanRequest Omnipay PayPal REST Create Subscription Request Use this call to create a billing agreement for the buyer. The response for this call includes these HATEOAS links: an approval_url link and an execute link. Each returned link includes the token for the agreement. For PayPal payments: After successfully creating the agreement, direct the user to the approval_url on the PayPal site so that the user can approve the agreement.Call the execute link to execute the billing agreement. Note: Billing agreements for credit card payments execute automatically when created. There is no need for the user to approve the agreement or to execute the agreement. autotoc_md76 Request Data Pass the agreement details in the body of a POST call, including the following agreement object properties: name (string). Required.description (string). Required.start_date (string). Format yyyy-MM-dd z, as defined in ISO8601. Required.agreement_details (array)payer (array). Requiredshipping_address (array). Should be provided if it is different to the default address.override_merchant_preferences (array).override_charge_models (array).plan (array). Required. autotoc_md77 Example // Create a gateway for the PayPal REST Gateway // (routes to GatewayFactory::create) $gateway = Omnipay::create('PayPal_Rest'); // Initialise the gateway $gateway->initialize(array( 'clientId' => 'MyPayPalClientId', 'secret' => 'MyPayPalSecret', 'testMode' => true, // Or false when you are ready for live transactions )); // Do a create plan transaction on the gateway $transaction = $gateway->createPlan(array( 'name' => 'Test Plan', 'description' => 'A plan created for testing', 'type' => $gateway::BILLING_PLAN_TYPE_FIXED, 'paymentDefinitions' => [ [ 'name' => 'Monthly Payments for 12 months', 'type' => $gateway::PAYMENT_TRIAL, 'frequency' => $gateway::BILLING_PLAN_FREQUENCY_MONTH, 'frequency_interval' => 1, 'cycles' => 12, 'amount' => ['value' => 10.00, 'currency' => 'USD'], ], ], )); $response = $transaction->send(); if ($response->isSuccessful()) { echo "Create Plan transaction was successful!\n"; $plan_id = $response->getTransactionReference(); echo "Plan reference = " . $plan_id . "\n"; } // Do a create subscription transaction on the gateway $transaction = $gateway->createSubscription(array( 'name' => 'Test Subscription', 'description' => 'A subscription created for testing', 'startDate' => new (), // now 'planId' => $plan_id, 'payerDetails => ['payment_method' => 'paypal'], )); $response = $transaction->send(); if ($response->isSuccessful()) { echo "Create Subscription transaction was successful!\n"; if ($response->isRedirect()) { echo "Response is a redirect\n"; echo "Redirect URL = " . $response->getRedirectUrl(); $subscription_id = $response->getTransactionReference(); echo "Subscription reference = " . $subscription_id; } } autotoc_md78 Request Sample This is from the PayPal web site: curl -v POST https://api.sandbox.paypal.com/v1/payments/billing-agreements \ -H 'Content-Type:application/json' \ -H 'Authorization: Bearer <Access-Token>' \ -d '{ "name": "T-Shirt of the Month Club Agreement", "description": "Agreement for T-Shirt of the Month Club Plan", "start_date": "2015-02-19T00:37:04Z", "plan": { "id": "P-94458432VR012762KRWBZEUA" }, "payer": { "payment_method": "paypal" }, "shipping_address": { "line1": "111 First Street", "city": "Saratoga", "state": "CA", "postal_code": "95070", "country_code": "US" } }' }' autotoc_md79 Response Sample This is from the PayPal web site: { "name": "T-Shirt of the Month Club Agreement", "description": "Agreement for T-Shirt of the Month Club Plan", "plan": { "id": "P-94458432VR012762KRWBZEUA", "state": "ACTIVE", "name": "T-Shirt of the Month Club Plan", "description": "Template creation.", "type": "FIXED", "payment_definitions": [ { "id": "PD-50606817NF8063316RWBZEUA", "name": "Regular Payments", "type": "REGULAR", "frequency": "Month", "amount": { "currency": "USD", "value": "100" }, "charge_models": [ { "id": "CHM-92S85978TN737850VRWBZEUA", "type": "TAX", "amount": { "currency": "USD", "value": "12" } }, { "id": "CHM-55M5618301871492MRWBZEUA", "type": "SHIPPING", "amount": { "currency": "USD", "value": "10" } } ], "cycles": "12", "frequency_interval": "2" } ], "merchant_preferences": { "setup_fee": { "currency": "USD", "value": "1" }, "max_fail_attempts": "0", "return_url": "http://www.return.com", "cancel_url": "http://www.cancel.com", "auto_bill_amount": "YES", "initial_fail_amount_action": "CONTINUE" } }, "links": [ { "href": "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-0JP008296V451950C", "rel": "approval_url", "method": "REDIRECT" }, { "href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/EC-0JP008296V451950C/agreement-execute", "rel": "execute", "method": "POST" } ], "start_date": "2015-02-19T00:37:04Z" } autotoc_md80 Known Issues PayPal subscription payments cannot be refunded. PayPal is working on this functionality for their future API release. In order to refund a PayPal subscription payment, you will need to use the PayPal web interface to refund it manually. https://developer.paypal.com/docs/api/#create-an-agreement RestCreatePlanRequest Omnipay

Definition at line 211 of file lib/vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

Member Function Documentation

◆ createResponse() [1/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::createResponse (   $data,
  $statusCode 
)
protected

◆ createResponse() [2/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::createResponse (   $data,
  $statusCode 
)
protected

◆ getAgreementDetails() [1/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::getAgreementDetails ( )

Get the agreement details

See the class documentation and the PayPal REST API documentation for a description of the array elements.

Returns
array https://developer.paypal.com/docs/api/#agreementdetails-object

Definition at line 285 of file lib/vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\getParameter().

Referenced by Omnipay\PayPal\Message\RestCreateSubscriptionRequest\getData().

◆ getAgreementDetails() [2/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::getAgreementDetails ( )

Get the agreement details

See the class documentation and the PayPal REST API documentation for a description of the array elements.

Returns
array https://developer.paypal.com/docs/api/#agreementdetails-object

Definition at line 285 of file vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\getParameter().

◆ getChargeModel() [1/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::getChargeModel ( )

Get charge model to override the plan charge model

See the class documentation and the PayPal REST API documentation for a description of the array elements.

Returns
array https://developer.paypal.com/docs/api/#overridechargemodel-object

Definition at line 401 of file vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\getParameter().

◆ getChargeModel() [2/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::getChargeModel ( )

Get charge model to override the plan charge model

See the class documentation and the PayPal REST API documentation for a description of the array elements.

Returns
array https://developer.paypal.com/docs/api/#overridechargemodel-object

Definition at line 401 of file lib/vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\getParameter().

Referenced by Omnipay\PayPal\Message\RestCreateSubscriptionRequest\getData().

◆ getData() [1/2]

◆ getData() [2/2]

◆ getEndpoint() [1/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::getEndpoint ( )
protected

Get transaction endpoint.

Subscriptions are created using the /billing-agreements resource.

Returns
string

Reimplemented from Omnipay\PayPal\Message\AbstractRestRequest.

Definition at line 448 of file vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

◆ getEndpoint() [2/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::getEndpoint ( )
protected

Get transaction endpoint.

Subscriptions are created using the /billing-agreements resource.

Returns
string

Reimplemented from Omnipay\PayPal\Message\AbstractRestRequest.

Definition at line 448 of file lib/vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

◆ getMerchantPreferences() [1/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::getMerchantPreferences ( )

Get preferences to override the plan merchant preferences

See the class documentation and the PayPal REST API documentation for a description of the array elements.

Returns
array https://developer.paypal.com/docs/api/#merchantpreferences-object

Definition at line 372 of file vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\getParameter().

◆ getMerchantPreferences() [2/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::getMerchantPreferences ( )

Get preferences to override the plan merchant preferences

See the class documentation and the PayPal REST API documentation for a description of the array elements.

Returns
array https://developer.paypal.com/docs/api/#merchantpreferences-object

Definition at line 372 of file lib/vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\getParameter().

Referenced by Omnipay\PayPal\Message\RestCreateSubscriptionRequest\getData().

◆ getName() [1/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::getName ( )

◆ getName() [2/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::getName ( )

◆ getPayerDetails() [1/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::getPayerDetails ( )

Get the payer details

See the class documentation and the PayPal REST API documentation for a description of the array elements.

Returns
array https://developer.paypal.com/docs/api/#payer-object

Definition at line 314 of file lib/vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\getParameter().

Referenced by Omnipay\PayPal\Message\RestCreateSubscriptionRequest\getData().

◆ getPayerDetails() [2/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::getPayerDetails ( )

Get the payer details

See the class documentation and the PayPal REST API documentation for a description of the array elements.

Returns
array https://developer.paypal.com/docs/api/#payer-object

Definition at line 314 of file vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\getParameter().

◆ getPlanId() [1/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::getPlanId ( )

◆ getPlanId() [2/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::getPlanId ( )

◆ getShippingAddress() [1/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::getShippingAddress ( )

Get the shipping address

See the class documentation and the PayPal REST API documentation for a description of the array elements.

Returns
array https://developer.paypal.com/docs/api/#address-object

Definition at line 343 of file vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\getParameter().

◆ getShippingAddress() [2/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::getShippingAddress ( )

Get the shipping address

See the class documentation and the PayPal REST API documentation for a description of the array elements.

Returns
array https://developer.paypal.com/docs/api/#address-object

Definition at line 343 of file lib/vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\getParameter().

Referenced by Omnipay\PayPal\Message\RestCreateSubscriptionRequest\getData().

◆ getStartDate() [1/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::getStartDate ( )

◆ getStartDate() [2/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::getStartDate ( )

Get the agreement start date

Returns
\DateTime

Definition at line 260 of file vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\getParameter().

◆ setAgreementDetails() [1/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::setAgreementDetails ( array  $value)

Set the agreement details

See the class documentation and the PayPal REST API documentation for a description of the array elements.

Parameters
array$value
Returns
RestCreateSubscriptionRequest provides a fluent interface. https://developer.paypal.com/docs/api/#agreementdetails-object

Definition at line 300 of file vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\setParameter().

◆ setAgreementDetails() [2/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::setAgreementDetails ( array  $value)

Set the agreement details

See the class documentation and the PayPal REST API documentation for a description of the array elements.

Parameters
array$value
Returns
RestCreateSubscriptionRequest provides a fluent interface. https://developer.paypal.com/docs/api/#agreementdetails-object

Definition at line 300 of file lib/vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\setParameter().

◆ setChargeModel() [1/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::setChargeModel ( array  $value)

Set preferences to override the plan merchant preferences

See the class documentation and the PayPal REST API documentation for a description of the array elements.

Parameters
array$value
Returns
RestCreateSubscriptionRequest provides a fluent interface. https://developer.paypal.com/docs/api/#merchantpreferences-object

Definition at line 416 of file vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\setParameter().

◆ setChargeModel() [2/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::setChargeModel ( array  $value)

Set preferences to override the plan merchant preferences

See the class documentation and the PayPal REST API documentation for a description of the array elements.

Parameters
array$value
Returns
RestCreateSubscriptionRequest provides a fluent interface. https://developer.paypal.com/docs/api/#merchantpreferences-object

Definition at line 416 of file lib/vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\setParameter().

◆ setMerchantPreferences() [1/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::setMerchantPreferences ( array  $value)

Set preferences to override the plan merchant preferences

See the class documentation and the PayPal REST API documentation for a description of the array elements.

Parameters
array$value
Returns
RestCreateSubscriptionRequest provides a fluent interface. https://developer.paypal.com/docs/api/#merchantpreferences-object

Definition at line 387 of file vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\setParameter().

◆ setMerchantPreferences() [2/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::setMerchantPreferences ( array  $value)

Set preferences to override the plan merchant preferences

See the class documentation and the PayPal REST API documentation for a description of the array elements.

Parameters
array$value
Returns
RestCreateSubscriptionRequest provides a fluent interface. https://developer.paypal.com/docs/api/#merchantpreferences-object

Definition at line 387 of file lib/vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\setParameter().

◆ setName() [1/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::setName (   $value)

Set the agreement name

Parameters
string$value
Returns
RestCreateSubscriptionRequest provides a fluent interface.

Definition at line 229 of file vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\setParameter().

◆ setName() [2/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::setName (   $value)

Set the agreement name

Parameters
string$value
Returns
RestCreateSubscriptionRequest provides a fluent interface.

Definition at line 229 of file lib/vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\setParameter().

◆ setPayerDetails() [1/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::setPayerDetails ( array  $value)

Set the payer details

See the class documentation and the PayPal REST API documentation for a description of the array elements.

Parameters
array$value
Returns
RestCreateSubscriptionRequest provides a fluent interface. https://developer.paypal.com/docs/api/#payer-object

Definition at line 329 of file lib/vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\setParameter().

◆ setPayerDetails() [2/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::setPayerDetails ( array  $value)

Set the payer details

See the class documentation and the PayPal REST API documentation for a description of the array elements.

Parameters
array$value
Returns
RestCreateSubscriptionRequest provides a fluent interface. https://developer.paypal.com/docs/api/#payer-object

Definition at line 329 of file vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\setParameter().

◆ setPlanId() [1/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::setPlanId (   $value)

Set the plan ID

Parameters
string$value
Returns
RestCreateSubscriptionRequest provides a fluent interface.

Definition at line 250 of file lib/vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\setParameter().

◆ setPlanId() [2/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::setPlanId (   $value)

Set the plan ID

Parameters
string$value
Returns
RestCreateSubscriptionRequest provides a fluent interface.

Definition at line 250 of file vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\setParameter().

◆ setShippingAddress() [1/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::setShippingAddress ( array  $value)

Set the shipping address

See the class documentation and the PayPal REST API documentation for a description of the array elements.

Parameters
array$value
Returns
RestCreateSubscriptionRequest provides a fluent interface. https://developer.paypal.com/docs/api/#address-object

Definition at line 358 of file vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\setParameter().

◆ setShippingAddress() [2/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::setShippingAddress ( array  $value)

Set the shipping address

See the class documentation and the PayPal REST API documentation for a description of the array elements.

Parameters
array$value
Returns
RestCreateSubscriptionRequest provides a fluent interface. https://developer.paypal.com/docs/api/#address-object

Definition at line 358 of file lib/vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\setParameter().

◆ setStartDate() [1/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::setStartDate ( \DateTime  $value)

Set the agreement start date

Parameters
\DateTime$value
Returns
RestCreateSubscriptionRequest provides a fluent interface.

Definition at line 271 of file vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\setParameter().

◆ setStartDate() [2/2]

Omnipay\PayPal\Message\RestCreateSubscriptionRequest::setStartDate ( \DateTime  $value)

Set the agreement start date

Parameters
\DateTime$value
Returns
RestCreateSubscriptionRequest provides a fluent interface.

Definition at line 271 of file lib/vendor/omnipay/paypal/src/Message/RestCreateSubscriptionRequest.php.

References Omnipay\Common\Message\AbstractRequest\setParameter().


The documentation for this class was generated from the following file: