定制 pimcore/payment-provider-ogone 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pimcore/payment-provider-ogone

Composer 安装命令:

composer require pimcore/payment-provider-ogone

包简介

Pimcore Payment Provider - OGone

README 文档

README

Official OGone Documentation

Installation

Install latest version with Composer:

composer require pimcore/payment-provider-ogone

Enable bundle via console or extensions manager in Pimcore backend:

php bin/console pimcore:bundle:enable PimcorePaymentProviderOGoneBundle
php bin/console pimcore:bundle:install PimcorePaymentProviderOGoneBundle

Configuration

The Payment Manager is responsible for implementation of different Payment Provider to integrate them into the framework.

For more information about Payment Manager, see Payment Manager Docs.

Configure payment provider in the pimcore_ecommerce_config.payment_manager config section:

pimcore_ecommerce_config:
    payment_manager:
        # service ID of payment manager implementation - following value is default value an can be omitted
        payment_manager_id: Pimcore\Bundle\EcommerceFrameworkBundle\PaymentManager\PaymentManager

        # configuration of payment providers, key is name of provider
        providers:
            ogone:
                provider_id: Pimcore\Bundle\EcommerceFrameworkBundle\PaymentManager\Payment\OGone
                profile: sandbox
                profiles:
                    sandbox:
                        secretIn: D343DDFD3434
                        secretOut: E454EEGE4545
                        pspid: MyTestAccount
                        mode: sandbox                        
#                       encryptionType: SHA1 or SHA256 or SHA512 (optional)
                    live:
                        secretIn: D343DDFD3434
                        secretOut: E454EEGE4545
                        mode: live                        
#                       encryptionType: SHA1 or SHA256 or SHA512 (optional)

Payment Information: Order payment section "Payment Informations" stores information about every payment trial by Customer.

Add additional fields in "PaymentInfo" fieldcollection, so that Order Manager stores information in Order object: PaymentInfo Additional Data

Implementation

Somewhere in your checkout controller you will need to create the payment configuration for the initPayment() method of the provider:

<?php
    $url = 'https://'. $_SERVER["HTTP_HOST"] . "/en/checkout/confirm?state=";
    $paymentConfig = [                   
                    'language'            => "en",
                    'orderIdent'          => $paymentInfo->getInternalPaymentId(),                   
                    'customerStatement'   => $paymentMessage,
                    'successUrl'          => "https://my-server-name.com/shop/payment/confirm?provider=ogone&state=success",
                    'cancelUrl'           => "https://my-server-name.com/shop/payment/confirm?provider=ogone&state=cancel",
                    'errorUrl'            => "https://my-server-name.com/shop/payment/confirm?provider=ogone&state=error",
                    'paymentInfo'         => $order->getPaymentInfo()->getItems()[0]
                ];

You must configure the callback URLs within the OGone backend so that these are called server-by-server.

You can pass additional parameters in the configuration based on the OGone documentation. For instance the color and the appearance of th Ogone UI can be controlled, and additional customer data may be passed.

统计信息

  • 总下载量: 12
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 7
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2021-02-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固