andchir / omnipay-bundle
Omnipay bundle for Symfony 4.x
Installs: 616
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 3
Open Issues: 5
Type:symfony-bundle
Requires
- andchir/omnipay3-yandexkassa: 1.0.5
- andrewnovikof/omnipay-sberbank: ^3.2
- hiqdev/omnipay-robokassa: ^3.1
- league/omnipay: ^3
- omnipay/paypal: ^3.0
- dev-master
- 1.0.23
- 1.0.22
- 1.0.21
- 1.0.20
- 1.0.19
- 1.0.18
- 1.0.17
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- v1.0.4
- v1.0.3
- 1.0.2
- 1.0.1
- v1.0
- dev-dependabot/composer/guzzlehttp/guzzle-6.5.8
- dev-dependabot/composer/guzzlehttp/psr7-1.8.5
- dev-dependabot/composer/symfony/http-foundation-4.4.5
This package is auto-updated.
Last update: 2024-11-21 23:21:40 UTC
README
Install:
composer require andchir/omnipay-bundle
Configuration:
omnipay:
success_url: '/profile/history_orders'
fail_url: '/'
return_url: '/omnipay_return'
notify_url: '/omnipay_notify'
cancel_url: '/omnipay_cancel'
data_keys:
paymentId: ['orderNumber', 'Shp_TransactionId']
customerEmail: ['customerNumber', 'Email', 'Shp_Client']
gateways:
PayPal_Express:
parameters:
username: xxxxxxxxxxxxx
password: xxxxxxxxxxxxxxxxxx
signature: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
purchase:
username: ~
password: ~
signature: ~
amount: AMOUNT
currency: CURRENCY
testMode: true
returnUrl: NOTIFY_URL
cancelUrl: CANCEL_URL
complete:
username: ~
password: ~
signature: ~
amount: AMOUNT
currency: CURRENCY
testMode: true
returnUrl: NOTIFY_URL
cancelUrl: CANCEL_URL
YandexMoney:
parameters:
shopid: xxxxxx
scid: xxxxxx
password: xxxxxxxxxxxxxxxxx
customerNumber: CUSTOMER_EMAIL
amount: AMOUNT
orderId: PAYMENT_ID
method: ~
returnUrl: RETURN_URL
cancelUrl: CANCEL_URL
purchase:
amount: AMOUNT
currency: RUB
receipt: ~
testMode: true
complete:
shopid: ~
scid: ~
action: ~
md5: ~
orderNumber: PAYMENT_ID
orderSumAmount: AMOUNT
orderSumCurrencyPaycash: ~
orderSumBankPaycash: ~
invoiceId: ~
customerNumber: CUSTOMER_EMAIL
password: ~
Sberbank:
prefersAuthorize: true
parameters:
username: xxxxxxxxx
password: xxxxxxxxx
returnUrl: RETURN_URL
cancelUrl: CANCEL_URL
purchase:
username: ~
password: ~
orderNumber: PAYMENT_ID
amount: AMOUNT
currency: RUB
testMode: true
complete:
username: ~
password: ~
orderId: ~
RoboKassa:
parameters:
purse: xxxxxx
secretKey: xxxxxx
secretKey2: xxxxxx
purchase:
purse: ~
secretKey: ~
amount: AMOUNT
currency: CURRENCY
currencyLabel: ~
description: ~
receipt: ~
transactionId: PAYMENT_ID
client: CUSTOMER_EMAIL
testMode: true
complete:
purse: ~
secretKey: ~
secretKey2: ~
Example of use:
/** @var OmnipayService $omnipayService */
$omnipayService = $this->get('omnipay');
$gatewayName = 'PayPal_Express';
$omnipayService->create($gatewayName);
// Create payment
$payment = new Payment();
$payment
->setUserId(0)
->setEmail('aaa@bbb.cc')
->setOrderId(1)
->setCurrency('RUB')
->setAmount(500)
->setDescription('Order #12')
->setStatus(Payment::STATUS_CREATED)
->setOptions(['gatewayName' => $gatewayName]);
$dm->persist($payment);
$dm->flush();
$omnipayService->initialize($payment);
$omnipayService->sendPurchase($payment);
Developed for https://shopker.org/