Barcelona Developers Conference 2011

1,525 views
1,466 views

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,525
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • MPL and MEC
  • Barcelona Developers Conference 2011

    1. 1. A person or businessA person or business whose PayPal accountwhose PayPal account is is being creditedbeing debited The API access account making the Express Checkout service calls: may be the sender, one of the receivers, or a third party
    2. 2. 1. PayPal as a Payment Method 2. Redirection to PayPal and Login 3. Transaction Review and Confirmation
    3. 3. protected void DoSetEC(object sender, EventArgs e) { try { Caller API Details caller = new NVPCallerServices(); setProfile(MyProfile, “APIUsername”,”APIPassword”,”APISignature”); MyCodec["METHOD"] = "SetExpressCheckout"; MyCodec["VERSION"] = “82“; MyCodec["CANCELURL"] = ”MyCancelURL"; General API Settings MyCodec["RETURNURL"] = ”MyReturnURL”; MyCodec["PAYMENTREQUEST_0_CURRENCYCODE"] = "GBP"; MyCodec["PAYMENTREQUEST_0_PAYMENTACTION"] = "Sale"; MyCodec["L_PAYMENTREQUEST_0_NAME0"] = ”Item in my Shopping cart"; MyCodec["L_PAYMENTREQUEST_0_AMT0"] = "24.48"; Payment Request Information MyCodec["L_PAYMENTREQUEST_0_QTY0"] = "2”; MyCodec["PAYMENTREQUEST_0_ITEMAMT"] = "43.96"; MyCodec["PAYMENTREQUEST_0_SHIPPINGAMT"] = "1.50"; MyCodec["PAYMENTREQUEST_0_AMT"] = ”45.46” caller.Initialize(); caller.APIProfile = MyProfile; MyNVPRequest = MyCodec.Encode(); MyNVPResponse = caller.Call(MyNVPRequest); MyRespoCodec.Decode(MyNVPResponse); if (MyRespoCodec["ACK"] != "Success" && MyRespoCodec["ACK"] != "SUCCESSWITHWARNING") { /*display error message*/} else Transaction Specific Token { MyToken = MyRespoCodec["TOKEN"].ToString(); Response.Redirect(@"https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=" + MyToken); } } catch (Exception exp) Redirection to PayPal {/*sort out exceptions*/} }
    4. 4. 1. Waiter prints the bill5. Table is closed 3. Customer pays with PayPal 2. Customer types in the 12 digit code from the bill into the Pizza Express app, generating the token for the transaction4. Transaction completed
    5. 5. https://www.x.com/developers/paypal/products/adaptive-payments
    6. 6. $10 $100 $10$100 $40 $40 $50 $50
    7. 7. How curl -s --insecure-H "X-PAYPAL-SECURITY-USERID: api_username"-H "X-PAYPAL-SECURITY-PASSWORD: api_password"-H "X-PAYPAL-SECURITY-SIGNATURE: api_signature" HTTP Headers-H "X-PAYPAL-REQUEST-DATA-FORMAT: NV"-H "X-PAYPAL-RESPONSE-DATA-FORMAT: NV"-H "X-PAYPAL-APPLICATION-ID: app_id"https://svcs.sandbox.paypal.com/AdaptivePayments/Pay -d"requestEnvelope.errorLanguage=en_US&actionType=PAY&senderEmail=sender@domain&receiverList.receiver(0).email=receiver@domain&receiverList.receiver(0).amount=100.00 Payment&currencyCode=USD instructions&feesPayer=EACHRECEIVER&memo=Simple payment example.&cancelUrl=http://your_cancel_url&returnUrl=http://your_return_url&ipnNotificationUrl=http://your_ipn_notification_url”
    8. 8. responseEnvelope.timestamp=2009-07-13T12%3A34%3A29.316-07%3A00&responseEnvelope.ack=Success&responseEnvelope.correlationId=d615a365bed61 Response envelope&responseEnvelope.build=DEV&payKey=AP-3TY011106S4428730 Pay key and&paymentExecStatus=CREATED payment status
    9. 9. responseEnvelope.timestamp=2009-08-14T09%3A00%3A37.748-07%3A00&responseEnvelope.ack=Success&responseEnvelope.correlationId=7967b2d03745a&responseEnvelope.build=DEV&cancelUrl=your_cancel_url&currencyCode=USD&logDefaultShippingAddress=false&memo=Simple payment example.&paymentInfoList.paymentInfo(0).receiver.amount=100.00&paymentInfoList.paymentInfo(0).receiver.email=receiver@domain Payment details&paymentInfoList.paymentInfo(0).receiver.primary=false&returnUrl=your_return_url&senderEmail=sender@domain&status=CREATED&payKey=AP-3TY011106S4428730&actionType=PAY&feesPayer=EACHRECEIVER
    10. 10. • Designed to be integrated in less than 10 minutes• No need to code payment UI• Don’t need to worry about sensitive financial info• More convenient than always typing credit card• Can use existing account information• Physical goods and services• In-app purchase
    11. 11. - Simple, Chained, Parallel, and Pre-approved payments- Supports Android 1.5 and above, iOS 3.0 and aboveMore information you can find here:https://www.x.com/developers/paypal/products/mobile-payment-libraries
    12. 12. Your Application Your Server Your Activity (Optional) onCreate(){ … Item delivery getCheckoutButton(…); } Purchase data onClickListener() { … PayPal Checkout Activity startActivityForResult(…); } Instant Payment onPaymentSucceeded() { Notifications … (Optional) } onPaymentFailed(){ … } PayPal Server onPaymentCanceled() { … User Wallet } onActivityResult(){ … Fraud/Risk } Transaction data

    ×