SlideShare ist ein Scribd-Unternehmen logo
1 von 64
Oliver Scheer
Senior Technical Evangelist
Microsoft Deutschland
http://the-oliver.com
Wallet Support and
In App Purchasing in
Windows Phone 8
Topics
• Wallet Overview
• Applications and wallet storage
• Wallet capabilities
• Creating and using a membership card
• Creating the card
• The Wallet Background Agent
• Creating and using a payment instrument card
• In App Purchases
• Adding products to your application
• Durable and Consumable items
• The purchase lifecycle
• The Application Programmer Interface
• Finding products
• Purchasing products
• Using product receipts
Wallet Overview
3
Windows Phone Wallet
• The Wallet is implemented as part of the Windows Phone
operating system
• The Wallet acts as a container for applications that can
store membership information and transaction data for
paid services
• The wallet provides an additional launching point for an
application
• The launch can be via a deep link to a page describing a
particular offer or service
3/19/2014‹#›
Wallet Storage
• Wallet information is held on a per-application basis
• An application can only interact with its own wallet
storage
• Each application will store information relating to the
services provided via that application
• Special offers
• Transactions
• Membership information
• Custom fields for that particular application
3/19/2014‹#›
Opening the Wallet
• The Wallet is supplied as part of the Windows Phone
• Users can store details of membership cards in the wallet
• These are linked to “wallet aware” applications on the phone
• The membership cards can be credit or debit cards, or any form
of membership tracking that you wish to add to your
application
• This includes transaction support and also allows you to alert
the user to any special offers or promotions associated with a
card
Storing data in the Wallet
• Users can store details of their cards inside the wallet
• They can add as many sets of card details as they like and the
wallet will store the details securely
• Each card is associated with an application that manages
transactions on that card
• They can PIN protect access to the wallet
• The wallet PIN can also be used to control access to Windows
Phone Store purchases
Navigating the Phone Wallet
• When the user opens the wallet they are shown a list of
all the cards that have been placed in there
• Each of the cards is bound to the application behind it
• When the card is opened the user has the option to start
the application behind that card
• This provides another way in which your application can
get started
• Uses can open their wallet, find your membership card
and run your application from there
3/19/2014‹#›
Using a Card
• When a user opens a card they can view the data for the card and
see their account information
• This is displayed by the Wallet
• They can also open the application from the Wallet entry
• A player could enter your multiplayer game from their wallet,
which would be the place you would store their user credentials
• The wallet also displays app supplied fields, for example balance
information
• This is text provided by the application behind the wallet
• It can also display transaction information for cards which are
payment instruments
3/19/20149
Adding a New Card
• The user can add a new card by tapping the + in the
application bar
• They can also search for existing cards in the wallet
• Each card is identified by the first six digits of the card
number
• Once you have created a card you can then search for
applications that can perform transactions on that card
• If an application is found the card is then bound to that
application
3/19/201410
Adding a New Card via an Application
• Cards are only useful once they have been bound to
applications
• Card providers can create applications that are bound to
cards in the wallet
• The Wallet program provides a menu of applications from
“well known” card providers
• A user can create a card from one of these applications
• Your applications can also create cards for storage in the
wallet
3/19/201411
Adding Cards from within Applications
• Cards are linked with the applications that use them
• The app code must create and populate a
WalletTransactionItem instance and pass that to the
AddWalletItemTask which handles the storage in the
Wallet
• A WalletTransactionItem object contains a number
of standard fields
• Applications can add their own custom fields for their
own use
• Only the application that is bound to a card can access
the information in the card
3/19/201412
Adding Cards from within Applications
• It is not possible for a card to be added to a wallet
without the user approving the action
• This prevents applications from “spamming” the wallet
with large numbers of cards
• The wallet also provides a means by which a user can
delete a card that they no longer use
3/19/201413
Wallet Enabled Applications
• A wallet application does not have to just manipulate money
• It could be any kind of club membership
• The wallet could contain membership details and any custom data about the club
• Each wallet entry can also store customised data for that application
• Achievements in a game, permission levels, responsibilities, etc
• Once an application is registered with the wallet it will appear alongside all the other
applications in the wallet
3/19/201414
Creating and using
a membership card
15
Wallet Applications and Capabilities
• If an application just wishes to use the Wallet to
store membership details and transaction logs it
just needs to enable the ID_CAP_WALLET
capability
• Any application can do this
• To use the payment instruments and store secure
elements in published applications you will have to
have those permissions added to your account
• Contact the Dev Center Support team to do this
3/19/201416
Creating a Wallet entry for an application
3/19/201417
WalletTransactionItem membershipItem;
membershipItem = new WalletTransactionItem("Membership");
membershipItem.IssuerName = issuer.IssuerName;
membershipItem.DisplayName = issuer.IssuerName + " Membership Card";
membershipItem.IssuerPhone.Business = issuer.IssuerPhone;
membershipItem.CustomerName = details.CustomerName;
membershipItem.AccountNumber = details.MembershipNumber;
membershipItem.BillingPhone = details.PhoneNumber;
membershipItem.IssuerWebsite = new Uri(issuer.IssuerWebSite);
membershipItem.DisplayAvailableBalance = "1000 points";
membershipItem.Logo336x336 = new BitmapImage(new Uri("/images/BrSml.png", …));
membershipItem.Logo159x159 = new BitmapImage(new Uri("/images/BrMed.png", …));
membershipItem.Logo336x336 = new BitmapImage(new Uri("/images/BrLge.png", …));
AddWalletItemTask addWalletItemTask = new AddWalletItemTask();
addWalletItemTask.Item = membershipItem;
addWalletItemTask.Show();
Demo
Demo 1: Creating a Club
Simple Wallet Use
• If you just want to store and manage membership information for your application the
wallet is a good way to do this
• Users can find and run your application from the Wallet
• The application can update the wallet membership properties to display information about
the status of the user
• This can be done simply by updating the text properties of the wallet information
• This will then be reflected in the wallet display
3/19/201419
The Wallet
Background Agent
20
The Wallet Background Agent
• Applications that use the wallet can also create a
Background Agent that can update the wallet on the phone
when the application is not being used
• The agent will also run when the user refreshes the card
from the Wallet
• Your application can use this in lots of different ways
• Update a list of transactions
• Inform the user of special offers
• Manage membership expiry
3/19/201421
Special Offer Display
• Special offers are displayed right next to the card details
• If the user activates the offer it will perform a deep link
activation of the application that can take the user directly
to the page for that offer
• The deep link is set by the background agent, so that the
application can identify the offer that has been made
3/19/201422
Creating a Wallet Agent
• A Wallet Agent works in a very similar way to other background tasks
• There is no template for the creation of the agent project
• Instead you have to create the agent as a class library and add it to the application
solution
3/19/201423
The Wallet Agent Project
• This is added to the solution just as with other agents
• The project output also needs to be added to the references of the application
3/19/201424
Adding the Wallet Background Task
• To link the agent to the application you need to modify the WMAppManifest.xml file for
the application
• The ExtendedTask item needs to be added, which sets the type of the agent and
identifies the assemblies to be used when it runs
3/19/201425
<Tasks>
<DefaultTask Name="_default" NavigationPage="MainPage.xaml" />
<ExtendedTask Name="BackgroundTask">
<BackgroundServiceAgent Specifier="WalletAgent" Name="WalletAgent"
Source="JumpstartWalletAgent" Type="JumpstartMembersClub.MyWalletAgent" />
</ExtendedTask>
</Tasks>
The Wallet Background Class
• This is the code that implements the agent
• The OnRefreshData method is called by the Windows Phone operating system to refresh
the wallet content
• It could use a web service to contact the host and do this
3/19/201426
public class MyWalletAgent : WalletAgent
{
protected override async void OnRefreshData(RefreshDataEventArgs args)
{
// Update the wallet items supplied in the args parameter
NotifyComplete();
}
}
Adding a Special Offer on refresh
3/19/201427
protected override async void OnRefreshData(RefreshDataEventArgs args)
{
foreach (WalletItem item in args.Items) {
WalletTransactionItem card = item as WalletTransactionItem;
if (card != null) {
if (card.Id == "Membership") {
card.Message =
"Cheese sale with special deals on Edam. Tap here for more details";
card.MessageNavigationUri = new Uri("/CheeseDealsPage.xaml",
UriKind.Relative);
await card.SaveAsync();
}
}
}
NotifyComplete();
}
Using the Special Offer
• The special offer text is displayed next to the card in the
wallet
• If the user taps the offer the application will be launched at
the page specified
• This works in the same way as a launch from any other deep
link
3/19/201428
Page Destination
• The background agent can define different entry pages
depending on the offer being made
• It can also include Query data in the URL which can be picked up
by the page and used to select particular behaviours
3/19/201429
Refreshing the Card
• The card will be refreshed before it is used for the first
time
• It can also be refreshed manually by the user
• When the refresh action is performed the
OnRefreshData method is called in the card agent
• The user can also delete the card and unlink it from the
application
3/19/201430
Deleting the Card
• The user can also delete the card and unlink it from the
application
• Unlinking is only a useful thing to do if other
applications can make use of that card
• The user can edit the card information, this will be
picked up by the application when it next uses those
card properties
• If the card has custom properties added by the
application they can be changed only by the card
application
3/19/201431
Demo
Demo 2: Using a Wallet Agent
Simple Wallet Use in Applications
• You can use these methods to make any user of your application a “card carrying member”
• The card can hold custom information for users and also provide alerts about new services
• The card will appear in the wallet on the Windows Phone, which provides another point of
access to your application
• While you can perform “transactions” on a membership card these only affect the balance
displayed on the card
• There is no transaction storage in this form of card
• You can however manage a balance display for the card user
3/19/201433
Creating and using
a payment
instrument card
Payment Instrument Cards
• If you want to create a card that tracks transactions you need to create a
PaymentInstrument to hold the card information
• This manages a list of transactions that your application can add to and search through
• It is created and used in exactly the same way as the membership card
• To create a PaymentInstrument the ID_CAP_WALLET_PAYMENTINSTRUMENTS capability
must be set for the application
• The card serves only as a container for the application data
• The application must provide all the business logic to update and manage the card data
3/19/201435
Creating a PaymentInstrument
3/19/201436
PaymentInstrument accountItem;
accountItem = new PaymentInstrument("Credit");
accountItem.PaymentInstrumentKinds = PaymentInstrumentKinds.Credit;
accountItem.IssuerName = issuer.IssuerName;
accountItem.DisplayName = issuer.IssuerName + " Bank Card";
accountItem.IssuerPhone.Business = issuer.IssuerPhone;
accountItem.CustomerName = details.CustomerName;
accountItem.AccountNumber = details.AccountNumber;
accountItem.BillingPhone = details.PhoneNumber;
accountItem.IssuerWebsite = new Uri(issuer.IssuerWebSite);
accountItem.ExpirationDate = details.Expires;
accountItem.DisplayAvailableBalance = "1000";
accountItem.DisplayCreditLimit = details.CreditLimit.ToString("C");
accountItem.DisplayAvailableCredit = details.AvailableCredit.ToString("C");
Creating a PaymentInstrument
• There are more properties to be set when a PaymentInstrument is created
• These must include the type of the card being made
• When working with payment information you need to be mindful of currency formatting in
the locale and culture where the phone is used
• An application can add this information to the payment instrument so that it can
customise the information display appropriately
• The example application on Windows Store shows how this is done
3/19/201437
Creating a transaction: Finding the Wallet
• The first stage in performing a transaction is finding the wallet to use
• The FindItem method will return null if the card is not found
3/19/201438
// Find the payment instrument to use
PaymentInstrument walletPay;
walletPay = Wallet.FindItem("Credit") as PaymentInstrument;
if (walletPay == null)
{
MessageBox.Show("Wallet not found");
return;
}
Creating a transaction: Setting the transaction details
• These transaction properties are required – shown here as hard-coded examples
• For your application they will reflect the actual action performed
• Note that the amounts are specified as strings
• They are textual descriptions of the actions performed
3/19/201439
// Create the transaction
WalletTransaction transaction = new WalletTransaction();
transaction.DisplayAmount = "10";
transaction.Description = "Cheese Purchase";
transaction.TransactionDate = DateTime.Now;
Creating a transaction: Storing the transaction
• The TransactionHistory property of a PaymentInstrument is implemented as a
dictionary that is indexed on a transaction identifier string
• Each identifier string must be unique or the Add action will fail
• The SaveAsync method commits the action to the actual wallet
• It is an asynchronous operation and so the method performing this action must be made
async
3/19/201440
// Add the transaction to the wallet
walletPay.TransactionHistory.Add("Cheese Purchase " + DateTime.Now, transaction);
await walletPay.SaveAsync();
MessageBox.Show("Transaction stored");
Viewing Transactions
• Transactions are stored in the wallet and can be
viewed in along with the card data
• The transaction list is only displayed once some
transactions have been added
3/19/201441
Demo
Demo 3: Using a Payment Instrument
Payment Instruments
• A payment instrument can be used as a store for credit and debit card details and
transactions that have been performed on them
• However, the card does not implement any of the banking behaviours as such
• The application must perform the management of the account information
• The Wallet infrastructure will provide a display mechanism and bring all the account
management activity into one place
3/19/201443
In-App Purchases
In-App Purchases
• In Windows Phone 7.x it was only possible to sell an application at a fixed price through
the Windows Phone Marketplace (now the Windows Phone Store)
• This was the only way you could get paid for the application
• The Windows Phone 8 application environment allows the developer to create an
application that contains paid content
• The Microsoft Store will issue licences for items that have been purchased by the users of
your application
• You can use this to activate application features or provide in-application resources, such
as items in games
3/19/201445
Build apps with higher and recurring revenue
opportunity
Customize
Add and modify different paid
options for different user
segments
Extend reach
Attract a larger user base with
free baseline experience
Upsell
Upsell users to purchase paid
digital goods and services that
enhance or extend the app
experience in the app itself
In-App Purchase
In-App Purchase used for digital content
Offer digital assets
Durables: buy once & own
forever, e.g. new game
levels, maps, game items
Consumables: game
currency, movie rentals,
access to digital magazines
for 6 months, etc.
Integrate In-App to app experience
Manage, monitor and respond
In-App Purchase: sell items in your app
Putting Products into the Microsoft Store
• As well as submitting applications to the store it is also possible to submit products for
purchase by users
• These will be purchased in just the same way as games, using the same payment
mechanism
• Products can then be assigned to a particular application
• This is performed using the Windows Phone Store Dashboard for that application
• The application can initiate purchases of the products
• The Microsoft Store retains licence information for the products that a user can purchase
• The application can determine which products have been purchased
3/19/201449
Creating an Application that uses products
• The developer creates the application and submits it to the Windows Store
3/19/201450
Developer
Application
Windows
Store
Submit app
Creating an Application that uses products
• The developer creates the list of products that can be sold alongside applications
3/19/201451
Developer
Application
Windows
Store
Submit app
Submit products
Creating an Application that uses products
• When the application runs it can request a list of products that are associated with that
application
• This list can be used to drive in-app purchasing options
3/19/201452
Developer
Application
Windows
Store
Submit app
Submit products
Get product list
Creating an Application that uses products
• The user can initiate the purchase operation
• This is managed in just the same way as Windows Store purchases
3/19/201453
Developer
Application
Windows
Store
Submit app
Submit products
Get product list
Purchase Products
Creating an Application that uses products
• When the application starts, and after a purchase operation, it can activate the purchased
feature or load the purchased content
3/19/201454
Developer
Application
Windows
Store
Submit app
Submit products
Get product list
Purchase Products
Get licences
Creating an Application that uses products
• The store will also supply a digitally signed receipt that can be used to manage access to
external resources provided to the user via the application
3/19/201455
Developer
Application
Windows
Store
Submit app
Submit products
Get product list
Purchase Products
Get receipt
Product Provision
• If the purchase relates to an in-application durable or consumable it is the responsibility of
the application writer to ensure that access to this is managed correctly and securely
• If the user buys the “Save” option for the program this should be enabled after the
purchase and each time they run the application
• If the player buys 1,000 health points it is up to the application to ensure that the health
is adjusted accordingly
• If the player buys a digital item (image, music) the application should ensure that this is
delivered to the application
• This may mean that the application must use the purchase receipts in conjunction with
their own systems
3/19/201456
Enumerating Listings for in game products
• The creator of this game has added two products, “Special Cheese” and “Ultra Cheese”
which can be used in the game
• These products have been assigned to this game
• The game can then request listing information for these items that will be used to manage
the purchase of the items
• The ids for these products are given in an array to the load method
• Once the items have been purchased the application can then validate this against the
store
3/19/201457
ListingInformation listings =
await CurrentApp.LoadListingInformationByProductIdsAsync(
new string[] { "Special Cheese", "Ultra Cheese" });
Making an in-application purchase
• This statement purchases the “Special Cheese” product
• The second parameter (in this case false) determines if a receipt is
to be provided for the purchase
• This is an asynchronous operation
3/19/201458
await CurrentApp.RequestProductPurchaseAsync("Special Cheese", false);
Using a Digital Receipt
• An application can request a digital receipt for a particular purchase
• The receipt is provided as a string of XML containing the transaction details
• This can be used to authenticate resources access on another service operated by the
application
3/19/201459
string receiptXml = await CurrentApp.GetProductReceiptAsync("Cheese Music");
Checking if a licence has been purchased
• This is the code used to determine if the product has been purchased
• The application reports that the purchased item has been delivered to the user by calling
the ReportProductFulfillment method and identifying the purchased item
• If the product is a consumable it can be purchased again
• The application must securely store the new status setting
3/19/201460
var productLicenses = CurrentApp.LicenseInformation.ProductLicenses;
var licence = productLicenses["Special Cheese"];
if (licence.IsActive)
{
// enable Special Cheese Power
CurrentApp.ReportProductFulfillment("Special Cheese");
}
Managing the state of a consumable
• A consumable item can be purchased multiple times
• Each time it is purchased the application must make the appropriate changes to the status
and report that it has been delivered
3/19/201461
var productLicenses = CurrentApp.LicenseInformation.ProductLicenses;
var licence = productLicenses["Cheese Power Points"];
if (licence.IsConsumable && licence.IsActive)
{
// add the extra points
cheesePower = cheesePower + 200;
CurrentApp.ReportProductFulfillment("Cheese Power Points ");
}
In-App Purchases
• In-App purchases provide a very powerful way of monetising an application
• It is now possible to move from “Trial Mode” to “Full Version” without needing the user
to download a new application
• Remember however that the responsibility for managing the in-application products
purchased is yours
• It is important that the application protects the purchases that have been made by users
of the program
3/19/201462
Review
• Applications in Windows 8 can use the Wallet to manage membership information for users
• The Wallet Agent allows an application to update special offers and other information
automatically
• The Payment Instrument mechanism provides a way that transactions can be stored and
viewed on Windows Phone
• Applications can now provide a menu of products which can be purchased from within the
program
• These can be consumable (can be bought multiple times) or durable (are bought once)
• The Windows Store will track licences that have been purchased for an item and provide
receipts that can be used to authenticate resource access
63
The information herein is for informational
purposes only an represents the current view of
Microsoft Corporation as of the date of this
presentation. Because Microsoft must respond
to changing market conditions, it should not be
interpreted to be a commitment on the part of
Microsoft, and Microsoft cannot guarantee the
accuracy of any information provided after the
date of this presentation.
© 2012 Microsoft Corporation.
All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION
IN THIS PRESENTATION.

Weitere ähnliche Inhalte

Ähnlich wie Windows Phone 8 - 16 Wallet and In-app Purchase

E-commerce System Technologies, Repository and Networking Technology
E-commerce System Technologies, Repository and Networking TechnologyE-commerce System Technologies, Repository and Networking Technology
E-commerce System Technologies, Repository and Networking Technologyizan28
 
An approach of Machine Learning with the Help of Data Stream to Control the ...
An approach of Machine Learning with the Help of  Data Stream to Control the ...An approach of Machine Learning with the Help of  Data Stream to Control the ...
An approach of Machine Learning with the Help of Data Stream to Control the ...IRJET Journal
 
PASSBOOK: Just the beginning
PASSBOOK: Just the beginningPASSBOOK: Just the beginning
PASSBOOK: Just the beginningMonitise MEA
 
CMGT410 v19Project Charter TemplateCMGT410 v19Page 2 of 3P.docx
CMGT410 v19Project Charter TemplateCMGT410 v19Page 2 of 3P.docxCMGT410 v19Project Charter TemplateCMGT410 v19Page 2 of 3P.docx
CMGT410 v19Project Charter TemplateCMGT410 v19Page 2 of 3P.docxmary772
 
All You Need to Know About Mobile Payment Gateways in 2023.pdf
All You Need to Know About Mobile Payment Gateways in 2023.pdfAll You Need to Know About Mobile Payment Gateways in 2023.pdf
All You Need to Know About Mobile Payment Gateways in 2023.pdfTechugo
 
Entrepreneurship & Commerce in IT - 12 - Web Payments
Entrepreneurship & Commerce in IT - 12 - Web PaymentsEntrepreneurship & Commerce in IT - 12 - Web Payments
Entrepreneurship & Commerce in IT - 12 - Web PaymentsSachintha Gunasena
 
Design and Implementation of E-Commerce Site for Online Shopping.pdf
Design and Implementation of E-Commerce Site for Online Shopping.pdfDesign and Implementation of E-Commerce Site for Online Shopping.pdf
Design and Implementation of E-Commerce Site for Online Shopping.pdfTomTom149267
 
Design and Implementation of E-Commerce Site for Online Shopping.pdf
Design and Implementation of E-Commerce Site for Online Shopping.pdfDesign and Implementation of E-Commerce Site for Online Shopping.pdf
Design and Implementation of E-Commerce Site for Online Shopping.pdfOmar Omar
 
Top eWallet App develpoment in Dubai for 2024.pdf
Top eWallet App develpoment  in Dubai for 2024.pdfTop eWallet App develpoment  in Dubai for 2024.pdf
Top eWallet App develpoment in Dubai for 2024.pdfJPLoft Solutions
 
Windows Phone 8 - 10 Using Phone Resources
Windows Phone 8 - 10 Using Phone ResourcesWindows Phone 8 - 10 Using Phone Resources
Windows Phone 8 - 10 Using Phone ResourcesOliver Scheer
 
Bank account tracking system
Bank account tracking systemBank account tracking system
Bank account tracking systemMaulesh Desai
 
Cashless economy - Presentation of Cashless economy methods to follow
Cashless economy - Presentation of Cashless economy methods to followCashless economy - Presentation of Cashless economy methods to follow
Cashless economy - Presentation of Cashless economy methods to followAbhinav Reddy Lattu
 
cashlesseconomyppt-171212063021 (1).pdf
cashlesseconomyppt-171212063021 (1).pdfcashlesseconomyppt-171212063021 (1).pdf
cashlesseconomyppt-171212063021 (1).pdfDarshanAgrawal18
 
How to Create eWallet App and Know the Cost!.pptx
How to Create eWallet App and Know the Cost!.pptxHow to Create eWallet App and Know the Cost!.pptx
How to Create eWallet App and Know the Cost!.pptxTarun Nagar
 

Ähnlich wie Windows Phone 8 - 16 Wallet and In-app Purchase (20)

Digitalwallet or e-wallet
Digitalwallet or e-walletDigitalwallet or e-wallet
Digitalwallet or e-wallet
 
E-commerce System Technologies, Repository and Networking Technology
E-commerce System Technologies, Repository and Networking TechnologyE-commerce System Technologies, Repository and Networking Technology
E-commerce System Technologies, Repository and Networking Technology
 
An approach of Machine Learning with the Help of Data Stream to Control the ...
An approach of Machine Learning with the Help of  Data Stream to Control the ...An approach of Machine Learning with the Help of  Data Stream to Control the ...
An approach of Machine Learning with the Help of Data Stream to Control the ...
 
PASSBOOK: Just the beginning
PASSBOOK: Just the beginningPASSBOOK: Just the beginning
PASSBOOK: Just the beginning
 
CMGT410 v19Project Charter TemplateCMGT410 v19Page 2 of 3P.docx
CMGT410 v19Project Charter TemplateCMGT410 v19Page 2 of 3P.docxCMGT410 v19Project Charter TemplateCMGT410 v19Page 2 of 3P.docx
CMGT410 v19Project Charter TemplateCMGT410 v19Page 2 of 3P.docx
 
Ecash and ewallet
Ecash and ewalletEcash and ewallet
Ecash and ewallet
 
All You Need to Know About Mobile Payment Gateways in 2023.pdf
All You Need to Know About Mobile Payment Gateways in 2023.pdfAll You Need to Know About Mobile Payment Gateways in 2023.pdf
All You Need to Know About Mobile Payment Gateways in 2023.pdf
 
Entrepreneurship & Commerce in IT - 12 - Web Payments
Entrepreneurship & Commerce in IT - 12 - Web PaymentsEntrepreneurship & Commerce in IT - 12 - Web Payments
Entrepreneurship & Commerce in IT - 12 - Web Payments
 
Digital wallet
Digital walletDigital wallet
Digital wallet
 
Digital wallet
Digital walletDigital wallet
Digital wallet
 
Design and Implementation of E-Commerce Site for Online Shopping.pdf
Design and Implementation of E-Commerce Site for Online Shopping.pdfDesign and Implementation of E-Commerce Site for Online Shopping.pdf
Design and Implementation of E-Commerce Site for Online Shopping.pdf
 
Design and Implementation of E-Commerce Site for Online Shopping.pdf
Design and Implementation of E-Commerce Site for Online Shopping.pdfDesign and Implementation of E-Commerce Site for Online Shopping.pdf
Design and Implementation of E-Commerce Site for Online Shopping.pdf
 
Top eWallet App develpoment in Dubai for 2024.pdf
Top eWallet App develpoment  in Dubai for 2024.pdfTop eWallet App develpoment  in Dubai for 2024.pdf
Top eWallet App develpoment in Dubai for 2024.pdf
 
Windows Phone 8 - 10 Using Phone Resources
Windows Phone 8 - 10 Using Phone ResourcesWindows Phone 8 - 10 Using Phone Resources
Windows Phone 8 - 10 Using Phone Resources
 
WEB PAYMENT SYSTEM
WEB PAYMENT SYSTEMWEB PAYMENT SYSTEM
WEB PAYMENT SYSTEM
 
Bank account tracking system
Bank account tracking systemBank account tracking system
Bank account tracking system
 
Cashless economy - Presentation of Cashless economy methods to follow
Cashless economy - Presentation of Cashless economy methods to followCashless economy - Presentation of Cashless economy methods to follow
Cashless economy - Presentation of Cashless economy methods to follow
 
cashlesseconomyppt-171212063021 (1).pdf
cashlesseconomyppt-171212063021 (1).pdfcashlesseconomyppt-171212063021 (1).pdf
cashlesseconomyppt-171212063021 (1).pdf
 
E wallet- final
E wallet- finalE wallet- final
E wallet- final
 
How to Create eWallet App and Know the Cost!.pptx
How to Create eWallet App and Know the Cost!.pptxHow to Create eWallet App and Know the Cost!.pptx
How to Create eWallet App and Know the Cost!.pptx
 

Mehr von Oliver Scheer

Windows Phone 8 - 17 The Windows Phone Store
Windows Phone 8 - 17 The Windows Phone StoreWindows Phone 8 - 17 The Windows Phone Store
Windows Phone 8 - 17 The Windows Phone StoreOliver Scheer
 
Windows Phone 8 - 14 Using Speech
Windows Phone 8 - 14 Using SpeechWindows Phone 8 - 14 Using Speech
Windows Phone 8 - 14 Using SpeechOliver Scheer
 
Windows Phone 8 - 12 Network Communication
Windows Phone 8 - 12 Network CommunicationWindows Phone 8 - 12 Network Communication
Windows Phone 8 - 12 Network CommunicationOliver Scheer
 
Windows Phone 8 - 11 App to App Communication
Windows Phone 8 - 11 App to App CommunicationWindows Phone 8 - 11 App to App Communication
Windows Phone 8 - 11 App to App CommunicationOliver Scheer
 
Windows Phone 8 - 9 Push Notifications
Windows Phone 8 - 9 Push NotificationsWindows Phone 8 - 9 Push Notifications
Windows Phone 8 - 9 Push NotificationsOliver Scheer
 
Windows Phone 8 - 7 Local Database
Windows Phone 8 - 7 Local DatabaseWindows Phone 8 - 7 Local Database
Windows Phone 8 - 7 Local DatabaseOliver Scheer
 
Windows Phone 8 - 6 Background Agents
Windows Phone 8 - 6 Background AgentsWindows Phone 8 - 6 Background Agents
Windows Phone 8 - 6 Background AgentsOliver Scheer
 
Windows Phone 8 - 4 Files and Storage
Windows Phone 8 - 4 Files and StorageWindows Phone 8 - 4 Files and Storage
Windows Phone 8 - 4 Files and StorageOliver Scheer
 
Windows Phone 8 - 3.5 Async Programming
Windows Phone 8 - 3.5 Async ProgrammingWindows Phone 8 - 3.5 Async Programming
Windows Phone 8 - 3.5 Async ProgrammingOliver Scheer
 
Windows Phone 8 - 1 Introducing Windows Phone 8 Development
Windows Phone 8 - 1 Introducing Windows Phone 8 DevelopmentWindows Phone 8 - 1 Introducing Windows Phone 8 Development
Windows Phone 8 - 1 Introducing Windows Phone 8 DevelopmentOliver Scheer
 
Windows Phone 8 - 4 Files and Storage
Windows Phone 8 - 4 Files and StorageWindows Phone 8 - 4 Files and Storage
Windows Phone 8 - 4 Files and StorageOliver Scheer
 

Mehr von Oliver Scheer (11)

Windows Phone 8 - 17 The Windows Phone Store
Windows Phone 8 - 17 The Windows Phone StoreWindows Phone 8 - 17 The Windows Phone Store
Windows Phone 8 - 17 The Windows Phone Store
 
Windows Phone 8 - 14 Using Speech
Windows Phone 8 - 14 Using SpeechWindows Phone 8 - 14 Using Speech
Windows Phone 8 - 14 Using Speech
 
Windows Phone 8 - 12 Network Communication
Windows Phone 8 - 12 Network CommunicationWindows Phone 8 - 12 Network Communication
Windows Phone 8 - 12 Network Communication
 
Windows Phone 8 - 11 App to App Communication
Windows Phone 8 - 11 App to App CommunicationWindows Phone 8 - 11 App to App Communication
Windows Phone 8 - 11 App to App Communication
 
Windows Phone 8 - 9 Push Notifications
Windows Phone 8 - 9 Push NotificationsWindows Phone 8 - 9 Push Notifications
Windows Phone 8 - 9 Push Notifications
 
Windows Phone 8 - 7 Local Database
Windows Phone 8 - 7 Local DatabaseWindows Phone 8 - 7 Local Database
Windows Phone 8 - 7 Local Database
 
Windows Phone 8 - 6 Background Agents
Windows Phone 8 - 6 Background AgentsWindows Phone 8 - 6 Background Agents
Windows Phone 8 - 6 Background Agents
 
Windows Phone 8 - 4 Files and Storage
Windows Phone 8 - 4 Files and StorageWindows Phone 8 - 4 Files and Storage
Windows Phone 8 - 4 Files and Storage
 
Windows Phone 8 - 3.5 Async Programming
Windows Phone 8 - 3.5 Async ProgrammingWindows Phone 8 - 3.5 Async Programming
Windows Phone 8 - 3.5 Async Programming
 
Windows Phone 8 - 1 Introducing Windows Phone 8 Development
Windows Phone 8 - 1 Introducing Windows Phone 8 DevelopmentWindows Phone 8 - 1 Introducing Windows Phone 8 Development
Windows Phone 8 - 1 Introducing Windows Phone 8 Development
 
Windows Phone 8 - 4 Files and Storage
Windows Phone 8 - 4 Files and StorageWindows Phone 8 - 4 Files and Storage
Windows Phone 8 - 4 Files and Storage
 

Kürzlich hochgeladen

Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 

Kürzlich hochgeladen (20)

Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 

Windows Phone 8 - 16 Wallet and In-app Purchase

  • 1. Oliver Scheer Senior Technical Evangelist Microsoft Deutschland http://the-oliver.com Wallet Support and In App Purchasing in Windows Phone 8
  • 2. Topics • Wallet Overview • Applications and wallet storage • Wallet capabilities • Creating and using a membership card • Creating the card • The Wallet Background Agent • Creating and using a payment instrument card • In App Purchases • Adding products to your application • Durable and Consumable items • The purchase lifecycle • The Application Programmer Interface • Finding products • Purchasing products • Using product receipts
  • 4. Windows Phone Wallet • The Wallet is implemented as part of the Windows Phone operating system • The Wallet acts as a container for applications that can store membership information and transaction data for paid services • The wallet provides an additional launching point for an application • The launch can be via a deep link to a page describing a particular offer or service 3/19/2014‹#›
  • 5. Wallet Storage • Wallet information is held on a per-application basis • An application can only interact with its own wallet storage • Each application will store information relating to the services provided via that application • Special offers • Transactions • Membership information • Custom fields for that particular application 3/19/2014‹#›
  • 6. Opening the Wallet • The Wallet is supplied as part of the Windows Phone • Users can store details of membership cards in the wallet • These are linked to “wallet aware” applications on the phone • The membership cards can be credit or debit cards, or any form of membership tracking that you wish to add to your application • This includes transaction support and also allows you to alert the user to any special offers or promotions associated with a card
  • 7. Storing data in the Wallet • Users can store details of their cards inside the wallet • They can add as many sets of card details as they like and the wallet will store the details securely • Each card is associated with an application that manages transactions on that card • They can PIN protect access to the wallet • The wallet PIN can also be used to control access to Windows Phone Store purchases
  • 8. Navigating the Phone Wallet • When the user opens the wallet they are shown a list of all the cards that have been placed in there • Each of the cards is bound to the application behind it • When the card is opened the user has the option to start the application behind that card • This provides another way in which your application can get started • Uses can open their wallet, find your membership card and run your application from there 3/19/2014‹#›
  • 9. Using a Card • When a user opens a card they can view the data for the card and see their account information • This is displayed by the Wallet • They can also open the application from the Wallet entry • A player could enter your multiplayer game from their wallet, which would be the place you would store their user credentials • The wallet also displays app supplied fields, for example balance information • This is text provided by the application behind the wallet • It can also display transaction information for cards which are payment instruments 3/19/20149
  • 10. Adding a New Card • The user can add a new card by tapping the + in the application bar • They can also search for existing cards in the wallet • Each card is identified by the first six digits of the card number • Once you have created a card you can then search for applications that can perform transactions on that card • If an application is found the card is then bound to that application 3/19/201410
  • 11. Adding a New Card via an Application • Cards are only useful once they have been bound to applications • Card providers can create applications that are bound to cards in the wallet • The Wallet program provides a menu of applications from “well known” card providers • A user can create a card from one of these applications • Your applications can also create cards for storage in the wallet 3/19/201411
  • 12. Adding Cards from within Applications • Cards are linked with the applications that use them • The app code must create and populate a WalletTransactionItem instance and pass that to the AddWalletItemTask which handles the storage in the Wallet • A WalletTransactionItem object contains a number of standard fields • Applications can add their own custom fields for their own use • Only the application that is bound to a card can access the information in the card 3/19/201412
  • 13. Adding Cards from within Applications • It is not possible for a card to be added to a wallet without the user approving the action • This prevents applications from “spamming” the wallet with large numbers of cards • The wallet also provides a means by which a user can delete a card that they no longer use 3/19/201413
  • 14. Wallet Enabled Applications • A wallet application does not have to just manipulate money • It could be any kind of club membership • The wallet could contain membership details and any custom data about the club • Each wallet entry can also store customised data for that application • Achievements in a game, permission levels, responsibilities, etc • Once an application is registered with the wallet it will appear alongside all the other applications in the wallet 3/19/201414
  • 15. Creating and using a membership card 15
  • 16. Wallet Applications and Capabilities • If an application just wishes to use the Wallet to store membership details and transaction logs it just needs to enable the ID_CAP_WALLET capability • Any application can do this • To use the payment instruments and store secure elements in published applications you will have to have those permissions added to your account • Contact the Dev Center Support team to do this 3/19/201416
  • 17. Creating a Wallet entry for an application 3/19/201417 WalletTransactionItem membershipItem; membershipItem = new WalletTransactionItem("Membership"); membershipItem.IssuerName = issuer.IssuerName; membershipItem.DisplayName = issuer.IssuerName + " Membership Card"; membershipItem.IssuerPhone.Business = issuer.IssuerPhone; membershipItem.CustomerName = details.CustomerName; membershipItem.AccountNumber = details.MembershipNumber; membershipItem.BillingPhone = details.PhoneNumber; membershipItem.IssuerWebsite = new Uri(issuer.IssuerWebSite); membershipItem.DisplayAvailableBalance = "1000 points"; membershipItem.Logo336x336 = new BitmapImage(new Uri("/images/BrSml.png", …)); membershipItem.Logo159x159 = new BitmapImage(new Uri("/images/BrMed.png", …)); membershipItem.Logo336x336 = new BitmapImage(new Uri("/images/BrLge.png", …)); AddWalletItemTask addWalletItemTask = new AddWalletItemTask(); addWalletItemTask.Item = membershipItem; addWalletItemTask.Show();
  • 19. Simple Wallet Use • If you just want to store and manage membership information for your application the wallet is a good way to do this • Users can find and run your application from the Wallet • The application can update the wallet membership properties to display information about the status of the user • This can be done simply by updating the text properties of the wallet information • This will then be reflected in the wallet display 3/19/201419
  • 21. The Wallet Background Agent • Applications that use the wallet can also create a Background Agent that can update the wallet on the phone when the application is not being used • The agent will also run when the user refreshes the card from the Wallet • Your application can use this in lots of different ways • Update a list of transactions • Inform the user of special offers • Manage membership expiry 3/19/201421
  • 22. Special Offer Display • Special offers are displayed right next to the card details • If the user activates the offer it will perform a deep link activation of the application that can take the user directly to the page for that offer • The deep link is set by the background agent, so that the application can identify the offer that has been made 3/19/201422
  • 23. Creating a Wallet Agent • A Wallet Agent works in a very similar way to other background tasks • There is no template for the creation of the agent project • Instead you have to create the agent as a class library and add it to the application solution 3/19/201423
  • 24. The Wallet Agent Project • This is added to the solution just as with other agents • The project output also needs to be added to the references of the application 3/19/201424
  • 25. Adding the Wallet Background Task • To link the agent to the application you need to modify the WMAppManifest.xml file for the application • The ExtendedTask item needs to be added, which sets the type of the agent and identifies the assemblies to be used when it runs 3/19/201425 <Tasks> <DefaultTask Name="_default" NavigationPage="MainPage.xaml" /> <ExtendedTask Name="BackgroundTask"> <BackgroundServiceAgent Specifier="WalletAgent" Name="WalletAgent" Source="JumpstartWalletAgent" Type="JumpstartMembersClub.MyWalletAgent" /> </ExtendedTask> </Tasks>
  • 26. The Wallet Background Class • This is the code that implements the agent • The OnRefreshData method is called by the Windows Phone operating system to refresh the wallet content • It could use a web service to contact the host and do this 3/19/201426 public class MyWalletAgent : WalletAgent { protected override async void OnRefreshData(RefreshDataEventArgs args) { // Update the wallet items supplied in the args parameter NotifyComplete(); } }
  • 27. Adding a Special Offer on refresh 3/19/201427 protected override async void OnRefreshData(RefreshDataEventArgs args) { foreach (WalletItem item in args.Items) { WalletTransactionItem card = item as WalletTransactionItem; if (card != null) { if (card.Id == "Membership") { card.Message = "Cheese sale with special deals on Edam. Tap here for more details"; card.MessageNavigationUri = new Uri("/CheeseDealsPage.xaml", UriKind.Relative); await card.SaveAsync(); } } } NotifyComplete(); }
  • 28. Using the Special Offer • The special offer text is displayed next to the card in the wallet • If the user taps the offer the application will be launched at the page specified • This works in the same way as a launch from any other deep link 3/19/201428
  • 29. Page Destination • The background agent can define different entry pages depending on the offer being made • It can also include Query data in the URL which can be picked up by the page and used to select particular behaviours 3/19/201429
  • 30. Refreshing the Card • The card will be refreshed before it is used for the first time • It can also be refreshed manually by the user • When the refresh action is performed the OnRefreshData method is called in the card agent • The user can also delete the card and unlink it from the application 3/19/201430
  • 31. Deleting the Card • The user can also delete the card and unlink it from the application • Unlinking is only a useful thing to do if other applications can make use of that card • The user can edit the card information, this will be picked up by the application when it next uses those card properties • If the card has custom properties added by the application they can be changed only by the card application 3/19/201431
  • 32. Demo Demo 2: Using a Wallet Agent
  • 33. Simple Wallet Use in Applications • You can use these methods to make any user of your application a “card carrying member” • The card can hold custom information for users and also provide alerts about new services • The card will appear in the wallet on the Windows Phone, which provides another point of access to your application • While you can perform “transactions” on a membership card these only affect the balance displayed on the card • There is no transaction storage in this form of card • You can however manage a balance display for the card user 3/19/201433
  • 34. Creating and using a payment instrument card
  • 35. Payment Instrument Cards • If you want to create a card that tracks transactions you need to create a PaymentInstrument to hold the card information • This manages a list of transactions that your application can add to and search through • It is created and used in exactly the same way as the membership card • To create a PaymentInstrument the ID_CAP_WALLET_PAYMENTINSTRUMENTS capability must be set for the application • The card serves only as a container for the application data • The application must provide all the business logic to update and manage the card data 3/19/201435
  • 36. Creating a PaymentInstrument 3/19/201436 PaymentInstrument accountItem; accountItem = new PaymentInstrument("Credit"); accountItem.PaymentInstrumentKinds = PaymentInstrumentKinds.Credit; accountItem.IssuerName = issuer.IssuerName; accountItem.DisplayName = issuer.IssuerName + " Bank Card"; accountItem.IssuerPhone.Business = issuer.IssuerPhone; accountItem.CustomerName = details.CustomerName; accountItem.AccountNumber = details.AccountNumber; accountItem.BillingPhone = details.PhoneNumber; accountItem.IssuerWebsite = new Uri(issuer.IssuerWebSite); accountItem.ExpirationDate = details.Expires; accountItem.DisplayAvailableBalance = "1000"; accountItem.DisplayCreditLimit = details.CreditLimit.ToString("C"); accountItem.DisplayAvailableCredit = details.AvailableCredit.ToString("C");
  • 37. Creating a PaymentInstrument • There are more properties to be set when a PaymentInstrument is created • These must include the type of the card being made • When working with payment information you need to be mindful of currency formatting in the locale and culture where the phone is used • An application can add this information to the payment instrument so that it can customise the information display appropriately • The example application on Windows Store shows how this is done 3/19/201437
  • 38. Creating a transaction: Finding the Wallet • The first stage in performing a transaction is finding the wallet to use • The FindItem method will return null if the card is not found 3/19/201438 // Find the payment instrument to use PaymentInstrument walletPay; walletPay = Wallet.FindItem("Credit") as PaymentInstrument; if (walletPay == null) { MessageBox.Show("Wallet not found"); return; }
  • 39. Creating a transaction: Setting the transaction details • These transaction properties are required – shown here as hard-coded examples • For your application they will reflect the actual action performed • Note that the amounts are specified as strings • They are textual descriptions of the actions performed 3/19/201439 // Create the transaction WalletTransaction transaction = new WalletTransaction(); transaction.DisplayAmount = "10"; transaction.Description = "Cheese Purchase"; transaction.TransactionDate = DateTime.Now;
  • 40. Creating a transaction: Storing the transaction • The TransactionHistory property of a PaymentInstrument is implemented as a dictionary that is indexed on a transaction identifier string • Each identifier string must be unique or the Add action will fail • The SaveAsync method commits the action to the actual wallet • It is an asynchronous operation and so the method performing this action must be made async 3/19/201440 // Add the transaction to the wallet walletPay.TransactionHistory.Add("Cheese Purchase " + DateTime.Now, transaction); await walletPay.SaveAsync(); MessageBox.Show("Transaction stored");
  • 41. Viewing Transactions • Transactions are stored in the wallet and can be viewed in along with the card data • The transaction list is only displayed once some transactions have been added 3/19/201441
  • 42. Demo Demo 3: Using a Payment Instrument
  • 43. Payment Instruments • A payment instrument can be used as a store for credit and debit card details and transactions that have been performed on them • However, the card does not implement any of the banking behaviours as such • The application must perform the management of the account information • The Wallet infrastructure will provide a display mechanism and bring all the account management activity into one place 3/19/201443
  • 45. In-App Purchases • In Windows Phone 7.x it was only possible to sell an application at a fixed price through the Windows Phone Marketplace (now the Windows Phone Store) • This was the only way you could get paid for the application • The Windows Phone 8 application environment allows the developer to create an application that contains paid content • The Microsoft Store will issue licences for items that have been purchased by the users of your application • You can use this to activate application features or provide in-application resources, such as items in games 3/19/201445
  • 46. Build apps with higher and recurring revenue opportunity Customize Add and modify different paid options for different user segments Extend reach Attract a larger user base with free baseline experience Upsell Upsell users to purchase paid digital goods and services that enhance or extend the app experience in the app itself In-App Purchase
  • 47. In-App Purchase used for digital content Offer digital assets Durables: buy once & own forever, e.g. new game levels, maps, game items Consumables: game currency, movie rentals, access to digital magazines for 6 months, etc.
  • 48. Integrate In-App to app experience Manage, monitor and respond In-App Purchase: sell items in your app
  • 49. Putting Products into the Microsoft Store • As well as submitting applications to the store it is also possible to submit products for purchase by users • These will be purchased in just the same way as games, using the same payment mechanism • Products can then be assigned to a particular application • This is performed using the Windows Phone Store Dashboard for that application • The application can initiate purchases of the products • The Microsoft Store retains licence information for the products that a user can purchase • The application can determine which products have been purchased 3/19/201449
  • 50. Creating an Application that uses products • The developer creates the application and submits it to the Windows Store 3/19/201450 Developer Application Windows Store Submit app
  • 51. Creating an Application that uses products • The developer creates the list of products that can be sold alongside applications 3/19/201451 Developer Application Windows Store Submit app Submit products
  • 52. Creating an Application that uses products • When the application runs it can request a list of products that are associated with that application • This list can be used to drive in-app purchasing options 3/19/201452 Developer Application Windows Store Submit app Submit products Get product list
  • 53. Creating an Application that uses products • The user can initiate the purchase operation • This is managed in just the same way as Windows Store purchases 3/19/201453 Developer Application Windows Store Submit app Submit products Get product list Purchase Products
  • 54. Creating an Application that uses products • When the application starts, and after a purchase operation, it can activate the purchased feature or load the purchased content 3/19/201454 Developer Application Windows Store Submit app Submit products Get product list Purchase Products Get licences
  • 55. Creating an Application that uses products • The store will also supply a digitally signed receipt that can be used to manage access to external resources provided to the user via the application 3/19/201455 Developer Application Windows Store Submit app Submit products Get product list Purchase Products Get receipt
  • 56. Product Provision • If the purchase relates to an in-application durable or consumable it is the responsibility of the application writer to ensure that access to this is managed correctly and securely • If the user buys the “Save” option for the program this should be enabled after the purchase and each time they run the application • If the player buys 1,000 health points it is up to the application to ensure that the health is adjusted accordingly • If the player buys a digital item (image, music) the application should ensure that this is delivered to the application • This may mean that the application must use the purchase receipts in conjunction with their own systems 3/19/201456
  • 57. Enumerating Listings for in game products • The creator of this game has added two products, “Special Cheese” and “Ultra Cheese” which can be used in the game • These products have been assigned to this game • The game can then request listing information for these items that will be used to manage the purchase of the items • The ids for these products are given in an array to the load method • Once the items have been purchased the application can then validate this against the store 3/19/201457 ListingInformation listings = await CurrentApp.LoadListingInformationByProductIdsAsync( new string[] { "Special Cheese", "Ultra Cheese" });
  • 58. Making an in-application purchase • This statement purchases the “Special Cheese” product • The second parameter (in this case false) determines if a receipt is to be provided for the purchase • This is an asynchronous operation 3/19/201458 await CurrentApp.RequestProductPurchaseAsync("Special Cheese", false);
  • 59. Using a Digital Receipt • An application can request a digital receipt for a particular purchase • The receipt is provided as a string of XML containing the transaction details • This can be used to authenticate resources access on another service operated by the application 3/19/201459 string receiptXml = await CurrentApp.GetProductReceiptAsync("Cheese Music");
  • 60. Checking if a licence has been purchased • This is the code used to determine if the product has been purchased • The application reports that the purchased item has been delivered to the user by calling the ReportProductFulfillment method and identifying the purchased item • If the product is a consumable it can be purchased again • The application must securely store the new status setting 3/19/201460 var productLicenses = CurrentApp.LicenseInformation.ProductLicenses; var licence = productLicenses["Special Cheese"]; if (licence.IsActive) { // enable Special Cheese Power CurrentApp.ReportProductFulfillment("Special Cheese"); }
  • 61. Managing the state of a consumable • A consumable item can be purchased multiple times • Each time it is purchased the application must make the appropriate changes to the status and report that it has been delivered 3/19/201461 var productLicenses = CurrentApp.LicenseInformation.ProductLicenses; var licence = productLicenses["Cheese Power Points"]; if (licence.IsConsumable && licence.IsActive) { // add the extra points cheesePower = cheesePower + 200; CurrentApp.ReportProductFulfillment("Cheese Power Points "); }
  • 62. In-App Purchases • In-App purchases provide a very powerful way of monetising an application • It is now possible to move from “Trial Mode” to “Full Version” without needing the user to download a new application • Remember however that the responsibility for managing the in-application products purchased is yours • It is important that the application protects the purchases that have been made by users of the program 3/19/201462
  • 63. Review • Applications in Windows 8 can use the Wallet to manage membership information for users • The Wallet Agent allows an application to update special offers and other information automatically • The Payment Instrument mechanism provides a way that transactions can be stored and viewed on Windows Phone • Applications can now provide a menu of products which can be purchased from within the program • These can be consumable (can be bought multiple times) or durable (are bought once) • The Windows Store will track licences that have been purchased for an item and provide receipts that can be used to authenticate resource access 63
  • 64. The information herein is for informational purposes only an represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.