PayPal Sandbox -Amount not deduct on test purchase of any thing? - c#

I have setup a Personal and Business account using Paypal Sandbox. When I run a test purchase for, for example,$309539.24, in Business account balance and $4740.01 in Personal account balance. when i m purchase any thing purchasing process is running successfully. but no amount deduct and add in personal sandbox account and business sandbox account. paypal sandbox profile is successfully created.

Did you check the transaction history for both the accounts(i.e the Seller and the Buyer)?
Is the transaction/ purchase showing up there?
This is how you create sandbox accounts for testing.
Go to https://www.sandbox.paypal.com/
Login to your account.
Under 'Sandbox', click on 'Test Accounts'
For creating a new test account, you have two options:
1) Preconfigured
2) Create Manually
Click on 'Preconfigured'. Fill in the details, and hit on 'Create Account'
Follow the same steps to create the 2nd account.
Best practise is to name one account as 'seller' and the other as 'buyer'
This will avoid any confusion
Creating buttons and making purchases:
Click on Seller's account. Enter the password and login.
Go to 'Merchant Services' tab to create the product/button for Seller.
NOTE:For some reason, clicking on the 'Merchant Services' logs you out of that account.
Probably some issue with the PayPal's Sandbox site.
The alternative to this is to go to 'My Account' => click on Profile => Selling Preferences => My Saved Buttons => Create new button
After you finish entering the details of the product, click on 'Create Button'
You will get the HTML snippet. Paste this in a notepad file, and save it with the '.html' extension.
Open the file in the browser, click on the button to purchase the product.
Click on CheckOut with PayPal. Login with Buyer's account, and complete the purchase.
This will affect the account balances of both the Seller and the Buyer.
And you will be able to see the transaction in both the Seller and Buyers Account(Under 'Overview' or 'History')
Hope it helps you out.
Thank you.

Related

How to Create Account and get "Created" Response instead of "Completed" using Paypal Adaptive Accounts SDK

When I try to create account on behalf of my users by PayPal REST API, I get execStatus as COMPLETED which means that the account is not set up.
COMPLETED - The account creation request was successful, but the account holder must be redirected to finish setting up the account.
How can I create an account and get the CREATED response?
CREATED - Account creation is complete. No redirection is necessary to let the account holder finish setting up the account.
(at https://developer.paypal.com/docs/classic/api/adaptive-accounts/CreateAccount_API_Operation/)
At the very top of the page:
The CreateAccount API creates a PayPal account on behalf of the specified third party. The account can be a personal account, premier account, or business account.
I don't want my users to be redirected to PayPal. I will be getting their bank account information and add a bank account right after I create a PayPal account on behalf of them so they will be able to receive funds.
What I am trying to achieve is creating a PayPal account (without redirection) and adding a bank account to let them receive payments other users will make in the future.
I use PayPalAdaptiveAccountsSDK's public CreateAccountResponse CreateAccount(CreateAccountRequest createAccountRequest); method.
PayPalAdaptiveAccountsSDK: https://github.com/paypal/adaptiveaccounts-sdk-dotnet
How can I overcome this problem?

multi storied e-commerce with nop commerce

I am using nopCommerce 3.50. And trying to make it a multi storied. Every user signup here will have there specific e-commerce like nopCommerce.
Main features I have to focus is:
Every user(store owner(1 store/user)) will have their own subdomain.
user's will have full control on their store.
They can change theme or configure any settings as an admin of
NopCommerce can.
So what I am thinking to do is:
Create a new project(mother project).
Link One NopCommerce Solution with it.
when a user signup there, they create a new database as nopcommerce.
Name database uniquely for the user.
store db name and all user info in mother project.
When user sign's in, get the user db from mother db and set the path to nopCommerce Solutions db-path.
when a user logs in, user is redirected to a subdomain.
and loads the respective database for the user using same server-side and client-side code.
Is it possible or there is any other better way to do this?

Paypal Express Checkout - Change Continue button to PAY

I'm currently integrating the Paypal Express Checkout gateway in one of my website.
I'm using the .NET Paypal SDK (NUGET/Visual Studio 2013). I read Paypal's documentation and followed their guidelines and examples. I was able to get it working (after a little trial and error). But, the thing is, i'm not sure that my flow of operation is optimal. Let me explain the flow:
1) Customer logs in to the website
2) Customer chooses a Monthly plan to advertise on our website and click the paypal button (API CALL: SetExpressCheckout).
3) Customer is redirected to Paypal login page. Enter credentials and logs in.
4) Customer (still on Paypal page) reviews buying informations and clicks 'Continue' button (or Cancel link)
5) Customer is redirected to a Confirmation/Success Callback page on my website (API CALL on pageLoad event: GetExpressCheckoutDetails).
6) Customer (still in Confirmation Callback page) clicks an 'Accept transaction' button (or a cancel button). (API CALL: DoExpressCheckout)
7) Payment is processed and Paypal sends last payment details (status Completed, Pending, etc) to my Instant Payment Notification Callback URL on my website.
Now, the thing is, i've recently bought a digital album on Bandcamp and their flow was different at one part and more concise, and well, more 'express' than mine:
1) Customer clicks Name you price link. A modal opens.
2) Customer enters the amount and clicks the 'Checkout now' button.
3) Customer is redirected to Paypal login page. Enter credentials and logs in.
4) Customer (still on Paypal page) reviews buying informations and clicks 'PAY' button (or Cancel link)
5) Customer is redirected to a Confirmation/Success Callback page Bandcamp website. Payment is already processed and nothing more is asked of the customer.
So the question is how do change the 'Continue' button on Paypal to a 'Pay' button?
I can't seem to find my way on Google to answer this question, nor do i see this flow in my documentation?...
Note that these are both digital goods and no shipping is required.
Thank you!
When redirecting to PayPal add useraction=commit to the URL:
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&useraction=commit&token=<TOKEN>
or
https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&useraction=commit&token=<TOKEN>
A similar question was asked just a few days ago: Here If you want a more detailed answer you are going to have to post the part of your code where you redirect users to PayPal.

when a user logs in to a single location they are greeted with a questionnaire

Using Orchard 1.6 I am creating a application where the user creates an account and books a room for an evening.
If they choose, they can login later from other locations to double check or amend their booking.
BUT When they get to the reception area of the B&B they can login themselves on the reception computer. When they login (from the b&b computer only) a pop-up appears saying 'Welcome' and a link navigating the user to a questionnaire loads.
I only want the questionnaire to be viewable from the b&b computer, and only when the user logs in.
How is this done....a cookie perhaps? or using the IP of the computer?

PayPal Adaptive Payment Api pre-populate user data

I am making a website where we are going to host events and would like a user "USER A" to be able to start an event - enter their paypal account info and set a price. Then other users can register for their event and pay USER A directly, with out us having to process their credit card. We would like users that do not have paypal accounts to be able to pay with a credit card.
It looks like Paypal's Adaptive Payment is the best API for us to use to accomplish this. I have it working in the sandbox environment. My problem is this - a user clicks to register for USER A's event , then they enter all their info (name, address, company, ect.) we need to keep this info in our Database so this needs to be done first. Then they will click on a button that says "Pay with Paypal". This creates a paykey and redirects the user to the Paypal login page where the user has 2 options (a. login paypal or b. enter personal info again and credit card information)
I want to know how I can accomplish having all the fields already filled out in the Paypal page , so the user does not have to enter all of their information again. They will be able to delete data in the text boxes if the billing address happens to be different. But all websites I have ever seen to not make the user enter this information twice if they are identical. Now I know this is possible because I have seen other sites do it. I have looked into SetPaymentOptions API , but it is not very clear how that works , and I need user information to be passed even if they are not known to Paypal already.
I tried adding values as suggested in Paypal tutorials like this
<INPUT TYPE="hidden" NAME="first_name" VALUE="John">
<INPUT TYPE="hidden" NAME="last_name" VALUE="Doe">
<INPUT TYPE="hidden" NAME="address1" VALUE="9 Elm Street">
but that didn't work, Here is the raw data from Fiddler from the request :
POST https://svcs.sandbox.paypal.com/AdaptivePayments/Pay HTTP/1.1
Content-Type: text/xml;charset=utf-8
X-PAYPAL-SECURITY-USERID: scotts_XXXXXXXXX_biz_api1.live.com
X-PAYPAL-SECURITY-PASSWORD: 1344XXXXX
X-PAYPAL-SECURITY-SIGNATURE: AOLbPDojAEUdeQJ3wXagJXkxYeJDARg4IXXXXXXXXXXXXXXXXXXX
X-PAYPAL-SERVICE-VERSION: 1.1.0
X-PAYPAL-APPLICATION-ID: APP-80W2844XXXXXXXXX
X-PAYPAL-REQUEST-DATA-FORMAT: XML
X-PAYPAL-RESPONSE-DATA-FORMAT: XML
Host: svcs.sandbox.paypal.com
Content-Length: 810
Expect: 100-continue
Connection: Keep-Alive
I think for you the problem is not really the login to paypal in a popup, but the paypal registration process to be able to pay with the credit card. There is an api call in the adaptive payment api that allow you to process a registration on the behalf of a user.
You can directly prefil paypal informations on a page using your own design. On submit you create a paypal account using adaptive payment api, and the last step of this process will need you to open a paypal popup which will ask the user to complete his registration by adding a password and credit card information.
After this point you will find back the same payment behavior you have using the simple paypal login.
Please note to even more integrate all your website through paypal you can add preapproval, then the user will only see the paypal website once: when he will accept the preapproval (two steps in a light paypal popup: login > accept).
When the user checkout the first time:
Select between Create an account (using the way I explained above) or Pay with paypal
Create a preapproval key (see the doc on the api, you don't need to know the user paypal login), as returnUrl, specify a url with the local user_id
Open a paypal popup client side using the url returned by the previous step. The user will need to login with his paypal account and then accept the characteristics of your preapproval (limit in time, limit in money)
Paypal will redirect to the returnUrl of step2, it can be a page when you just say "This window will close automaticaly" with a js to close the page
You can now use the preapproval key to make payments on the behalf of the user
When the user checkout after the first time:
Ask for a confirmation "$XX will be taken on your linked paypal
account"
Pay using the preapproval key, and it's done!
Hope it will help!
Offical Response from PayPal:
" Adaptive Payments does not have any feature in the documents which does this. I apologize for the inconvenience this might cause."
I will leave this question open though in case someone has a better route for me to go to accomplish what I have explained in the question.
EDIT:
Incase someone else comes across this , it is offically 100% not possible - I ended up using Express Payment API , using this it is very easy to pass user parameters.
Dont use Adaptive Payment API
Adaptive payments was discontinued as of 01/12/2017 and PayPal Marketplace is the equivalent to adaptive payments.
You can learn more about the Marketplaces product on the PayPal Developer Portal: https://developer.paypal.com/docs/marketplaces/pp4mp/?mark=marketplaces
hello I think following link will help to you
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_APIntro

Categories

Resources