PayPal Integrator V5 - Online Help
PayPal Integrator V5
Questions / Feedback?

BillingAgreements Property

BillingAgreements is an array that contains a list of billing agreements to be created.

Syntax

[VB.NET]
Public Property BillingAgreements As String()

[C#]
public string[] BillingAgreements {get; set;}

Remarks

This property contains an array which lists the description of billing agreements to be created. It should only be used when calling SetCheckout to create new billing agreements that will be used by the RecurringPayments component to create a new profile.

Each index in the array specifies the description for a separate billing agreement to create an express checkout for. In order to use this checkout when CreateProfile is called, the description included in the new profile must match the one in this array. Additionally, the ResponseToken must be saved and included as well.

If there are direct payment items included in the checkout, payment for those items must be completed before creating the recurring payments profile. Also, the customer must accept the billing agreement from the location provided in the example below.

The following example shows how to successfully use this property when creating a new recurring payments profile:

  ExpressCheckout1.OrderTotal = "0"
  ExpressCheckout1.ReturnURL = "http://localhost"
  ExpressCheckout1.CancelURL = "http://localhost"
  ExpressCheckout1.BillingAgreements = new String[1]
  ExpressCheckout1.BillingAgreements[0] = "My Description"
  ExpressCheckout1.SetCheckout()
The customer must now login and accept the Billing Agreement before creating the actual profile or the CreateProfile() call will fail. The customer may accept the agreement from the site that is created by substituting the actual ResponseToken in the following URL:

URL: https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_customer-billing-agreement&token=PUT_TOKEN_HERE

Once the customer has been redirected to the above URL and accepted the billing agreement, the following code will create a new profile:

  RecurringPayments1.Token = ExpressCheckout1.ResponseToken
  RecurringPayments1.Description = "My Description"
  RecurringPayments1.BillingDetails.Period = BillingPeriods.bpMonth
  RecurringPayments1.BillingDetails.Frequency = "12"
  RecurringPayments1.BillingDetails.Amount = "12.01"
  RecurringPayments1.BillingDetails.StartDate = "2009-08-25T07:00:00Z"
  RecurringPayments1.CreateProfile()
Note that the BillingAgreements value and the Description must match for the profile to be successfully created.

Default Value

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 5.0.6240.0