How to create items in paypal for in app purchase - paypal

I am building an in app purchase shop for my companies pc game.
I know that in android and ios you create the items in your developer account and then buy them through there.
Is there a way to do something similiar in Paypal?
P.S. I have already developed the connection with paypal's rest api and am able to charge users through paypal. But Instead of passing the price of the item and it's description etc.. to paypal I would rather pass an item code and have paypal show the user the correct price in his currency. Plus I want to be able to pull this data from paypal and display it to the user from there.
My server is gamesparks which works with a node.js and mongo db.

PayPal does not offer anything like what you're wanting. You can pass through the item_name variable so that the order invoices show the item name, but you can't set up any items with prices/description. Usually that process is taken on by the developer on the project side, not processor side.
The most effective and safest way to retrieve information for PayPal payments is to set up an IPN. Here is the documentation if you are unaware.
https://developer.paypal.com/docs/classic/products/instant-payment-notification/

Related

Using Paypal (or alternative) so my customers can sell items directly

I've been searching Paypal's products and docs and I can't seen to confirm or deny if Paypal is a solution for what I need, so wanted to ask the community.
I run a web platform for creators to spin up websites. One common request is to create a page for them to sell their merch. I don't want to re-create Shopify/etc.. so have been telling them to go use that and link to their store from their website. But I'm wondering if there's an easy way to give them a very basic store experience using standard Paypal Buy Buttons.
My ideal approach:
Create a ShopItems model and users add items with price, description, shipping cost.
User adds their Paypal merchant ID
I generate a Buy with Paypal button that simply sends info to Paypal about the product being sold, how much to charge, etc..
I dont need any shopping cart functionality, and I dont want to have anything to do with the payment. I just want the end customer to feel like they're purchasing something (not sending someone $ via venmo), and have a place to add their shipping info, etc..
Currently, I see how a user can create accounts in their paypal account and then they're given a specific button for that item, but I'm trying to make this a little simpler where the user creates the product in my system and I just use Paypal for invoice/payment.
Would love any thoughts / ideas.
Integrate a version of PayPal Checkout: https://developer.paypal.com/docs/checkout/
Some sample demo code here: https://developer.paypal.com/demo/checkout/#/pattern/client (use the server version if you need robust payment completion notification -- this requires implementing two routes on your server, one for 'Set Up Transaction' and one for 'Capture Transaction', documented here: https://developer.paypal.com/docs/checkout/reference/server-integration/ )
If you know the merchant ID you're processing transactions for, this can be specified when loading the SDK: https://developer.paypal.com/docs/checkout/reference/customize-sdk/#merchant-id
Whether or not you specify a merchant ID on the SDK line, that same or some other identifier needs to be specified in the purchase_units payee object when setting up the transaction: https://developer.paypal.com/docs/checkout/integration-features/custom-payee/

Store credit card details in Paypal payment

I wanna store card details while using Paypal payment, there is any why in Paypal SDKs which store details of card.
PayPal's REST API calls this a "Vault" and allows you to save the credit card details on PayPal's server so you don't have to save it on your own server. This way you can still process saved cards without any risk of saving it on your own server.
The Classic API (which is what I still prefer) has the same thing except that it's called Reference Transactions. You can run a card verification / $0 authorization, and then in the future you make a call to DoReferenceTransaction to process any amount you need using the card details PayPal has saved on their server.
Either way it's just a matter of building the API requests per the documentation. There are SDKs available to help you with this.
Paypal does not share its users' account details, especially card details to anyone. You have to use the unique account email address to define a user.
It is highly recommended to not save any payment information of users. Only transaction IDs, and perhaps a unique user ID or hash.

Paypal button integration passing session variables

Hello guys I am developing a web store where users are already registered it must track both users the one that is selling the item and the one that is buying the item also some instructions the buyer might to express to the seller.
I have not performed this kind of tasks before have been reviewing the Paypal developer Api however have not found the exact functionality I need right now.
i need to pass session variables from my app into the paypal mechanism.
Please let me know how to integrate a button for buying an item and then store the details about the transaction in my db cause need to know the userid of the users within my app.
Thanks a lot.-
In your case you can use the Express Checkout API or simple PayPal Standard + IPN
If you use Express Checkout, then you don't need to send any session variable to PayPal as the session is not closed and the last step of the transaction (DoExpressCheckoutPayment) occurs in your website. But, if you really want to send some custom data to PayPal you can do it by sending "PAYMENTREQUEST_n_CUSTOM" inside the SetExpressCheckout call.
If you use PayPal Standard + IPN. You can pass to PayPal the variable called "custom" (Pass-through variable for your own tracking purposes, which buyers do not see) and retrieve it back in the IPN.

Woocommerce and PayPal Here integration

I'm interested to see if anybody is looking to integrate Woocommerce with the PayPal Here payment App? More so the importing of products from Woocommerce to the PayPal Here App. Be a great addition.
I haven't looked into that specifically, but I will be adding a "virtual terminal" / POS functionality into my PayPal for WooCommerce plugin before long. I've got it planned for the next full version release.
It basically gives you a section in the WP admin panel where site owners can easily put together invoices using their WooCommerce inventory and then process those orders accordingly. I will be including the Invoicing API's so you can create an invoice from the Woo VT order page, or you'll also have the ability to swipe a card using a USBSwiper card reader. Of course, you could also key in card data if you needed to do it that way.
The cool thing about that is even when you key in the transactions you still get your 2.2% - 2.9% rate depending on your volume because it would be processed over Payments Pro in that case. Same with invoicing or swiping.
Back to your original question, though, I'm unaware of any API or tool that allows us to interact directly with the Here inventory. They do have the Sideloader API for PayPal Here, which would allow you to send inventory (or a specific order) into the Here app from your own app in order to complete an order, but I don't think it lets you push inventory directly into the actual Here app.
On that note, what I could potentially do is build a stand-alone app that does nothing but pull in current WooCommerce inventory, and then from there you could create orders through the Sideloader API using that inventory, but it would use the Here app to actually complete the order. Seems a little clunky, but in theory, that should work fine.
If you want to contact me directly we could discuss getting this done for you.
Right at this time PayPal Here is designed to be card present, so you cannot import your products from Woocomerce into the PayPal Here App.
Here is a link to an FAQ on PayPal Here:
PayPal Here FAQ
Here is the current list of PayPal Here Partners:
PayPal Here Partners

Which PAYPAL method to use?

I am working an e-commerce site which will allow pdfs to be downloaded once payment is done.
So, user will put them in a cart, click buy using paypal and from there will come back to see download link on a success page.
I have implemented PDT.
Not sure which is the best option ?
Please help. I want to take care of any connection lost scenario too, like user completes payment at PAYPAL and while returning back to our site's success page, connection is lost and for some n days, user couldnt access internet as well.
I would just use the IPN.
Keep a record in your database that has all of the order items.
e.g. Order and Order Items (in 2 tables)
Then send that primary key across as the "custom" variable.
Then your ipn handler page will validate the payment and then email the customer their digital goods.