Created
August 9, 2011 14:19
-
-
Save makasim/1134154 to your computer and use it in GitHub Desktop.
payment creation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$ppc = $this->paymentPluginController; | |
$price = '66.00'; | |
$currency = 'USD'; | |
$instruction = new PaymentInstruction($price, $currency, 'paypal_express_checkout', new ExtendedData()); | |
$ppc->createPaymentInstruction($instruction); | |
$paymentId = $ppc->createPayment($instruction->getId(), $price)->getId(); | |
$paymentUrl = $this->router->generate('foo_payment_url', array('paymentId' => $paymentId), true); | |
$instruction->getExtendedData()->set('return_url', $paymentUrl, false); | |
$instruction->getExtendedData()->set('cancel_url', $paymentUrl, false); | |
$ppc->createPaymentInstruction($instruction); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment