Product Cards

Embed products in your own user interfaceAnchorIcon

A product card is a simple view that easily allows users to find and buy products within the existing structure of your app. It displays the product name, image, description, cost, and a buy button that initiates a purchase. The SDK fetches up-to-date product information from our API and populates the view.

Add a product card to your appAnchorIcon

These are views that take a search term as input. To embed a product card into your app:
  1. Objective-C
CGRect rect = CGRectMake(0, 0, 320, 80);
NSString *searchTerm = @"ninja cats";
PPCProductCardView *productCardView = [PayPalCommerce productCardViewWithFrame:rect
                                                                    searchTerm:searchTerm
                                                                    completion:^(BOOL success, NSError *error) {

}];
[self.view addSubview:productCardView];
Alternatively, if you want to find a product by its group ID:
  1. Objective-C
CGRect rect = CGRectMake(0, 0, 320, 80);
NSString *productGroupID = @""; //use one of your product group IDs
PPCProductCardView *productCardView = [PayPalCommerce productCardViewWithFrame:rect
                                                                productGroupID:productGroupID
                                                                    completion:^(BOOL success, NSError *error) {

}];
[self.view addSubview:productCardView];

Purchase flow from a product card in a content-based appAnchorIcon

You can render a product view within your own app, which allows your users to initiate a purchase.
Product,CardPurchase,ConfirmationReceipt

Display and purchase a product from your app with your own UIAnchorIcon

You can also display product information and initiate a purchase using your own UI by fetching a PPCProduct object and executing a purchase on it per some user action.
  1. Objective-C
[PayPalCommerce fetchProductWithGroupID:@""
                             completion:^(PPCProduct *product, NSError *error){
        //display something notifying what they're buying
}];
Then once the user initiates a purchase, you would call:
  1. Objective-C
[PayPalCommerce purchaseProduct:product];

Purchase flow from your own UI in a content-based appAnchorIcon

Custom,UI,PurchasePurchase,ConfirmationReceipt