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
Related
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();
I'm using Paypal Website Payments Standard to accept recurring payments, but thinking of upgrading to "Enhanced Recurring Payments" to accept recurring payments from people without paypal accounts. I want to know, what if any are the changes to the APIs? Specifically, do the IPN messages differ at all? I can't find any information on how Enhanced Recurring Payments changes it, if at all.
If anybody knows, or can post a sample IPN for an Enhanced Recurring Payment without a PayPal account, that would be great!
There is a difference of only one variable between the IPN for PayPal Payments and the Credit card Payments . For the credit IPN you will receive an extra variable "receipt_id" in addition to the other variables . I have posted the two sample IPN's below :
ERP IPN when somebody pays via credit card option
mc_gross=1.00 &protection_eligibility=Eligible &address_status=confirmed &payer_id=ZQSC4
4KE3MPNE &address_street=3710 Spring Haven Trail ada &payment_date=07:49:47 Sep 29, 2014 PDT
&payment_status=Completed &charset=UTF-8 &address_zip=07054 &first_name=Eshan &
option_selection1=Small &option_selection2=Red &option_selection3=Value for the text field &
amp;mc_fee=0.33 &address_country_code=US &address_name=Eshan agag ¬ify_version=3.8 &a
mp;subscr_id=I-KJR1N7DVTSFV &custom=THIS IS CUSTOM VARIABLE FOR SUBSCRIPTION &payer_status=u
nverified &business=XXXXXXXXX &address_country=United States &address_city=Pa
rsippany &verify_sign=Aw6X5vyHflgdAgaJGWvPoCJ8QoI9AGpk50cgjQn5vFFAb.keQURphbSq &payer_email=
jain#jainwain.com &option_name1=First Drop Down &option_name2=Second Drop Down &option_n
ame3=This is Text field &contact_phone=434-343-3434 &txn_id=9E162447RW023401J &payment_t
ype=instant &last_name=agag &address_state=NJ &receiver_email=XXXXXXXXXX &
payment_fee=0.33 &receiver_id=XXXXXXXXX &txn_type=subscr_payment &item_name=Passing
custom field in subs button to see if it comes in IPN and show up in Account &mc_currency=USD &a
mp;residence_country=US &test_ipn=1 & **receipt_id=3610-4109-0310-2116** &transaction_subject
=Passing custom field in subs button to see if it comes in IPN and show up in Account &payment_g
ross=1.00 &ipn_track_id=42d902b155b6d
IPN when someone pays via PayPal
mc_gross=1.00 &invoice= 12345678 &protection_eligibility=Eligible &address_status=confir
med &payer_id=XXXXXXXXXX &address_street=cxas asa &payment_date=09:40:46 Sep 29, 2014
PDT &payment_status=Completed &charset=UTF-8 &address_zip=95616 &first_name=Eshan P
ersonal Test &option_selection1=Small &option_selection2=Red &option_selection3=Using th
e text field as the hidden one and also passed invoice id &mc_fee=0.33 &address_country_code
=US &address_name=Eshan Personal Test Account ¬ify_version=3.8 &subscr_id=I-79KEGCFRB
8V6 &custom=THIS IS CUSTOM VARIABLE FOR SUBSCRIPTION &payer_status=verified &business=XXXXXXX
&address_country=United States &address_city=FL &verify_sign=ABoC7zeo
JKOS8-FgzxlPH0pKFIpkABi1td4dId5Vndd1boMDXpvdWXfX &payer_email=XXXXXXXXX &option_n
ame1=First Drop Down &option_name2=Second Drop Down &option_name3=This is Text field &co
ntact_phone=408-767-7151 &txn_id=5LX310552A647342M &payment_type=instant &last_name=Acco
unt &address_state=FL &receiver_email=XXXXXXX &payment_fee=0.33 &receiv
er_id=XXXXXXX &txn_type=subscr_payment &item_name=Passing custom field in subs button
to see if it comes in IPN and show up in Account &mc_currency=USD &residence_country=US &
;test_ipn=1 &transaction_subject=Passing custom field in subs button to see if it comes in IPN a
nd show up in Account &payment_gross=1.00 &ipn_track_id=80ffac6da5284
I have attached Screen Shot also :
I have a simple button created with Paypal's Website Payments Standard, and I'm using the feature "Take customers to this URL when they finish checkout".
On that page which users are being redirected to when the purchase is successful (on my site) I'd like to simply display the email associated with their paypal purchase, telling them something like "an invoice will be sent to this email address: xxx".
Is that possible without using the API or IPN (which I'd rather avoid because it seems like I can't set different IPN urls for deifferent buttons/products.)
Ended up using PDT, there's a great example of how to simply do this here:
http://www.geekality.net/2010/10/19/php-tutorial-paypal-payment-data-transfers-pdt/
Thanks PP_MTS_Chad, I wouldn't have found it if it wasn't for you pointing out that option.
You could use 1 of 2 ways to get information back to your return URL, without having to use IPN or an API. You could use PDT to return information back to your site, or you could use the return method which uses the variable "rm". You can find more out about IPN here, and there are also some sample scripts you can use on that site as well.
If you want to use the return method, this is a little different from PDT. With the return method you do not have to post the information back to PayPal to verify it. If you wanted PayPal to post the information over to your return page you would just simply enable auto return in your account under your profile. Then you would just include the following lines of code in your button code.
<input type="hidden" name="rm" value="2">
<input type="hidden" name="return" value="http://www.mysite.com/return.php">
The variable "rm", controls how you want the information sent back to you. You can set it to be a GET or a POST.
Allowable values are:
0 – all shopping cart payments use the GET method
1 – the buyer's browser is redirected to the return URL by using the GET method, but no payment variables are included
2 – the buyer's browser is redirected to the return URL by using the POST method, and all payment variables are included
The default is 0.
Note: The rm variable takes effect only if the return variable is set.
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.
I have set up a sandbox for paypal with a buyer and a seller. I have created a button for a subscription and pasted the code into my website along with the custom hidden field with the value ofv 121. In the Optional Fields I added "custom=0" as just adding "custom" alone would not save.
I processed the payment and checked the returned post for the custom variable in the $_REQUEST() string and it was not their, how do I get at it. What I got was bellow:
http://www.socialise4fun.co.uk/success.php?auth=Cjr-longstring-OSBx...&form_charset=UTF-8
What do I do with it to get my data back.
I'm trying to pass through the user_id in the custom field that paypal says in many places you can.
You have to use IPN to receive this data. This data is not supposed to be available in the GET of the return URL.
Have a look at https://www.paypal.com/ipn/
In short: include <input type="hidden" name="notify_url" value="http://link-to-your-IPN-script"> in your PayPal button, and you'll receive a POST with this data once the transaction has gone through.