<?php /******************************************** PayPal API Module Defines all the global variables and the wrapper functions ********************************************/ $PROXY_HOST = '127.0.0.1'; $PROXY_PORT = '808'; $SandboxFlag = RJDGPP::isSandbox(); $API_UserName = "******"; $API_Password = "******"; $API_Signature = "AORAj1v8XSqDVtzLwF3tm-9gDM.xA85nEntMpgQ74Zm4Uv9hZAkgYkjE"; if ($SandboxFlag == false) { $API_UserName = RJDGPP::getApiUser(); $API_Password = RJDGPP::getApiPass(); $API_Signature = RJDGPP::getApiPass(); } // BN Code is only applicable for partners $sBNCode = "PP-ECWizard"; /* ' Define the PayPal Redirect URLs. ' This is the URL that the buyer is first sent to do authorize payment with their paypal account ' change the URL depending if you are testing on the sandbox or the live PayPal site ' ' For the sandbox, the URL is https://www.sandbox.paypal.com/webscr&cmd=_express-checkout&token= ' For the live site, the URL is https://www.paypal.com/webscr&cmd=_express-checkout&token= */ $API_Endpoint = "https://api-3t.paypal.com/nvp"; $PAYPAL_URL = "https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token="; $PAYPAL_DG_URL = "https://www.paypal.com/incontext?token=";
break; case 'remove_meta': $r = new RJDGSHOP(); if ($r->deleteMeta($idata['id'], $idata['meta'])) { $odata['id'] = $idata['id']; $odata['response'] = 'success'; } break; case 'sandbox': if (isset($idata['value']) && $idata['value'] == 1) { $odata['response'] = RJDGPP::setSandbox(1); } if (isset($idata['value']) && $idata['value'] == 0) { $odata['response'] = RJDGPP::setSandbox(0); } $odata['sandbox'] = RJDGPP::isSandbox(); break; case 'setCred': if (isset($idata['api_user']) && isset($idata['api_pass']) && isset($idata['api_sig'])) { if (RJDGPP::setCred($idata['api_user'], $idata['api_pass'], $idata['api_sig'])) { $odata['response'] = 'success'; } } else { $odata['response'] = 'invalid entries'; } break; case 'getCred': $odata['response'] = 'success'; $odata['creds'] = RJDGPP::getCred(); default: }