ekyna/payum-monetico
Composer 安装命令:
composer require ekyna/payum-monetico
包简介
Payum Monetico (Credit Mutuel/CIC) gateway
README 文档
README
Payum Monetico (Credit Mutuel/CIC/OBC) payment gateway.
Installation / Configuration
composer req ekyna/payum-monetico
use Ekyna\Component\Payum\Monetico\Api\Api; use Ekyna\Component\Payum\Monetico\MoneticoGatewayFactory; $factory = new MoneticoGatewayFactory(); $gateway = $factory->create([ 'mode' => Api::MODE_PRODUCTION, 'tpe' => '123456', 'key' => '123456', 'company' => 'foobar', ]); // Register your convert payment action // $gateway->addAction(new \Acme\ConvertPaymentAction());
Create your convert action
See src/Action/ConvertPaymentAction.php sample.
Create your notify controller
Example (Symfony):
public function notifyAction(Request $request) { // Get the reference you set in your ConvertAction if (null === $reference = $request->request->get('reference')) { throw new NotFoundHttpException(); } // Find your payment entity $payment = $this ->get('acme.repository.payment') ->findOneBy(['number' => $reference]); if (null === $payment) { throw new NotFoundHttpException(); } $payum = $this->get('payum'); // Execute notify & status actions. $gateway = $payum->getGateway('monetico'); $gateway->execute(new Notify($payment)); $gateway->execute(new GetHumanStatus($payment)); // Get the payment identity $identity = $payum->getStorage($payment)->identify($payment); // Invalidate payment tokens $tokens = $payum->getTokenStorage()->findBy([ 'details' => $identity, ]); foreach ($tokens as $token) { $payum->getHttpRequestVerifier()->invalidate($token); } // Return expected response return new Response(\Ekyna\Component\Payum\Monetico\Api\Api::NOTIFY_SUCCESS); }
统计信息
- 总下载量: 80.22k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 9
- 点击次数: 1
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-03-25