PayPalInAppPurchases ClassDelta Engine Documentation
Inheritance Hierarchy

System Object
  DeltaEngine.Platforms InAppPurchase
    DeltaEngine.InAppPurchase.PayPal PayPalInAppPurchases

Namespace: DeltaEngine.InAppPurchase.PayPal
Assembly: DeltaEngine.InAppPurchase.PayPal (in DeltaEngine.InAppPurchase.PayPal.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public class PayPalInAppPurchases : InAppPurchase

The PayPalInAppPurchases type exposes the following members.

Constructors

  NameDescription
Public methodPayPalInAppPurchases
Initializes a new instance of the PayPalInAppPurchases class
Top
Methods

  NameDescription
Public methodInvokeOnReceivedProductInformation (Inherited from InAppPurchase.)
Public methodInvokeOnTransactionFinished (Inherited from InAppPurchase.)
Public methodInvokeOnUserCanceled (Inherited from InAppPurchase.)
Public methodPurchaseProductAsync (Overrides InAppPurchase PurchaseProductAsync(ProductData).)
Public methodRequestProductInformationAsync (Overrides InAppPurchase RequestProductInformationAsync( Int32 ).)
Top
Events

  NameDescription
Public eventOnReceivedProductInformation (Inherited from InAppPurchase.)
Public eventOnTransactionFinished (Inherited from InAppPurchase.)
Public eventOnUserCanceled (Inherited from InAppPurchase.)
Top
Remarks

Tests: DeltaEngine.InAppPurchase.PayPal.Tests.PayPalInAppPurchasesTests
Examples

3 unit tests call DeltaEngine.InAppPurchase.PayPal.PayPalInAppPurchases
[Test]
public void CreateInstance()
{
    Assert.DoesNotThrow(() => GetPayPalInAppPurchases());
}
[Test]
public void GeneratePaymentLink()
{
    const string ExpectedLink = "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=" +
        "payments@example.com&lc=DE&item_name=testId&currency_code=EUR&amount=1.99&bn=PP%2dDonationsBF";
    var inAppPurchase = GetPayPalInAppPurchases();
    Assert.AreEqual(inAppPurchase.GeneratePaymentLink(GetTestProductData()), ExpectedLink);
}
[Test, Ignore]
public void PurchaseProductOpenWebBrowser()
{
    var inAppPurchase = GetPayPalInAppPurchases();
    inAppPurchase.PurchaseProductAsync(GetTestProductData());
}
See Also