How to retrieve last four card digits after successfull transaction using Square Point of Sale API? - square-connect

I'm trying to use Square Point Of Sale API in my android app to deal with card payments utilizing square hardware. In order to generate valid customer receipt in my android app, I need to retrieve some information from Square about the card that was used to complete the transaction (such as four last digits).
I've tried to see what data com.squareup.sdk.pos.ChargeRequest.Success object returns, but as I understand - it only returns transactions ID's and metadata that was passed from my app to begin with.
Any ideas how can I solve this problem?
Thanks.

You would use the transactionId that is returned to you to pass it along to the BatchRetrieveOrders API endpoint (transaction_id == order_id), in order to find more information about the transaction including the last 4 digits of the card used. The last 4 would be available via Order->tenders[0]->card_details->card->last_4.

Related

how to create logic that returns a certain number of cards based on the output of an API

I am calling an API where i get a set of information back as an object (e.g. screenshot). Because the value “bill_number” equals 2, I then want to create some logic that means that: because 2 instances of bills have been returned from the API (bill_number == 2) the next response from the bot should be 2 hero cards (in a carousel) with each card displaying different pieces of information: Card 1 to display the values of bill number 1 and card 2 to display the values for bill number 2. Similarly, if the value of "bill_number” returned when calling the API again was 4, i want the logic to then create 4 cards. I am unable to find the logic to create this.
 (see image)
information returned from api
It sounds like you need to use dynamic adaptive card to achieve this outcome.
I did find this which appears to be looking to do something similar - https://github.com/microsoft/BotFramework-Composer/issues/3674

processing loyalty swipe cards in square

I was taking a look at the Square API. I am trying to find a solution for VIP/loyalty cards for a private club. I feel like the square API would be useful. What I am trying to figure out is if it is possible to read data from a gift card/security card in the API. My Idea is to use the reader in two places, at the front door to verify VIP status and for payment. Ideally, the card would have a member id that could be linked to a Facebook account, as well as looking up saved payment info in Square. I would like to use the API to build a tablet app to manage all of these functions as well as provide discounts prior to payment processing.
I noticed mentions of 3rd party gift card support, does that mean this would be possible? or is the data for non credit card swipes still locked down?
You cannot get card data from the readers. The gift card support is only for payments.

Square API: How to generate test orders without getting charged?

I am developing an app that uses the Orders endpoint.
As far as I can tell, there is no way to place an "order" without providing a credit card. Which means there are fees (because there is no square sandbox...)
Is there any way to test my integration without incurring fees??
Note: This stackoverflow answer gives a work around for the Payments endpoint, but that is not helpful in my case.
Square has sandbox where you can use the sandbox nonce and predefined credit cards. In this way you will not get charged for the orders. Check this link https://docs.connect.squareup.com/articles/using-sandbox/

Stripe & transferring funds

I am currently in the process of planning & developing an integrated application using Stripe in addition to some other technologies (a combination of backbone & laravel). As a result I am using Stripejs in combination with the PHP stripe library.
I use stripejs to send Stripe their account info (for savings accounts I send country, routing and account numbers via stripes js lib, I then save off the created token in the response to the backend). I am attempting to transfer money to various recipients following charging accounts (so I have money in my stripe account) but I am a bit confused over exactly what approach to take.
My main questions are as follows.
If I am positive of the identities of the individual’s using the application, is verification required (5 – 10 people max will be using)?
If it is required what is the best approach to verifying the user using the current technique I am using (create a token, save off on the backend)?
From my experience with Stripe, you don't need to 'verify identities' each time you use a token, so long as a customer has been set up for recurring use. So as long as your application is properly secured so that only the 5-10 people can use it, and can only process payments for their own accounts, you are good to go. In other words, you obviously want to do your own user verification to make sure only valid people can use the application, but you don't need to do it as far as Stripe is concerned.
That said, if you are in essence transferring money between people, you might want to go the extra distance and make sure that the user has the correct card number or bank account number each time. In which case I would use something like:
Get user data using tokens stored in DB.
$cu = Stripe_Customer::retrieve("cus_4pn93XXXXXXXXXXX");
$card = $cu->cards->retrieve("card_14g7ZU4rLTyXXXXXXXXXXX");
If Stripe's returned data matches user-submitted data, you know you have the correct user. In particular, if the last 4 digits of the card and the expiry date match the last 4 returned by Stripe and the Stripe returned expiry date, you can be reasonably sure (albeit not certain) that the person actually possesses the card in question.

PayPal PayFlow with MVC3 ASP.NET

Hi I was using this article
http://www.codeproject.com/Articles/152280/Online-Credit-Card-Transaction-in-ASP-NET-Using-Pa?msg=3753796#xx3753796xx
to understand the PayFlow Transaction Process and how to develope it.
After doing some successful tests from the example, I had some doubts about how I should be developing it for the release version.
1.- I'm planning to use the SDK methods and NVP call just like in the example for the release version. However, I don't know if I should be using something more like secure certificates or services call (I tried calling the wsdl service from .Net Wizard but I couldnt find any service that had to do with PayFlow Transactions).
2.- Also, in the PDF:
https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_PayflowPro_Guide.pdf
There are some examples, like the one in page 29, that state:
//Typical Sale Transaction Parameter String
//The following is a typical PARMLIST string passed in a Sale transaction.
"TRXTYPE=S&TENDER=C&USER=SuperUser&PWD=SuperUserPassword&VENDOR=SuperUser&PA
RTNER=PayPal&ACCT=5105105105105100&EXPDATE=1209&CVV2=123&AMT=99.00&FIRSTNAM
E=John&LASTNAME=Smith&STREET=123 Main St.&CITY=San
Jose&STATE=CA&ZIP=12345&COMMENT1=Reservation&INVNUM=1234567890&PONUM=C12345
&CVV2=567&VERBOSITY=MEDIUM"
//Note that, besides the required parameters that you pass in a Sale transaction, this string
//includes other typical parameters. The COMMENT1 (and COMMENT2) fields help to track
//transaction information. The customer’s street address (STREET) and zip should be passed to
//use address verification service. CVV2 is needed for card security code validation.
What I dont understand in that example is why is using the CCV2 parameter twice. Also, I dont know what the INVNUM and PONUM parameters mean. Furthermore, I know the test will be successful if I dont pass the CCV2 (security code) parameter and the adress parameters, but arent these mandatory? It gets me a bit confused, since for the DirectPayment Service, they are.
3.- In the PDF, there is a section called "Submitting Purchasing Card Level 2 and Level 3 Transactions" in page 99. In page 100, it says:
//Level 2 and Level 3 data is generally considered non-financial data. Lack of adequate data
//may cause a transaction to be downgraded.PayPal generally requires up to Level 2 information in
//an Authorization transaction followed by additional Level 3 data in the associated
//Delayed Capture transaction. A Sale transaction should include all Level 3 data
//since it is authorized and later settled.
Does this means that I "Need" to use more parameters than the required ones for a Sale transaction; otherwise, the transaction might be downgraded?
1) PayPal provides PayFlow documentation that covers all of that. You'll basically need to send the same login credentials used at manager.paypal.com along with your API requests.
2) I think that's just a mistake that they have the CVV2 parameter included twice. You only want to include it once. The documentation I linked to before will cover what all the request parameters mean, but the INVNUM is what you can use to track your own invoices within the PayFlow/Paypal system. PONUM is similar, but would be a PO number instead of an invoice number. You could search on these values in the future if you need to find them in the PayPal system.
With both PayFlow and Direct Payment, the requirement of CVV2 and a matching billing address depends on your account's Fraud Filter settings. If you've set it up to require them then you'd get an error without it. If it's setup to accept failures/mis-matches then it'll do so accordingly.
3) No, you won't need to worry about this.

Resources