Class PayLater

java.lang.Object
paypal.payflow.PayLater

public class PayLater extends Object
PayPal Pay Later is a new, convenient, and secure service that allows you to offer your customers promotional financing. Buyers that choose the promotional offer can defer payments for purchases on participating merchant web sites, allowing them to shop now and pay later. *

The PayPal Pay Later service allows online merchants to offer promotional financing to buyers at checkout - even if a buyer doesn't have a PayPal account. Promotional offers, such as no payments for 90 days, give merchants new and powerful ways to market to online shoppers.

................. // Following example shows how to use Pay Later. PayLater setPayLater = new PayLater(); setPayLater.setshippingMethod("UPSGround"); setPayLater.setproductCategory("E"); // Camera and Photos setPayLater.setpromoCodeOverride("1"); setPayLater.setpaypalCheckoutBtnType("P"); // You can combine up to 10 promotions for PayPal Promotional Financing. // L_PROMOCODE0 PayLaterLineItem setPayLaterLineItem = new PayLaterLineItem(); setPayLaterLineItem.setpromoCode("101"); setPayLater.PayLaterAddLineItem(setPayLaterLineItem); // L_PROMOCODE1 PayLaterLineItem setPayLaterLineItem1 = new PayLaterLineItem(); setPayLaterLineItem1.setpromoCode("102"); setPayLater.PayLaterAddLineItem(setPayLaterLineItem1); .................

  • Constructor Details

    • PayLater

      public PayLater()
      Constructor. This is a default constructor which does not take any parameters. *
  • Method Details

    • PayLaterAddLineItem

      public void PayLaterAddLineItem(PayLaterLineItem item)
      Adds a promo code to promo code list.
      Parameters:
      item - PayLaterLineItem object

      Use this method to add a promo code to the request. A promotion code for PayPal Promotional Financing where n is a value from 0 to 9. The first promotion must be specified as L_PROMOCODE0. Combine promotions by using additonal parameters, such as L_PROMOCODE1 and L_PROMOCODE2

      ................. // setPayLaterLineItem is the PayLaterLineItem object. ................. // Create new Promo Code or Codes. You can combine up to 10 promotions. // First promo code, L_PROMOCODE0 PayLaterLineItem setPayLaterLineItem = new PayLaterLineItem(); setPayLaterLineItem.setpromoCode("101"); setPayLater.PayLaterAddLineItem(setPayLaterLineItem); // Additional promo code (if needed), L_PROMOCODE1. All addtional codes created in // this manner. PayLaterLineItem setPayLaterLineItem1 = new PayLaterLineItem(); setPayLaterLineItem1.setpromoCode("102"); setPayLater.PayLaterAddLineItem(setPayLaterLineItem1); .................

    • PayLaterRemoveLineItem

      public void PayLaterRemoveLineItem(int index)
      Removes a line item from line item list.
      Parameters:
      index - Index of promo code to be removed.

      Use this method to remove a promo code at a particular index in the requestr.

      ................. // setPayLater is the PayLater object ................. // Remove promo code at index 0 setPayLater.PayLaterRemoveLineItem(0); .................

    • PayLaterRemoveAllLineItems

      public void PayLaterRemoveAllLineItems()
      Clears the promo code list.

      Use this method to clear all the promo codes added to the request.

      ................. // setPayLater is the PayLater object ................. // Remove all promo codes. setPayLater.PayLaterRemoveAllLineItems(); .................

    • generateRequest

      protected void generateRequest()
    • getshippingMethod

      public String getshippingMethod()
      Gets the shippingMethod

      Use this to get the Shipping method for this transaction.

      Returns:
      String

      Maps to Payflow Parameter: SHIPPINGMETHOD

    • setshippingMethod

      public void setshippingMethod(String shippingMethod)
      Sets the shippingMethod

      Use this method to set the Shipping method for this transaction.

      Parameters:
      shippingMethod - String

      Maps to Payflow Parameter: SHIPPINGMETHOD

    • getpromoCodeOverride

      public String getpromoCodeOverride()
      Gets Promo Code Override

      Value is 0 or 1. Default value is 0. Set to 1 to override promotions from Set Express Checkout request. Otherwise, promotions will not be overridden.

      Returns:
      String

      Maps to Payflow Parameter: PROMOCODEOVERRIDE

    • setpromoCodeOverride

      public void setpromoCodeOverride(String promoCodeOverride)
      Sets Promo Code Override

      Value is 0 or 1. Default value is 0. Set to 1 to override promotions from Set Express Checkout request. Otherwise, promotions will not be overridden.

      Parameters:
      promoCodeOverride - String

      Maps to Payflow Parameter: PROMOCODEOVERRIDE

    • getprofileAddressChangeDate

      public String getprofileAddressChangeDate()
      Gets Profile Address Change Date

      The last date that the billing address stored in the customer's profile with the merchant was changed. The date must be in UTC/GMT format. For example, 2007-12-15T17:23:15Z.

      Returns:
      String

      Maps to Payflow Parameter: PROFILEADDRESSCHANGEDATE

    • setprofileAddressChangeDate

      public void setprofileAddressChangeDate(String profileAddressChangeDate)
      Sets Profile Address Change Date

      The last date that the billing address stored in the customer's profile with the merchant was changed. The date must be in UTC/GMT format. For example, 2007-12-15T17:23:15Z.

      Parameters:
      profileAddressChangeDate - String

      Maps to Payflow Parameter: PROFILEADDRESSCHANGEDATE

    • getpaypalCheckoutBtnType

      public String getpaypalCheckoutBtnType()
      Gets the PayPal Checkout Button Type

      Only for the No payment 90 days button, you must set this variable to P, which allows PayPal to make 90 days no payments the default payment option in the PayPal checkout flow.

      Returns:
      String

      Maps to Payflow Parameter: PAYPALCHECKOUTBTNTYPE

    • setpaypalCheckoutBtnType

      public void setpaypalCheckoutBtnType(String paypalCheckoutBtnType)
      Sets the PayPal Checkout Button Type

      Only for the No payment 90 days button, you must set this variable to P, which allows PayPal to make 90 days no payments the default payment option in the PayPal checkout flow.

      Parameters:
      paypalCheckoutBtnType - String

      Maps to Payflow Parameter: PAYPALCHECKOUTBTNTYPE

    • getproductCategory

      public String getproductCategory()
      Gets the Product Category.

      The product category for this order. If the customer's cart contains more than one item, use the product category for the most expensive item.

      Returns:
      String

      Maps to Payflow Parameter: PRODUCTCATEGORY

    • setproductCategory

      public void setproductCategory(String productCategory)
      Sets the Product Category.

      The product category for this order. If the customer's cart contains more than one item, use the product category for the most expensive item.

      Parameters:
      productCategory - String

      Maps to Payflow Parameter: PRODUCTCATEGORY

    • getContext

      protected Context getContext()
    • setContext

      protected void setContext(Context context)
    • getRequestBuffer

      protected StringBuffer getRequestBuffer()
      Gets the Requestbuffer used for creating the actual request string.
      Returns:
      mRequestBuffer StringBuffer
    • setRequestBuffer

      protected void setRequestBuffer(StringBuffer value)
      sets the StringBuffer to hold the request string.
      Parameters:
      value - StringBuffer