I am trying to create a paypal subscription button with paypal sandbox. I have created the dev account, created sandbox business and test accounts. Logged into my business test account, went to merchant services -> my saved buttons.
Found the subscription button and copied the code.
I have uploaded the form to my codeigniter controller at: http://422clients.com/ftg/paypal/test
I am using this paypal IPN library for codeigniter: https://github.com/orderly/codeigniter-paypal-ipn
I am using unmodified controller code for now to handle the IPN response because it writes it to the database just fine for testing:
function ipn()
{
$this->load->library('PayPal_IPN'); // Load the library
// Try to get the IPN data.
if ($this->paypal_ipn->validateIPN())
{
// Succeeded, now let's extract the order
$this->paypal_ipn->extractOrder();
// And we save the order now (persist and extract are separate because you might only want to persist the order in certain circumstances).
$this->paypal_ipn->saveOrder();
// Now let's check what the payment status is and act accordingly
if ($this->paypal_ipn->orderStatus == PayPal_IPN::PAID)
{
//Enable database subscription...
}
}
else // Just redirect to the root URL
{
$this->load->helper('url');
redirect('/', 'refresh');
}
}
My problem is that when i click the button on the site and pay with my sandbox test account everything looks totally fine and the payment goes through, but when I look in my database it says: Status: ERROR.
Reason Field says: email business_test@422studios.com does not match seller
business_test@422studios.com is the sandbox account that i generated the button from.
I'm totally lost here. Any help is appreciated.
In your config file, make sure you have this:
$config['paypal_ipn_sandbox_settings'] = array(
'email' => 'business_test@422studios.com',
'url' => 'https://www.sandbox.paypal.com/cgi-bin/webscr',
'debug' => TRUE
);
And that you pass this value in your form:
<input type="hidden" name="business" value="business_test@422studios.com">
enter linkus-mg4.mail.yahoo.com/neo/launch?.rand=3kitrpb4ebcpm#2543298090 description here 1. This is normal text. 2. So is this, but now follows a code block:
Skip a line and indent eight spaces.
That's four spaces for the list
and four to trigger the code block.`kakai_junior@yahoo.com
`
enter link description here 1. This is normal text. 2. So is this, but now follows a code block:
Skip a line and indent eight spaces.
That's four spaces for the list
and four to trigger the code block.`kakai_junior@yahoo.com
`
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.