1
votes

i am working with paypal pro using sandbox so far it is working fine with the one time payment but when i change it to recurring,it gives an error of DPRP is disabled for this merchant. here's the screenshot enter image description here

here the config code

<?php
/******************************************************************************
#                      PayPal PRO Payment Terminal v3.0
#******************************************************************************
#      Author:     Convergine.com
#      Email:      [email protected]
#      Website:    http://www.convergine.com
#
#
#      Version:    3.0
#      Copyright:  (c) 2012 - Convergine.com
#
#*******************************************************************************/
session_start();
error_reporting(E_ALL ^ E_NOTICE);
require("functions.php");
/*******************************************************************************************************
    GENERAL SCRIPT CONFIGURATION VARIABLES
********************************************************************************************************/
//THIS IS TITLE ON PAGES
$title = "PayPal PRO Payment Terminal v3.0"; //site title
//THIS IS ADMIN EMAIL FOR NEW PAYMENT NOTIFICATIONS.
$admin_email = "[email protected]"; //this email is for notifications about new payments
//CHANGE "USD" TO REQUIRED CURRENCY, SUPPORTED BY PROVIDER.USD, CAD, EUR
define("PTP_CURRENCY_CODE","USD"); 
//IF YOU NEED TO ADD MORE SERVICES JUST ADD THEM THE SAME WAY THEY APPEAR BELOW.
$services = array(
                  array("Service 1", "49.99"),
                  array("Service 2", "149.99"),
                  array("Service 3", "249.99"),
                  array("Service 4", "349.99"),
            );
//NOW, IF YOU WANT TO ACTIVATE THE DROPDOWN WITH SERVICES ON THE TERMINAL
//ITSELF, CHANGE BELOW VARIABLE TO TRUE;            
$show_services = true;

// set  to   RECUR  - for recurring payments, ONETIME - for 
$payment_mode = "RECUR";


//service name   |   price  to charge   | Billing period  "Day", "Week", "SemiMonth", "Month", "Year"   |  how many periods of previous field per billing period
$recur_services = array(
                 array("Service 1 monthly", "49.99", "Month", "1"),
                 array("Service 1 quaterly", "149.99", "Month", "3"),
                 array("Service 1 semi-annualy", "249.99", "Month", "6"),
                 array("Service 1 annualy", "349.99", "Year", "1")
                ); 

//IF YOU'RE GOING LIVE FOLLOWING VARIABLE SHOULD BE SWITCH TO true
// IT WILL AUTOMATICALLY REDIRECT ALL NON-HTTTPS REQUESTS TO HTTPS.
// MAKE SURE SSL IS INSTALLED ALREADY.
$redirect_non_https = false;
$liveMode = false;
/****************************************************
//TEST CREDIT CARD CREDENTIALS for SANDBOX TESTING
Card Type: Visa
Account Number: 4683075410516684
Expiration Date: Any in future
Security Code: 123
****************************************************/

if(!$liveMode){
//TEST MODE
define('API_USERNAME', 'uneebmir321-facilitator_api1.yahoo.com');
define('API_PASSWORD', '2J3CTL4P9YW2SX7E');
define('API_SIGNATURE', 'AFcWxV21C7fd0v3bYYYRCpSSRl31AR8CZWLr4PcgmVreEeDisevQV97C');
define('API_ENDPOINT', 'https://api-3t.sandbox.paypal.com/nvp');
define('PAYPAL_URL', 'https://www.sandbox.paypal.com/webscr&cmd=_express-checkout&token=');
} else {
//LIVE MODE
define('API_USERNAME', 'your_LIVE_api_username');
define('API_PASSWORD', 'your_LIVE_api_password');
define('API_SIGNATURE', 'your_LIVE_api_signature_very_long_string');
//DONT EDIT BELOW 2 LINES IF UNSURE.
define('API_ENDPOINT', 'https://api-3t.paypal.com/nvp');
define('PAYPAL_URL', 'https://www.paypal.com/webscr&cmd=_express-checkout&token=');
}

/*******************************************************************************************************
    PAYPAL EXPRESS CHECKOUT CONFIGURATION VARIABLES
********************************************************************************************************/
$enable_paypal = true; //shows/hides paypal payment option from payment form.
$paypal_merchant_email = "[email protected]";
$paypal_success_url = "http://nextcrawl.ca/paypal/paypal-pro-payment-terminal/paypal_thankyou.php";
$paypal_cancel_url = "http://nextcrawl.ca/paypal/paypal-pro-payment-terminal/paypal_cancel.php";
$paypal_ipn_listener_url = "http://nextcrawl.ca/paypal/paypal-pro-payment-terminal/paypal_listener.php";
$paypal_custom_variable = "some_var";
$paypal_currency = "USD";
$sandbox = true; //if you want to test payments with your sandbox account change to true (you must have account at https://developer.paypal.com/ and YOU MUST BE LOGGED IN WHILE TESTING!)
if($liveMode){ $sandbox = false; } else { $sandbox = true; }


//DO NOT CHANGE ANYTHING BELOW THIS LINE, UNLESS SURE OF COURSE
define("PAYMENT_MODE",$payment_mode);
if(!$sandbox){
    define("PAYPAL_URL_STD","https://www.paypal.com/cgi-bin/webscr");
} else {
    define("PAYPAL_URL_STD","https://www.sandbox.paypal.com/cgi-bin/webscr");
}

define('USE_PROXY',FALSE);
define('PROXY_HOST', '127.0.0.1');
define('PROXY_PORT', '808');
define('VERSION', '2.3');
define('ACK_SUCCESS', 'SUCCESS');
define('ACK_SUCCESS_WITH_WARNING', 'SUCCESSWITHWARNING');

if($redirect_non_https){
    if ($_SERVER['SERVER_PORT']!=443) {
        $sslport=443; //whatever your ssl port is
        $url = "https://". $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
        header("Location: $url");
        exit();
    }
}
?> 

i searched all over the internet but could not find any solution,its been quite a headache for me now,help needed,thanks in advance..

1
Which country that your account in sandbox belong to? Have you file any MTS ticket?Athrun Zara
The account belongs to US, MTS ticket? how do i issue an mts ticket?uneeb meer
You have to ask paypal tech support to add recurring payments to the business sandbox email you pulled apis from. Use the url Anaheim posted, and click contact support link at the bottom.GeekNinja

1 Answers

0
votes

Please open a PayPal MTS ticket to get the DPRP permission.