Flutter: how to create Apple/google wallet card - flutter

Is there any way to create passes/cards for Apple wallet and google wallet? In swift this is done with passkit. How can I do it in Flutter!?
Note I want to had card like tickets, boarding pass, loyalty card. I am not looking after adding credit card or payment methods
Thanks

Actually now there is a pass_flutter library for that.
Update: in version 2.0.0, you can now save passes like so:
import 'package:pass_flutter/pass_flutter.dart';
PassFile passFile = await Pass().fetchPreviewFromUrl(url: 'https://link_to_pass/pass.pkpass');
passFile.save();

Related

Razorpay Implementation

I have implemented the Razorpay according to the steps given by the Razorpay document for the iOS but when I try to open Razorpay screen, it is not opened. Please suggest me to successfully open the screen.
Case 1:
Keep in mind that razorpay accept payment in Paisa only, so if you want to make payment of INR 100.5, you have to pass 10050. Now if the value is INR 100.457, you have to floor it and pass 10046 only, 10045.7 won't accepted.
Case 2:
Please check your navigation bar status. This issue might help you https://github.com/razorpay/razorpay-pod/issues/42

How can I save my shoppers' credit cards in Bluesnap?

I'm integrating bluesnap's payment API with my website. How do I store the card information in bluesnap so that I don't have to do it in my own database?
If you are using the Payment API, you can save credit card data at the shopper level. To do this, you create a saved shopper in BlueSnap and include the card data for that shopper. You can also include information like the shopper's name and address.
For example:
<vaulted-shopper xmlns="http://ws.plimus.com">
<first-name>FirstName</first-name>
<last-name>LastName</last-name>
<payment-sources>
<credit-card-info>
<credit-card>
<card-number>4263982640269299</card-number>
<security-code>837</security-code>
<expiration-month>02</expiration-month>
<expiration-year>2018</expiration-year>
</credit-card>
<billing-contact-info>
<first-name>billingFirstName</first-name>
<last-name>billingLastName</last-name>
<country>US</country>
<state>MA</state>
<address1>10 Main St</address1>
<address2>Apt 1</address2>
<email>email#example.com</email>
<zip>01752</zip>
</billing-contact-info>
</credit-card-info>
</payment-sources>
</vaulted-shopper>
More information and examples are here: http://developers.bluesnap.com/v2.0/docs/create-vaulted-shopper

Can PayPal's CUSTOM variable be used on eBay?

I program with PHP and I'm familiar with getting data from PayPal's IPN. I need to send custom data to ebay and get it back when payment is made. For example, if sold 1 Widget on ebay and that widget has a stock number of 12345A, I receive data back from PayPal. I get things like customer's name, address, item name, etc. But, unless I include that stock number in my title, I don't see any way to get that data back from PayPal. I don't want to use ebay's limited title space for including my stock numbers. I realize I could do it if I had another database to store ebay's item numbers and cross reference them with my stock numbers, but I don't want to do that.
I have noticed that when data comes back from PayPal after an ebay sale, it includes the custom variable and that variable has a large number in assigned to it. I have no idea what that is. I've also tried using ebay's custom label feature that's found in Turbo Lister and Selling Manager Pro. I was hoping that would be sent back in PayPal's custom variable, but no luck. Any ideas?
As you've discovered, it looks like it's some internal id number uniquely identifying each eBay order. You can probably forget about specifying a value for this field as it isn't documented anywhere.
The best solution to your problem is to use the eBay API. GetSingleItem will return information about an item given the item id.
The ItemSpecifics list will contain any item specific data that the seller has entered about the product. In my case, I added a custom field called SKU to the eBay item. Just add itemspecifics to your include selector. The call can be executed with a GET request:
http://open.api.ebay.com/shopping?callname=GetSingleItem&IncludeSelector=ItemSpecifics&appid=YOURAPPID=515&ItemID=ITEMIDOFINTEREST
What you get back will contain those custom fields you added to your item:
..
<ItemSpecifics>
<NameValueList>
<Name>MPN</Name>
<Value>MyPartModelA</Value>
</NameValueList>
<NameValueList>
<Name>SKU</Name>
<Value>123-456</Value>
</NameValueList>
</ItemSpecifics>
..

How to get item price of the return URL Sandbox PayPal

I get the following return URL of SandBox PaylPal:
http://mysite.com/success.aspx?tx=9A255742LJ154054X&st=Pending&amt=74.00&cc=USD&cm=&item_number=Product%201
So it sends the total value amt=74.00 and not the item price which is $59.00.
So my question is how to get the item price?
Thank you!
You need to make sure you're including itemized details in the button code you're using. PayPal provides this list of standard variables you can use in your buttons, and you may want to refer directly to the shopping cart section.

Any example on how to implement the new VerificationController and the KNOWN_TRANSACTIONS_KEY constant?

I've been looking at implementing the new VerificationController to verify in-App-Purchases:
http://developer.apple.com/library/ios/#releasenotes/StoreKit/IAP_ReceiptValidation/_index.html
And I wonder if there is some example anywhere en how to validate a transaction, since it seems that the - (BOOL)verifyPurchase:(SKPaymentTransaction *)transaction; is not enough and it has to be implemented internally to verify the purchase when the data form the server is received.
Another question is if anyone has a clue on what the KNOWN_TRANSACTIONS_KEY is and how to fill it, is it just the product id of the purchase?
In the file "VerificationController.m", check this function:
- (void)saveTransactionId:(NSString *)transactionId
we can see, KNOWN_TRANSACTIONS_KEY is a key to be wrote to NSUserDefaults. So we don't need to touch it.
login iTunes Connect > Manage Your Apps > (click your app) > Manage In-App Purchases > click the link View or generate a shared secret (at bottom-left of the page)
it'll show us:
A shared secret is a unique code that you should use when you make the
call to our servers for your In-App Purchase receipts.
Just click Generate.
You can find a complete implementation over here: https://github.com/evands/iap_validation
RayWenderlich.com Tutorial
This article, In-App Purchases in iOS 6 Tutorial: Consumables and Receipt Validation on the RayWenderlich.com site, offers a download of Apple's code but fleshed-out (including Base64 methods) and tweaked.
You need to perform the validation on a transaction when it changes to one of the completion states:
SKPaymentTransactionStatePurchased
SKPaymentTransactionStateRestored
call the function:
[[VerificationController sharedInstance] verifyPurchase:transaction];
As you say it is not enough to just look at the return value. The function is asynchronous. You need to add some code to VerificationController.m where it says:
#warning Validation succeeded. Unlock content here.
There are also a few other lines with #warning in VerificationController.m where you need to deal with errors.
As for base64 another library you might want to look at using is:
http://www.imthi.com/blog/programming/iphone-sdk-base64-encode-decode.php
When it comes to
KNOWN_TRANSACTIONS_KEY
and
ITC_CONTENT_PROVIDER_SHARED_SECRET
I too would like to know what they are for and why and when they are needed.