forked from sunnysideup/silverstripe-payment_paypal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
32 lines (24 loc) · 1.34 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Paypal Payment Type
Testing setup:
You will need a PayPal sandbox account, along with merchant and customer test accounts,
which can be set up by following this guide:
https://developer.paypal.com/en_US/pdf/PP_Sandbox_UserGuide.pdf
How to set up your paypal account:
-Set up a paypal merchant account
-Log in
-Visit 'My Account' > 'Profile'
-Click 'API Access' link (listed under Account Information)
-Click option 2 : 'Request API credentials'
-Choose 'Request API signature', and click 'Agree and Submit'
-Enter these details into your mysite/_config.php file with either the set_config_details or set_test_config_details functions
Notes / Troubleshooting:
-you must be logged into sandbox to process a test payment.
Add the following to your mysite/_config.php, and populate values with the appropriate information from your Paypal account:
if(Director::isDev() || Director::isTest()){
PayPalExpressCheckoutPayment::set_test_config("TestPaypalAPIUsername","TestPaypalAPIPassword","TestPaypalSignature");
}
elseif(Director::isLive()){
PayPalExpressCheckoutPayment::set_live_config("PaypalAPIUsername","PaypalAPIPassword","PaypalSignature",false);
}
Troubleshooting:
If you get the message "PayPal could not be contacted" , check your debug.log file, found in the root of your site. This will contain debugging information.