public static function PayPalPaymentIPNController::save in PayPal for Payment 7
Saves an IPN.
Parameters
PayPalPaymentIPN $ipn:
Return value
int The db_merge() return value.
5 calls to PayPalPaymentIPNController::save()
- PayPalPaymentIPNControllerTest::testDelete in paypal_payment_ipn/
tests/ PayPalPaymentIPNControllerTest.test - Tests delete().
- PayPalPaymentIPNControllerTest::testLoad in paypal_payment_ipn/
tests/ PayPalPaymentIPNControllerTest.test - Tests load().
- PayPalPaymentIPNControllerTest::testSave in paypal_payment_ipn/
tests/ PayPalPaymentIPNControllerTest.test - Tests save().
- PayPalPaymentIPNControllerTest::testValidate in paypal_payment_ipn/
tests/ PayPalPaymentIPNControllerTest.test - Tests validate().
- paypal_payment_ipn_payment_update in paypal_payment_ipn/
paypal_payment_ipn.module - Implements hook_ENTITY_TYPE_update() for payment.
File
- paypal_payment_ipn/
includes/ PayPalPaymentIPNController.inc, line 53
Class
- PayPalPaymentIPNController
- Provides IPN functionality.
Code
public static function save(PayPalPaymentIPN $ipn) {
$fields = array_intersect_key(get_object_vars($ipn), get_class_vars(get_class($ipn)));
$merge_status = db_merge('paypal_payment_ipn')
->key(array(
'psiid' => $ipn->psiid,
))
->fields($fields)
->execute();
return $merge_status;
}