<?php $page->EndContent(); }), new ModulePage("purchase", array(new ModulePage("", function ($path) { $page = new WebPage(); $page->BeginContent(); ?> <div class="Card"> <div class="Title">Buy PsychatiGOLD with PayPal®</div> <div class="Content"> <p>Thank you for choosing to support PhoenixSNS and <?php echo System::GetConfigurationValue("Application.Name"); ?> development by purchasing PsychatiGold!</p> <p>PsychatiGold lets you get ahead of the game by purchasing a small, medium, or large pack of gold. Please choose the package you need:</p> <?php $paypalForm = new PayPalForm("frmPurchase", "USD", "-----BEGIN PKCS7-----MIIH8QYJKoZIhvcNAQcEoIIH4jCCB94CAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBVLCTpPtkF5ZUA3o4P5Ox0jdefKS6H8jDZddPT4mnYJzksqXDORixUJNqJCY6ftxJ7ucuBfL64EyR0l84Cd7xvTUZFyerG/9Sa7BJ7ywCRSVQQppI6rPI+sl3BTpPBcWP6OErqLzUOm8BqNLelySaho8rnQXZs0rzJGLKMS1xJZjELMAkGBSsOAwIaBQAwggFtBgkqhkiG9w0BBwEwFAYIKoZIhvcNAwcECKkBGjTp1CIcgIIBSLEZVqGDP7QW4hTFHjfTpwpAdXIL62SkikO9flFQy4XspTf07coBMppYK+jru2XnFUZIOkCLrdb3zzvNTHwfuFjtiIGXFZdHgWHD7XdNdSyU9BaBKLm+KTPXBdI4Cw0tuRmJQmceD6rb8cr5H3LWClNd42uhL1xMtmDe8Hle7v1U8Nx4bLQr2ie0x4VP239PyWZ7a5AgAya7KRIKIsgQ4ezoN8RFUJsNpfIADkMUVzIZBi8LUBM0Gz4mSwgxkIZnxJ1xSp87FV67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QQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAIFfOlaagFrl71+jq6OKidbWFSE+Q4FqROvdgIONth+8kSK//Y/4ihuE4Ymvzn5ceE3S/iBSQQMjyvb+s2TWbQYDwcp129OPIbD9epdr4tJOUNiSojw7BHwYRiPh58S1xGlFgHFXwrEBb3dgNbMUa+u4qectsMAXpVHnD9wIyfmHMYIBmjCCAZYCAQEwgZQwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xNDAyMTEwMzU4NTFaMCMGCSqGSIb3DQEJBDEWBBQu5CnT52MTSa8JWQY7XJ3JaScCCjANBgkqhkiG9w0BAQEFAASBgCPnkwRiDbqWsaJjb8SIDGXS+aXPvmPLwDu+Gnd3skUuS28nfxOAXsksmoI8HK8Sa6gRfjMc7X4U5DwGJIeGYR2w6mlHc0luAo/iPosNZ7mOwNbuRMi/fO/ZQmtdOSC7KU3zH9P70WF3euoTTGmtg520b/2hF43a+PLFNySNtzjw-----END PKCS7-----"); $paypalForm->BeginContent(); ?> <table style="width: 100%;" border="1"> <tr> <th style="width: 25%;">Amount</th> <th style="width: 25%;">What you pay (in USD)</th> <th style="width: 25%;">What you get (in PsychatiGold)</th> <th style="width: 25%;">Equivalent amount in PsychatiSilver</th> </tr> <tr> <td><input type="radio" name="os0" value="single" /> One Gold Coin</td> <td>$0.10</td> <td>1 piece</td> <td>3000 pieces</td> </tr>
public function actionPaypal($order_id = null) { $model = new PayPalForm(); if ($order_id !== null) { $model->order_id = $order_id; } $order = Order::model()->findByPk($model->order_id); if ($order->customer->user_id != Yii::app()->user->id) { throw new CHttpException(403); } if ($order->status != 'new') { Shop::setFlash('The order is already paid'); $this->redirect('//shop/products/index'); } if (isset($_POST['PayPalForm'])) { $model->attributes = $_POST['PayPalForm']; if ($model->validate()) { echo $model->handlePayPal($order); } } $this->render('/order/paypal_form', array('model' => $model)); }