Skip to content

2.0.0

Compare
Choose a tag to compare
@ccrims0n ccrims0n released this 07 Mar 02:27
· 503 commits to master since this release

Added

  • Support for custom Application header ($api->setAppDetails($title, $version))
  • Support for card entity ($card = $api->card->fetch($cardId))
  • Support for Webhook and Order Signature verification:
    Razorpay\Api\Utility::verifyPaymentSignature(['razorpay_signature' => '', 'razorpay_order_id' => '', 'razorpay_payment_id' => ''])
    throws Razorpay\Errors\SignatureVerificationError if fails
  • Support for direct refund creation via Razorpay\Api\Refund::create():
    $refund = $api->refund->create(array('payment_id' => $id))
  • Support for Utility functions via Razorpay\Api\Utility::verifyPaymentSignature and Razorpay\Api\Utility::verifyWebhookSignature:
    verifyWebhookSignature($payload = '{requestbody}', $expectedSignature = 'X-Razorpay-Signature header')
    throws Razorpay\Errors\SignatureVerificationError if signature doesn't match
  • Support for case insensitive error codes
  • Support for 2xx HTTP status codes

Changed

  • Razorpay\Api\Payment::refunds() now returns a Razorpay\Api\Collection object instead of Razorpay\Api\Refund object
  • Razorpay\Api\Api::$baseUrl, Razorpay\Api\Api::$key and Razorpay\Api\Api::$secret are now protected instead of public
    Api::getKey() and Api::getSecret() are provided instead