1. Go to this page and download the library: Download grimmlink/alipay-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
grimmlink / alipay-bundle example snippets
...
$apr = $this->get('grimmlink_alipay.request_handler');
$apr->setParameters(array(
'notify_url' => $this->generateUrl('grimmlink_alipay_notify', array(), true),
'return_url' => $this->generateUrl('payment_alipay_return', array(), true), // make it your own
'out_trade_no' => $ref, // make it your own
'total_fee' => '0.01', // make it your own
'subject' => 'Payment title', // make it your own
'body' => 'This is the payment description', // make it your own
));
return $this->render('PaymentBundle:Alipay:pay.html.twig', array(
'url' => $apr->getUrl(),
'form' => $apr->getForm()->createView(),
));
...
php
public function registerBundles()
{
return array(
// ...
new Grimmlink\AlipayBundle\GrimmlinkAlipayBundle(),
// ...
);
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.