I'm using the PHP library here to create a new subscription profile. If I set an initial amount, the profile appears as "Pending".
Example:
Pending
Customer Mark Wally Verified
Profile start date Feb 18, 2013 | Profile ID I-BE824P6F9PER
On the other hand, if I set no initial payment amount, the profile will be "Active". I am setting the initial payment and the start date 1 month in the future since I want to bill monthly and get a payment right away.
I've already verified:
Account is set to accept money in any currency
The seller account has digital goods enabled (created via automated process)
Both accounts are verified
The buyer account has a credit card as well as a paypal balance
Both accounts are US based
I've tried with multiple accounts
Any help would be greatly appreciated!
Code snippet to create the subscription that use the library listed above:
$subscription_details = array(
'description' => 'Premium membership: $4.95 every 30 days',
'initial_amount' => '4.95',
'amount' => '4.95',
'period' => 'Day',
'start_date' => gmdate( 'Y-m-d\TH:i:s', strtotime( '+30 day' ) ),
'frequency' => '30'
);
Just in case someone else has this trouble, my findings are:
There is nothing to solve -- the sandbox is just really slow, sometimes it took a couple days for the profile to become active and send the IPN. In other words, sandbox isn't good to test these functions at all, just go live and refund a couple tests. Even live sometimes takes a bit of time... I've seen it take a few hours sometimes, so don't go crazy.
From PayPal doco:
"By default, PayPal does not activate the profile if the initial payment amount fails. To override this default behavior, set the FAILEDINITAMTACTION field to ContinueOnFailure. If the initial payment amount fails, ContinueOnFailure instructs PayPal to add the failed payment amount to the outstanding balance due on this recurring payment profile.
If you do not set FAILEDINITAMTACTION or set it to CancelOnFailure, PayPal creates the recurring payment profile. However, PayPal places the profile into a pending status until the initial payment completes. If the initial payment clears, PayPal notifies you by Instant Payment Notification (IPN) that it has activated the pending profile. If the payment fails, PayPal notifies you by IPN that it has canceled the pending profile"
from https://cms.paypal.com/mx/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_WPRecurringPayments, just below Table 6.
Related
I am using PayPal-php-sdk .I had successfully implemented recurring payment using this rest api . Currently the payment occurring in each end of the month.
But I want to charge immediately when the user subscribe ie the first payment will charged when user subcribe the plan. How can I implement this ? Please any one help.
I created mine to where I have a set up fee which charges immediately and then I set the regular payments to begin 1 month later.
$merchantPreferences->setReturnUrl("$baseUrl/paypal/ExecuteAgreement?success=true")
->setCancelUrl("$baseUrl/paypal/ExecuteAgreement?success=false")
->setAutoBillAmount("yes")
->setInitialFailAmountAction("CONTINUE")
->setMaxFailAttempts("0")
->setSetupFee(new Currency(array('value' => 8.50, 'currency' => 'USD')));
I hope this helps.
It is likely that you are encountering a bug in the PayPal Sandbox.
Please report it to PayPal Merchant Support.
If you don't offer free trial period the user must pay for the first cycle immediately. If you offer free trial period, you can control the sequence of the cycles to have the paid one first and then the trial one.
I have a question regarding Parallel payments and refunds. We are developing an application that sets up a Parallel payment, with ourselves as the My Store receiver and the provider of the service as the seller receiver. We provide a mechanism for the secondary receiver to refund the complete payment.
(source: ohozaa.com)
What we want to know is what happens when the seller receiver has no funds in their paypal account? From testing this in the sandbox and from what we've read, it seems that the seller receiver component of the refund becomes pending (we assume, as funds are pulled down from an associated bank account). Three things:
Has the My Store receiver paid the refund in full and is now waiting to get the payment from the seller receiver. Implying that, at this point in time, the My Store receiver is out of pocket?
What happens if funds cannot be pulled down from the seller receivers associated bank account?
What happens if we attempt a refund from an unverified user with no funds in their paypal account? Once again, does the My Store receiver pay the refund in full and hope to collect the seller receivers portion when they do have funds?
Unless I am misunderstanding the situation there are three possible questions/outcomes.
You submit a payment to pay mystore#test.com 10 dollars and seller1#test.com 90 dollars for a total of 100 dollars:
https://svcs.sandbox.paypal.com/AdaptivePayments/Pay
'currencyCode' => 'USD',
'actionType' => 'PAY',
'receiverList.receiver(0).email' => 'mystore#test.com',
'receiverList.receiver(0).amount' => '10',
'receiverList.receiver(1).email' => 'seller1#test.com',
'receiverList.receiver(1).amount' => '90',
'requestEnvelope.errorLanguage' => 'en-US',
buyer#test.com wants a refund:
1) If you have API permission to submit refunds for seller1#test.com you can refund his part of the transaction as well as yours. You do this by passing the receiverList variables:
https://svcs.sandbox.paypal.com/AdaptivePayments/Refund
'payKey' => $thepaykey,
'receiverList.receiver(0).email' => 'mystore#test.com',
'receiverList.receiver(0).amount' => '10',
'receiverList.receiver(1).email' => 'seller1#test.com',
'receiverList.receiver(1).amount' => '90',
'requestEnvelope.errorLanguage' => 'en_US',
'currencyCode' => 'USD',
1.1) mystore#test.com and seller1#test.com both have the funds, they are refunded immediately.
1.2) mystore#test.com has the funds, but seller1#test.com does not. An eCheck is submitted from seller1#test.com's bank account to pay for the refund, and the status will be PENDING until it clears from the bank. mystore#test.com has only paid buyer#test.com 10USD. buyer#test.com will have two transactions, one for 10USD that is completed, and one for 90USD that is pending. If the 90USD transaction fails, PayPal will try a second time to represent to the bank. If it fails again, seller1#test.com's transaction should go into a FAILED status and may not be refunded via the transaction. The only way to refund this transaction would be to do a send money.
2) If you do not have API permission to submit the refunds for seller1#test.com you will not be able to pass his receiver in the request. If you do, the whole refund will fail. You cannot exceed the amount you were originally paid (10USD)
3) If the seller1#test.com is not confirmed, or does not have an account created in paypal/sandbox, the transaction will be PENDING , and while it is pending the buyer can click cancel next to the transaction. You may also cancel the transaction before it shows COMPLETED by submitting a refund for their amount.
If this was a chained payment it may have a different outcome.
I am creating a subscription using Authorize.net ARB API. I can see in my account, where the subscription is created.
Its a very simple subscription, where a user would be paying $100 every month. I would like to know, if the user would be billed at the time of creation of the subscription ?
My understanding is that, he would be billed only from next month ? Any idea, how to bill the customer from the time the subscription is created ?
Thanks
ARBCreateSubscriptionRequest has parameter "startDate" where you can set date the subscription begins.
If first price should be different from monthly payments you can also set parameter "trialAmount" for first payment
All information you can find here
http://www.authorize.net/support/ARB_guide.pdf
You should always charge the first subscription payment using the AIM API. The AIM API will process immediately and act as a verification for the credit card. You will know immediately if a card is invalid and before you create the subscription. If you schedule a payment to process the same day the subscription is created it does not process immediately. That process later that night. If the credit card is invalid you lose the opportunity to have the user correct it because they are no longer present at your website.
I have a website (in development) which is using paypal (sandbox) to accept payments. I've setup a few sandbox users so I can test what happens when payments are send from my country and some foreign countries.
I've noticed that when setting up users with certain foreign countries, after making a payment, the foreign sandbox account gets a message saying "you're payment will arrive in 3-5 days". But the payment happens instantly in the sandbox account.
Why is that, is that just a sandbox thing? What I am asking is, when I go live, and if the user gets such a message, and if it does take 3-5 days for the payment to arrive, will paypal push the payment through to my ipn page as and when the payment happens, i.e. 3-5 days later?
I'm assuming that because I am using the paypal sandbox, they just display the 3-5 day message and push the details to my ipn page straight away?
Any time you get a payment that is pending for any reason you'll get an IPN at that time with a payment_status of Pending. When the status changes you will get another IPN with the updated status.
We have specific requirement list for recurring payment method which are as follow:
After registration process user can select plan for recurring payment which is like 7$/month.
While registering user can enter coupon code and if he/she choose recurring plan then user will get discount on first month only and rest of the month he has to pay decided amount (7$/month) for recurring.
User can cancel his/her recurring plan and switch to free account.
User's account (premium/free) is depend on the received payment. So i have to check that user's payment is received and if not then i have to update my database and make user as free user.
There is a scenario that user signed up with recurring payment method after some month he switched to free account. Now again he wants to sign up with recurring plan. how can i achieve above scenario.
I know there are two options (subscription and recurring payment) but i am confuse which is suitable for this scenario. If there is another solution available then please suggest it.
PayPal doesn't have a coupon code feature so that is something you would need to handle on your own.
You can set up a trial period for a Recurring Profile that lasts a month and would be charged at the lower rate. After that trial period the Recurring Profile would start billing the normal amount of $7.
A buyer will always be able to change their Recurring Profiles within PayPal. You can't have a Recurring Profile open with PayPal for free. We require that a positive amount is provided. You can still track the users on your own but there wouldn't be an active Profile for them within PayPal you can check.
An existing Recurring Profile can be updated but the amount charged cannot be changed more than 20%.
Either a Subscription button through Payments Standard or Recurring Payment API's through Express Checkout will allow you to do this. Express Checkout Recurring Payments can be handled entirely through API calls.