Я использую colfusion Paypal SDK для прямых платежей, ссылка здесь: https://github.com/paypal/nvp-coldfusion-sdkCFC не найден с PAYPAL SDK
Я вставил файл Application.cfc ниже. Моя проблема заключается в том, что каждый раз, когда я перехожу к образцам -> dodirectpayment.cfm и представляю тестовую форму, она заявляет: «Ошибка: не удалось найти компонент ColdFusion или интерфейс CallerService». Я думаю, что это связано с ссылкой на файл callerservice.cfc, но не может понять, что происходит не так. Буду признателен за любую оказанную помощь. Приложение.cfc находится здесь.
<cfscript>
/**
@dateCreated "July 18, 2011"
@hint "You implement methods in Application.cfc to handle ColdFusion application events and set variables in the CFC to configure application characteristics."
*/
component output="false" {
/* **************************** APPLICATION VARIABLES **************************** */
THIS.name = "NVPSample";
THIS.applicationTimeout = createTimeSpan(0, 2, 0, 0);
customtagpaths = "{#getDirectoryFromPath(ExpandPath('../lib/'))#,#getDirectoryFromPath(ExpandPath('../lib/services/'))#}";
THIS.customTagPaths = customtagpaths;
THIS.serverSideFormValidation = true;
THIS.sessionManagement = true;
THIS.sessionTimeout = createTimeSpan(0, 0, 30, 0);
THIS.setClientCookies = true;
THIS.setDomainCookies = false;
THIS.scriptProtect = true;
THIS.secureJSON = false;
THIS.secureJSONPrefix = "";
THIS.enablerobustexception = true;
/* **************************** APPLICATION METHODS **************************** */
public void function onApplicationEnd(struct ApplicationScope=structNew()) {
return;
}
public boolean function onApplicationStart() {
return true;
}
public void function onCFCRequest(required string cfcname, required string method, required string args) {
return;
}
public void function onRequestEnd() {
return;
}
public boolean function onRequestStart(required string TargetPage) {
request.serverURL = "https://api-3t.sandbox.paypal.com/nvp";
/* SUBJECT to be uncommented for UNIPAY all the other credentials like API username,
password,signature can be commented for UNIPAY
To enable Payments for Third Party Email whcih will be passed along with Partner's 3token credentials
uncomment both subject and 3 token credentials.
*/
request.SUBJECT="[email protected]";
APIuserName = "sales-facilitator_api1.totalsportsadvantage.com";
APIPassword = "1387466817";
APISignature = "An5ns1Kso7MWUdW4ErQKJJJ4qi4-AMJWATXVSChE1ExjnH8FyoZD8U5Q";
/*
request.SUBJECT="[email protected]";
APIuserName = "clip_1309031681_biz_api1.paypal.com";
APIPassword = "1309031732";
APISignature = "AFcWxV21C7fd0v3bYYYRCpSSRl31An2lFbilAjH412uQjiC0OEJh45pL";
*/
//condition to check if it is UNIPAY
if (isdefined("SUBJECT") && (isdefined("APIuserName") eq "false" && isdefined("APIPassword") eq "false" && isdefined("APISignature") eq "false"))
{
request.UNIPAYSUBJECT="#SUBJECT#";
request.USER = "";
request.PWD = "";
request.SIGNATURE = "";
}
//condition to check if it is Payments for Third Party Email
if (isdefined("SUBJECT") && isdefined("APIuserName") && isdefined("APIPassword") && isdefined("APISignature"))
{
request.UNIPAYSUBJECT="#SUBJECT#";
request.USER = "#APIuserName#";
request.PWD = "#APIPassword#";
request.SIGNATURE = "#APISignature#";
}
//condition to check if it is 3 token credentials
if (isdefined("SUBJECT") eq "false" && isdefined("APIuserName") && isdefined("APIPassword") && isdefined("APISignature"))
{
request.UNIPAYSUBJECT="";
request.USER = "#APIuserName#";
request.PWD = "#APIPassword#";
request.SIGNATURE = "#APISignature#";
}
request.PayPalURL = "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=";
request.version = "65.1";
/*
By default the API requests doesn't go through proxy. To route the requests through a proxy server
set "useProxy" value as "true" and set values for proxyName and proxyPort. Set proxyName with
the Host Name or the IP address of the proxy server. proxyPort should be a valid port number.
eg:
useProxy = "true";
proxyName = "127.0.0.1";
proxyPort = "8081";
*/
request.useProxy = "false";
request.proxyName = "";
request.proxyPort = "";
return true;
}
public void function onSessionEnd(required struct SessionScope, struct ApplicationScope=structNew()) {
return;
}
public void function onSessionStart() {
return;
}
}
</cfscript>
Когда я выполнил поиск callerservice.cfc в вашем примере кода, я тоже не смог его найти. –
Это специальный тег в папке/lib/services связанного с SDK. – eduski
Что вы сделали по пути или устранили неполадки? –