简体   繁体   English

与PHP Curl的平衡付款集成

[英]Balanced payment integration with PHP Curl

I am using balanced payment for transferring payment with my site but having problem with it and I am using PHP Curl code in my programming language, But I have not received any type oh hopeful response of my problem. 我正在使用平衡付款来通过我的网站进行转帐,但是出现了问题,并且正在使用我的编程语言使用PHP Curl代码,但是我还没有收到任何形式的问题希望我能回答。

My Curl code is written as below. 我的Curl代码如下编写。

$url = "https://api.balancedpayments.com/v1/marketplaces/TEST-MP1K1dZWDLVf3nIfthUpaROF/";
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,'key=xxxxxxxxxxxxxxxxxxxxxx&amount=5000&description=Some descriptive text for the debit in the dashboard');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);

This "key" is hidden buy security reason. 这个“关键”是隐藏购买安全性的原因。

If anyone has a solution to my problem so please contact me my email is ishansourabhjain@hotmail.com. 如果有人可以解决我的问题,请与我联系,我的电子邮件是ishansourabhjain@hotmail.com。

Thanks & Regards, Ishan S. Jain 谢谢与问候,Ishan S. Jain

I suspect your issue has to do with trying to POST your key instead of supplying it in basic auth format. 我怀疑您的问题与尝试发布您的密钥有关,而不是以基本身份验证格式提供它。

Also, note you're building your code against an old API version (1.0). 另外,请注意,您是根据旧的API版本(1.0)构建代码的。 1.1 is recommended. 建议1.1。

Why not use the existing Balanced client library for PHP? 为什么不为PHP使用现有的Balanced客户端库? https://github.com/balanced/balanced-php https://github.com/balanced/balanced-php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM