I have the following requirements:
The PayPal verification screen remembers the buyer between transactions.
The layout of PayPal verification screen is suitable for mobile devices (responsive layout).
Parallel payments (2 and more receivers).
Apple iOS Safari browser.
Current implementation:
PayPal API: Adaptive Payments.Reference: https://developer.paypal.com/docs/archive/adaptive-payments/integration-guide/APIntro/
Adaptive Payments kind of payment: parallel.
The payment approval type: Explicit approval.
We create the payment on the backend with the call:
POST https://svcs.paypal.com/AdaptivePayments/Pay
Body:
{
'receiverList': {
'receiver': [
{
'primary': false,
'email': 'redacted#example.com',
'amount': '.51'
}
]
},
'memo': 'redacted',
'returnUrl': 'http://oursite.example.com',
'cancelUrl': 'http://oursite.example.com',
'feesPayer': 'EACHRECEIVER',
'actionType': 'PAY',
'currencyCode': 'USD',
'requestEnvelope': {},
'ipnNotificationUrl': 'http://oursite.example.com'
}
After getting the response, we redirect the buyer in Apple Safari (iOS 13.6.1) to:
https://www.paypal.com/webapps/adaptivepayment/flow/pay?expType=mini&paykey=AP-1234567
We get the following pages (one before login, the second after login):
PayPal OneTouch is enabled for the buyer account. Reference: https://www.paypal.com/us/webapps/mpp/one-touch-checkout
The buyer makes the payment in the US with a US-based PayPal account.
The problems:
The layout is not for mobile. It is hard to read and navigate.
PayPal doesn’t remember my previous authentication.
How to fix it?
Adaptive Payments is very old, was deprecated since December of 2017, and is now obsolete.
AP is not mobile optimized, and is not designed to work with One Touch.
You can still test it in Sandbox mode, and legacy live integrations may still work, but no new integrations are supported. You cannot obtain a new Adaptive Payments APP ID. They don't exist anymore.
Basically, you should not use Adaptive Payments for anything.
As for alternate solutions that might work for a "parallel" scenario, perhaps you could implement a PayPal Checkout to a single receiver that has Payouts, and then send Payouts to other receivers. You'll need to contact PayPal to find out if Payouts is permitted for your particular use case and will be activated for your account in live. Here is the information on requesting that approval: https://developer.paypal.com/docs/payouts/integrate/prerequisites/#get-access-to-paypal-payouts
Related
we have an application that utilizes auto renewable subscriptions in android.
The users are going subscribing through the app normally and the receipt is sent for our backend to be validated using the IAP Google API.
until this point everything is fine, but we recently discovred a loophole in our system, some users are subscribe and cancel their subscriptions and re-enable the auto subscription, this way google will issues a new receipt that is sent to our backend and we are giving them another year, this is easily solved by granting the only the duration given in the receipt
but then users started using the same google account with different accounts for our apps and they give everyone free subscriptions by the generated receipt
I read the API in here and I can't find any field that tells us that this receipt is only a re-activation not a new subscription
https://developers.google.com/android-publisher/api-ref/purchases/subscriptions
when we send a request for google api to get the info this is what we are getting:
status_from_google_play
{
"autoRenewing": true,
"cancelReason": null,
"countryCode": "SA",
"developerPayload": "",
"expiryTimeMillis": "1534073485784",
"kind": "androidpublisher#subscriptionPurchase",
"linkedPurchaseToken": "sometoken",
"orderId": "GPA.xxxx-xxxx-xxxx-xxxxx",
"paymentState": 1,
"priceAmountMicros": "290000",
"priceCurrencyCode": "SAR",
"purchaseType": 0,
"startTimeMillis": "1534071687580",
"userCancellationTimeMillis": null
}
There is no field that gives me this piece of information
am I missing something? is there another way to validate this?
Turns out the linkedPurchaseToken field can be used for this purpose
if the linked token is not empty it means it's a re-activation only or an upgrade/downgrade for the subscription.
It's not a direct usage as you can see but it's how you know.
I'm trying to setup the payout process for the merchants on my site, but for some reason when I use Stripe Test bank details I get with the error of "Known test bank accounts cannot be used in live mode". I'm using the development client ID for testing obviously, so not sure why am I end up with this error. :( Any ideas would be very welcome! Thanks.
The activation form expects real information about a real business. This means that even if you're testing, you might want to create a real account with real details and that's what Stripe asks for here.
Since you're only testing the OAuth flow and don't want to activate your account you should ignore the form entirely. When testing with your Development client id ca_XXXXX there should be a link at the top of the form called "Skip this account form". This links lets you bypass the activation form (which would be required in production) and finish the connection with the platform.
I am using the latest PayPal 2.01 SDK for mobile transactions. I have 2 PayPal business accounts (sales1 and sales2) and based on the transaction I would like to choose which account the transaction is paid to. I have a client ID for each account and want to choose which ID to use for the [PayPalMobile initializeWithClientIdsForEnvironments:#{PayPalEnvironmentProduction: ClientId] call. After I have initialized once, the next initialization is ignored and the client Id is not changed. Can someone tell me how to force the initialization to change the client Id.
if (condition) {
DLog(#"using PP Sales2 account");
[PayPalMobile initializeWithClientIdsForEnvironments:#{PayPalEnvironmentProduction: kPayPalSales2Id,
PayPalEnvironmentSandbox: kPayPalTest2Id}];
} else {
DLog(#"using PP Sales account");
[PayPalMobile initializeWithClientIdsForEnvironments:#{PayPalEnvironmentProduction: kPayPalSalesId,
PayPalEnvironmentSandbox: kPayPalTestId}];
Dave from PayPal here.
The scenario you describe, of switching clientId within a single session, is not one that we have designed the PayPal iOS SDK to handle.
Feel free to post this as an Enhancement request at our github repo.
I've seen posts that you should use ActiveMerchant for PayPal integration, but I also found this on the PayPal website.I'm struggling with placing what in which file, since I'm totally new to RoR. So I was trying to integrate the PayPal, but am not sure where to place which code.
Should I use active merchant for PayPal integration, or is the Rest-API the best choice. I want people to fill out their username, pay and when successful they receive digital content. So there should be a call with a result and the username.
Do you have a link, step by step, at least including which code I should place in which file, so I get the basics of RoR better.
Standard PayPal Integration with Rails app Active Merchant gem :
step 1:
-> add 'gem activemerchant' in gem file
-> bundle install
step 2:
-> Go to "www.developer.paypal.com" and create an account(also known as Merchant Account) with US address details.
-> It will create two dummy test account for buyer and seller(alias facilitator) in "sandbox.paypal.com".
Ex:
Seller account ---> naveengoud-facilitator#gmail.com
Buyer account ---> naveengoud-buyer#gmail.com
-> To see test accounts details Click on "Dashboard -> Accounts"
-> Now set the password for both test accounts by clicking on profile link
step 3:
-> Go to seller account(i.e, facilitator) profile details and copy the API Credentials i.e, Username, password and signature
Ex:
Username: naveengoud-facilitator_api1.gamil.com
Password: VSPALJ5ALA5YY9YJ
Signature: AVLslxW5UGzEpaDPEK4Oril7Xo4IAYjdWHD25HhS8a8kqPYO4FjFhd6A
-> Set these API Credentials in "config/environments/development.rb" as follows, add the below code with API credentials
config.after_initialize do
ActiveMerchant::Billing::Base.mode = :test
::GATEWAY = ActiveMerchant::Billing::PaypalGateway.new(
login: "merchant_api1.gotealeaf.com",
password: "2PWPEUKZXAYE7ZHR",
signature: "AFcWxV21C7fd0v3bYYYRCpSSRl31A-dRI5VpyF4A9emruhNYzlM8poc0"
)
end
step 4:
-> From here onward follow the Rails cast 145 episode(http://railscasts.com/episodes/145-integrating-active-merchant)
I found the PayPal API documentation to be quite confusing. Also, my application requirements were not satisfied through the API, so I ended up with a rather simple solution.
The solution mainly consists of two components:
PayPal buttons, which I generate on PayPal website and copy the HTML to my website
PayPal IPN notifications, for which I have a simple handler on my website
This is how the whole solution works in detail
For the user to make payments, I use the PayPal Buttons. For this, you just login to your PayPal business account and generate HTML code for buttons which you can copy and paste into your website.
The user can click on these buttons, they will be redirected to PayPal website, they make payments and have a button to come back to your website.
When the transaction is done (either success or failure), PayPal will inform you via PayPal IPN Notifications. I have implemented an IPN handler on my website, which was quite easy to do.
By the time the user returns to my website, in most cases, I would have already got the IPN notification, hence I can show them a success message.
In case the IPN got delayed, I tell the users that it will take a couple more minutes to update their balance and use AJAX to keep querying the server for updates.
Here are some useful references:
PayPal Buttons
Rail Casts on PayPal IPN
If you need, you can also dynamically generate the buttons via the Button Manager API gem
This link will help you to get better understanding on integration of Basic Checkout, Charge Credit Cards and Recurring Payments with paypal in Ruby On Rails application
http://www.gotealeaf.com/blog/basic-paypal-checkout-processing-in-rails
You can find solutions for following concepts,
1) Basic Checkout
2) Charge Credit Cards
3) Recurring Payments
Look at this for rails integration:
https://github.com/nov/paypal-express see the example and wiki
but also here, more in general (less related to Rails):
https://github.com/tc/paypal_adaptive
https://github.com/fnando/paypal-recurring
-
I'd appreciate any help with this, I've run around in circles trying all sorts of combinations with the PayPal Api - but I'm hitting a brick wall on this one.
I'm looking to call the CreateBillingAgreement method but each time I do it fails and reports a 10001 'internal error' from paypal in the response.
I have a valid token and I'm using version 84.0. I've successfully called SetupExpressCheckout and DoExpressCheckout, both of which succeed and the payment goes through. I'm setting up a future payment / pre-authorisation on the SetupExpressCheckout and the user agrees to that no problems.
Do I need to change settings on the merchant in the sandbox? Am I calling things in the wrong order maybe? (SetExpress, GetExpress, DoExpress, CreateBilling)?
I'm looking to use this billing agreement to allow a reference transaction in the future. I'm having a test account 'pay' using paypal and not forwarding any credit card details, the payment is for a digital service with no delivery (no shipping is set, no addresses or delivery costs are involved). The overall goal is to provide a one-click re-order button, whereby no details need to be entered by the customer.
I'm using the C# api in asp.net 4, or more specifically I've created Service References from the paypal sandbox wsdl and I'm using those in asp.net.
Any and all help is appreciated - thanks.
Russell.
You don't need to call CreateBillingAgreement if you're specifying billingtype MerchantInitiatedBilling in your SetExpressCheckout and DoExpressCheckoutPayment API call. CreateBillingAgreement is only necessary if you don't want to call DoExpressCheckoutPayment.
If MerchantInitiatedBilling is set, DoExpressCheckoutPayment will already return a billing agreement ID, which you can use in DoReferenceTransaction.
I don't have access to an example at hand, but will update this post as soon as I've found one for you.