我已经使用Salesforce提供的PHP工具箱中的phpTookit连接salesforce,但是今天我得到了使用phptoolkit连接到salesforece沙箱的需求,有没有什么办法可以连接。salesforce沙箱连接使用php
2
A
回答
1
连接到生产和连接到沙箱销售人员-ORG之间的唯一区别是:
- 的网址:http://login.salesforce.com(生产)http://test.salesforce.com(沙箱)
- 安全令牌(如果被激活) 在SforceEnterpriseClient对象
2
呼叫对setEndpoint调用的createConnection后,和端点设置为https://test.salesforce.com
端点:
define("USERNAME", "[email protected]");
define("PASSWORD", "yourpassword");
define("SECURITY_TOKEN", "securitytoken");
require_once ('soapclient/SforceEnterpriseClient.php');
$mySforceConnection = new SforceEnterpriseClient();
$mySforceConnection->createConnection("soapclient/enterprise.wsdl.xml");
// this sets the endpoint for a sandbox login:
$mySforceConnection->setEndpoint('https://test.salesforce.com/services/Soap/c/32.0');
$mySforceConnection->login(USERNAME, PASSWORD.SECURITY_TOKEN);
以上代码来自Force.com Toolkit for PHP示例,setEndpoint行是为连接到沙箱而添加的行。
相关问题
- 1. 使用zkSForce访问salesforce沙箱
- 2. hortonworks沙箱连接垃圾
- 3. DocuSign不接受沙箱中的Salesforce用户
- 4. 需要更新Salesforce沙箱页面
- 5. salesforce沙箱cURL请求无效grant_type
- 6. 如何使用php连接salesforce?
- 7. 无法建立沙箱连接
- 8. 如何使用salesforce Bulk API登录沙箱
- 9. Salesforce在另一个沙箱中暴露沙盒元数据
- 10. 使用SAS连接到salesforce
- 11. 如何使用Java客户端API连接到Hortonworks沙箱Hbase
- 12. 在沙箱沙盒中使用Fay
- 13. 沙箱执行功能PHP
- 14. Web服务调用salesforce沙箱时出错
- 15. Salesforce中指定用户的沙箱中缺少调试日志
- 16. 如何使用沙箱SLF4J
- 17. 如何使用PayPal沙箱
- 18. Java内存使用沙箱
- 19. 当从flex连接到套接字时安全沙箱违规
- 20. 沙箱用户的PHP代码
- 21. 如何对沙箱进行沙箱?
- 22. 使用C#连接到SalesForce批量API
- 23. 是否可以将报表从Salesforce生产移动到沙箱?
- 24. 在Salesforce沙箱API中看不到自定义对象?
- 25. 将沙箱部署到salesforce生产中的错误
- 26. 登录到salesforce沙箱时发生太多重定向
- 27. Salesforce - 如何在环境(沙箱,Live等)之间部署
- 28. Salesforce我的域首先创建的位置?沙箱或生产
- 29. 我需要通过api访问salesforce沙箱的一些指导
- 30. salesforce:刷新沙箱后重置安全令牌