简体   繁体   English

条纹支付集成 Php 编码器

[英]Stripe Payment Integration Php codelgniter

I am worked in stripe payment integration section and i integrated stripe and connected my stripe account but i doesn't know how to integrated test cards and connected stripe account我在条带支付集成部分工作,我集成了条带并连接了我的条带帐户,但我不知道如何集成测试卡和连接条带帐户

This is the Stripe Custom Library in codeingiter, You can use it your own project all you need to set stripe $secret_key .这是 codeingiter 中的Stripe 自定义库,您可以在自己的项目中使用它来设置 stripe $secret_key

Please keep it in mind require_once(APPPATH. 'vendor/autoload.php') .请记住require_once(APPPATH. 'vendor/autoload.php') This is the official library这是官方图书馆

You can download it using composer composer require stripe/stripe-php您可以使用 composer composer require stripe/stripe-php下载它

How to use it in your project?如何在你的项目中使用它?

Call this library in your controller using $this->load->library("stripe_custom_library");使用 $this->load->library("stripe_custom_library"); 在您的 controller 中调用此库$this->load->library("stripe_custom_library");

  1. Add customer using add_customer function使用add_customer function 添加客户

  2. Add card to customer using add_card使用add_card向客户添加卡

  3. Now hold charge for a customer hold_charge现在为客户保留费用hold_charge

  4. Once charge is hold, you can capture now using capture_transaction一旦费用被保留,您现在可以使用capture_transaction

  5. In case you want to remove hold you can use hold_remove如果您想删除保留,可以使用hold_remove

There are some more methods as well, but in case you want to use them you can do it like if you need want to know whats is in IPN, you can use webhook, you can comment me if you have any issue with using this library.还有其他一些方法,但如果你想使用它们,你可以这样做,如果你想知道 IPN 中有什么,你可以使用 webhook,如果你对使用这个库有任何问题,可以评论我.

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

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